Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
syscmd("mount -n -t sysfs sysfs $targetdir/sys") == 0 ||
die "unable to mount sysfs on $targetdir/sys\n";
if ($boot_type eq 'efi') {
- syscmd("mount -n -t efivarfs none $targetdir/sys/firmware/efi/efivars") == 0 ||
+ syscmd("mount -n -t efivarfs efivarfs $targetdir/sys/firmware/efi/efivars") == 0 ||
die "unable to mount efivarfs on $targetdir/sys/firmware/efi/efivars: $!\n";
}
syscmd("chroot $targetdir mount --bind /mnt/hostrun /run") == 0 ||
umount -l -n /target >/dev/null 2>&1
umount -l -n /dev
umount -l -n /run
+ [ -d /sys/firmware/efi/efivars ] && umount -l -n /sys/firmware/efi/efivars
umount -l -n /sys
umount -l -n /proc
mount -n -t sysfs sysfs /sys
if [ -d /sys/firmware/efi ]; then
echo "EFI boot mode detected, mounting efivars filesystem"
- mount -nt efivarfs none /sys/firmware/efi/efivars
+ mount -n -t efivarfs efivarfs /sys/firmware/efi/efivars
fi
mount -n -t tmpfs tmpfs /run