From 19418e59a17348bbce417f08ee88240adea84a97 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Thu, 3 Mar 2022 09:31:09 +0100 Subject: [PATCH] Mount LV root only if exists --- debian/chroot.mount | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/chroot.mount b/debian/chroot.mount index 014a7a0..fe3e633 100755 --- a/debian/chroot.mount +++ b/debian/chroot.mount @@ -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