X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Fhooks%2Fpartition.DEFAULT;h=d702351a38178de41b5ed2e6395af241ab9035dc;hp=fc6da117fcd01cc2aafb91784c11a8fb7175961c;hb=4d23584c79e6c519f24042b11bc2cb5cd04ea284;hpb=765bf1b3dec7f742e214d4886988e1c241629eb0 diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index fc6da11..d702351 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -75,6 +75,8 @@ fi # # NOWIPE: use existing subvolumes if they exist # +# REROOTFS: Don't reuse the root filesystem, even if we normally would +# # ROTATIONAL: forces to install onto hdds instead of sdds. normally sdds # are chosen if they exist. # @@ -168,6 +170,7 @@ grub_extn=7 # bios boot partition, # https://wiki.archlinux.org/index.php/GRUB bios_grubn=8 +# for an even raid (raid 1), when one disk is bigger, this partition goes on the big disk even_bign=9 lastn=$bios_grubn @@ -252,15 +255,18 @@ luks-setup() { ##### begin variable setup +partition=false if ifclass REPARTITION; then partition=true # force a full wipe -else - partition=false # change to true to force a full wipe fi +wipe=true if ifclass NOWIPE; then wipe=false -else - wipe=true +fi + +rerootfs=false +if ifclass REROOTFS; then + rerootfs=true fi if (($(nproc) > 2)); then @@ -380,7 +386,7 @@ for dev in ${devs[@]}; do boot_devs+=("$(bootdev)") boot2_devs+=("$(boot2dev)") fi - if $first && (( ${boot_devs[@]} >= 1 )) ; then + if $first && (( ${#boot_devs[@]} >= 1 )) ; then first_efi=$(efidev) first_grub_extdev=$(grub_extdev) first=false @@ -556,7 +562,7 @@ EOF # but it is safely ignorable and gets us the ability to just type our password # in once at boot. A downside is that they are probably needed to be plugged in to boot. cat >>/tmp/fai/crypttab <