diff --git a/debian/chroot.mount b/debian/chroot.mount index fe3e633..be560d4 100755 --- a/debian/chroot.mount +++ b/debian/chroot.mount @@ -98,8 +98,14 @@ else mountpoint -q /target || mount -- ${hdd}3 /target fi - ### boot - grub - mountpoint -q /target/boot || mount -- ${hdd}1 /target/boot +### boot - grub {{{ +### If a boot partition is available for $hdd device +if blkid | grep --quiet --extended-regexp -- "^${hdd}.*LABEL=\"boot\""; then + ### Get partition number + boot_part_number=$(blkid | grep --extended-regexp -- "^${hdd}.*LABEL=\"boot\"" | sed --silent "s;${hdd}\(.\).*;\1;p") + mountpoint -q /target/boot || mount -- "${hdd}${boot_part_number}" /target/boot +fi +### }}} ## if [ "${manage_btrfs}" -eq 0 ]; then printf '%b\n' "The root system is in ${GREEN}BTRFS${RESET}, no extra mount is required." @@ -175,6 +181,7 @@ DNS=80.67.169.12 ## }}} +printf '%b\n' "A systemd-networkd sample is available in ${GREEN}/tmp/50-default-networkd${RESET}." printf '%b\n' "${GREEN}The system is available on /target you can now try to chroot.${RESET}" exit 0