summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2023-04-28 13:48:30 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2023-04-28 15:13:26 +0100
commit606270ea109a546dd54f2b1ac91ce93b06e00d5b (patch)
treeafe06b858d286db7f8cf724e009c53fe85a62186
parenta84e4d93eccebc379819561d3f7eb6fd59a5ecde (diff)
downloaddrakx-606270ea109a546dd54f2b1ac91ce93b06e00d5b.tar
drakx-606270ea109a546dd54f2b1ac91ce93b06e00d5b.tar.gz
drakx-606270ea109a546dd54f2b1ac91ce93b06e00d5b.tar.bz2
drakx-606270ea109a546dd54f2b1ac91ce93b06e00d5b.tar.xz
drakx-606270ea109a546dd54f2b1ac91ce93b06e00d5b.zip
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.
-rw-r--r--rescue/NEWS2
-rwxr-xr-xrescue/bin/guessmounts4
-rwxr-xr-xrescue/bin/install_bootloader4
3 files changed, 5 insertions, 5 deletions
diff --git a/rescue/NEWS b/rescue/NEWS
index b38eea741..dacc1f2a2 100644
--- a/rescue/NEWS
+++ b/rescue/NEWS
@@ -1,3 +1,5 @@
+- mount efivars in chroot on UEFI systems (mga#31844)
+
Version 1.66 - 11 November 2020 by Thierry Vignaud
- include overload.pm for File::Temp
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";
diff --git a/rescue/bin/install_bootloader b/rescue/bin/install_bootloader
index f2717449b..3eeb7a65e 100755
--- a/rescue/bin/install_bootloader
+++ b/rescue/bin/install_bootloader
@@ -67,8 +67,4 @@ if (!$auto) {
<STDIN> =~ /^n/i and exit 0;
}
-run_program::run('mount', '--bind', '/dev', "$::prefix/dev");
-run_program::run('mount', '--bind', '/sys', "$::prefix/sys");
$install->();
-run_program::run('umount', "$::prefix/sys");
-run_program::run('umount', "$::prefix/dev");