X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Ffiles%2Froot%2Ffai-check%2FVOL_BUSTER_BOOTSTRAP;h=e063ab2b4a37fce0dbaa9108d2ec3dd1028992e4;hb=6315fdaa029f0f107d98fde18ab584f958e06108;hp=283bbf66610efff9f2fc3cf4e11875d4cf48a3a0;hpb=dcc5f68f7fbe9aa86cb3c7402ba4429bd70b369d;p=automated-distro-installer diff --git a/fai/config/files/root/fai-check/VOL_BUSTER_BOOTSTRAP b/fai/config/files/root/fai-check/VOL_BUSTER_BOOTSTRAP index 283bbf6..e063ab2 100755 --- a/fai/config/files/root/fai-check/VOL_BUSTER_BOOTSTRAP +++ b/fai/config/files/root/fai-check/VOL_BUSTER_BOOTSTRAP @@ -47,10 +47,19 @@ case $1 in ;; esac + first=true for dev in $(btrfs fi show / | sed -rn 's#^\s*devid\s.*\s([^0-9 ]+)\S+$#\1#p' \ |sort); do - dev+=4 + + # Decide which is my grub_ext partition. see partition.DEFAULT file + # for details + if [[ $(blockdev --getsize64 ${dev}4) == 8388608 ]]; then + # Old partition scheme + dev+=4 + else + dev+=5 + fi mount $dev /mnt if $first; then if [[ -e /mnt/grubenv ]]; then