From 61d35c513a213ba8c3cb43eb429367cd9a5919d8 Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Sun, 4 Aug 2024 16:21:04 -0400 Subject: [PATCH] Added mount option to re-mount existing setup --- gentoo-install.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gentoo-install.sh b/gentoo-install.sh index edcee89..3b28805 100755 --- a/gentoo-install.sh +++ b/gentoo-install.sh @@ -35,6 +35,7 @@ function show_help() { echo "-c, --compression Enable BtrFS compression." echo "-s, --swap Enable Swap/Hibernation support." echo "-d, --debug Enable DEBUG mode for testing." + echo "-m, --mount Mount an existing install." echo "" echo "--stage Installation using stagefile , for stage3 or stage4" echo "--clean Cleanup disk for clean slate" @@ -334,6 +335,20 @@ function install_prep() { echo "as appropriate, to continue." } +function install_mount() { + show_options + + read -rsn1 -p"Mounting: To proceed, press enter to continue." proceed + echo + if [[ "$proceed" != "" ]]; then + echo "Aborting." + exit 1 + fi + + echo "Mounting Partitions on ${RootDisk}..." + prepare_target +} + function install_stage() { show_options @@ -409,6 +424,10 @@ while [[ $# -gt 0 ]]; do DEBUG=true shift ;; + -m|--mount) + INSTALL_MODE=mount + shift + ;; --stage) INSTALL_MODE=stage INSTALL_STAGE=$1 @@ -457,6 +476,7 @@ else case "$INSTALL_MODE" in normal) install_prep;; + mount) install_mount;; stage) install_stage;; clean) install_cleanup;; *)