Mount LV root only if exists

This commit is contained in:
gardouille 2022-03-03 09:31:09 +01:00
parent dbad50664f
commit 19418e59a1
Signed by: gardouille
GPG Key ID: E759BAA22501AF32
1 changed files with 5 additions and 1 deletions

6
debian/chroot.mount vendored
View File

@ -92,7 +92,11 @@ fi
## Mount the system {{{
### Root
mkdir -p -- /target
mountpoint -q /target || mount -- /dev/mapper/"${vgname}"-root /target
if [ -b "/dev/mapper/${vgname}-root" ]; then
mountpoint -q /target || mount -- /dev/mapper/"${vgname}"-root /target
else
mountpoint -q /target || mount -- ${hdd}3 /target
fi
### boot - grub
mountpoint -q /target/boot || mount -- ${hdd}1 /target/boot