From 606270ea109a546dd54f2b1ac91ce93b06e00d5b Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 28 Apr 2023 13:48:30 +0100 Subject: rescue: mount efivars in chroot on UEFI systems (mga#31844) Note that install_bootloader calls guess_mounts which mounts both the real and pseudo-filesystems, so there is no need to mount the pseudo- filesystems again. --- rescue/bin/guessmounts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rescue/bin/guessmounts') diff --git a/rescue/bin/guessmounts b/rescue/bin/guessmounts index 35da03cb0..494f98f44 100755 --- a/rescue/bin/guessmounts +++ b/rescue/bin/guessmounts @@ -156,9 +156,11 @@ if ($root) { system('mount', '-t', $_->{fs_type}, $dev, $where, '-o', $_->{options}); } system(qw(mount -t proc proc), "$target/proc"); - foreach (qw(/dev /run /sys)) { + foreach (qw(/dev /run)) { system('mount', '--bind', $_, "$target/$_"); } + system(qw(mount -t sysfs sysfs), "$target/sys"); + system(qw(mount -t efivarfs efivarfs), "$target/sys/firmware/efi/efivars") if is_uefi(); print STDERR "\nYour system is ready on $target.\n\n"; } else { die "Could not find your root device :-(.\n"; -- cgit v1.2.1