#2741 Issue closed
: Unknown EFI bootloader (no grub-install or grub2-install found) on Pop!_OS that uses systemd-boot¶
Labels: enhancement
, support / question
, needs sponsorship
gauvins2 opened issue at 2022-01-18 00:10:¶
Relax-and-Recover (ReaR) Issue Template¶
Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):
-
ReaR version ("/usr/sbin/rear -V"):
Relax-and-Recover 2.5 / Git -
OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):
NAME="Pop!_OS"
VERSION="20.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 20.04 LTS"
VERSION_ID="20.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
LOGO=distributor-logo-pop-os -
ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
OUTPUT=USB
USB_DEVICE=/dev/disk/by-label/REAR-000
USB_UEFI_PART_SIZE="4000" -
Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR):
ASUS TRX40 PRO -
System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
-
Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):
-
Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
-
Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT"):
-
Description of the issue (ideally so that others can reproduce it):
-
Workaround, if any:
-
Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):
To paste verbatim text like command output or file content,
include it between a leading and a closing line of three backticks like
```
====================
BUG in /usr/share/rear/output/USB/Linux-i386/100_create_efiboot.sh line 107:
'Unknown EFI bootloader'
--------------------
Please report this issue at https://github.com/rear/rear/issues
and include the relevant parts from /var/log/rear/rear-pop-os.log
preferably with full debug information via 'rear -D mkrescue'
====================
Some latest log messages since the last called script 100_create_efiboot.sh:
2022-01-17 19:03:02.685639500 Including output/USB/Linux-i386/100_create_efiboot.sh
2022-01-17 19:03:02.687217963 Configuring device for EFI boot
'/boot/efi/EFI/BOOT/BOOTX64.EFI' -> '/tmp/rear-efi.yo1txxCCos//EFI/BOOT/BOOTX64.efi'
'/boot/vmlinuz-5.15.8-76051508-generic' -> '/tmp/rear-efi.yo1txxCCos//EFI/BOOT/kernel'
'/tmp/rear.Axn9UfMuDYYCTEa/tmp/initrd.cgz' -> '/tmp/rear-efi.yo1txxCCos//EFI/BOOT/initrd.cgz'
2022-01-17 19:04:22.350967297 Copied kernel /boot/vmlinuz-5.15.8-76051508-generic and initrd initrd.cgz to /tmp/rear-efi.yo1txxCCos//EFI/BOOT
/usr/share/rear/lib/_input-output-functions.sh: line 457: type: grub-install: not found
/usr/share/rear/lib/_input-output-functions.sh: line 457: type: grub2-install: not found
Aborting due to an error, check /var/log/rear/rear-pop-os.log for details
Exiting rear mkrescue (PID 3905878) and its descendant processes ...
Running exit tasks
Terminated
```
jsmeix commented at 2022-01-18 07:17:¶
@gauvins2
in our current GitHub master code this is since
https://github.com/rear/rear/commit/3211ec8084e6b55c83e17a4eaf9e67be64a9f599
has_binary grub-install grub2-install || Error "Unknown EFI bootloader (no grub-install or grub2-install found)"
that is currently online at
https://github.com/rear/rear/blob/master/usr/share/rear/output/USB/Linux-i386/100_create_efiboot.sh#L56
which tells the reason why ReaR errors out here, see also your
"latest log messages since the last called script
100_create_efiboot.sh"
/usr/share/rear/lib/_input-output-functions.sh: line 457: type: grub-install: not found
/usr/share/rear/lib/_input-output-functions.sh: line 457: type: grub2-install: not found
so you need to install something that provides grub-install or
grub2-install
to make that particular part work (usually GRUB2 should provide it).
You may need to install some more things to make ReaR work for you
because ReaR needs all the basic system setup tools, in particular
disk partitioning tools, filesystem tools, bootloader tools, backup
tools and so on
to create a ReaR recovery system that can reinstall your original
system
on your replacement hardware.
For general information you may have a look at
https://en.opensuse.org/SDB:Disaster_Recovery
Therein read the initial sections and then see in particular the
sections
"First steps with Relax-and-Recover"
and
"Testing current ReaR upstream GitHub master code"
I recommend to use our latest GitHub master code because
the GitHub master code is the only place where we fix things and
it helps when you use exactly the code where we could fix things.
gozora commented at 2022-01-18 07:37:¶
Hello @jsmeix,
I'm afraid that simple installation of "something that provides grub-install" is not enough.
Excerpt from System 76 docu states:
Systemd-boot is the boot-loader for Pop!_OS 18.04 and above
while GRUB is the boot-loader for Ubuntu and Pop!_OS when
installed in Legacy BIOS mode. A boot-loader takes care
of getting the operating system started up
@gauvins2 would need to completely migrate his booting from
systemd-boot
to grub
in order to use ReaR, since to my current
knowledge, ReaR does not support systemd-boot
.
Hope it helps
V.
jsmeix commented at 2022-01-18 07:58:¶
@gozora happy to hear again from you!
Thank you so much for your analysis.
I know nothing at all about systemd-boot.
The only code places where grep 'systemd.boot'
finds something are
about EFISTUB.
Perhaps that boot method might be somehow useful here?
I never tried EFISTUB on my own.
I assume EFISTUB cannot be used with OUTPUT=USB because
there is only output/ISO/Linux-i386/260_EFISTUB_populate.sh
gozora commented at 2022-01-18 08:14:¶
Hello @jsmeix,
I try to be with my kids as much as possible, which reduces my free time a bit ;-)
I don't think that EFISTUB method would be a good option here, since it completely bypasses any Linux bootloader, hence restored system would not be same as original. This issue is basically same as abandoned https://github.com/rear/rear/issues/1214 .
Pop!_OS on the other hand have its own bare metal disaster recovery solution, which might not be as versatile as ReaR but it is vendor preferred recovery method.
V.
jsmeix commented at 2022-01-18 14:55:¶
Yes, humans - in particular kids - take natural precedence over
machines
and spending time with kids changes leisure time into most meaningful
time.
I never learned more about "life, the universe, and everything" than
with my kids,
cf.
https://en.wikipedia.org/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy
As far as I understand
https://support.system76.com/articles/pop-recovery/
it is not about bare metal disaster recovery because I assume
the Pop!_OS recovery partition is on the same computer as the system
so when the computer gets destroyed the Pop!_OS recovery partition is
lost.
My blind guess about EFISTUB was based on the idea that
perhaps Pop!_OS can be booted by using the plain UEFI firmware
according to the following comment in
usr/share/rear/output/ISO/Linux-i386/260_EFISTUB_populate.sh
# In theory we don't need to have any boot loader for ReaR rescue system,
# since kernel can be loaded directly by UEFI, but not everyone is familiar
# or comfortable with EFI shell.
So perhaps it is sufficient for someone who is familiar with EFI shell
to let ReaR recreate a Pop!_OS without installing its bootloader
and then boot into Pop!_OS for the first time via EFI shell and
in the booted Pop!_OS manually (re-)install its bootloader.
Or perhaps an even simpler workaround:
After "rear recover" in the still runing ReaR recovery system
chroot
into the recreated Pop!_OS (via chroot /mnt/local
)
and manually install the Pop!_OS bootloader, cf. what
usr/share/rear/finalize/default/890_finish_checks.sh
shows when "rear recover" could not install a bootloader
https://github.com/rear/rear/blob/master/usr/share/rear/finalize/default/890_finish_checks.sh
gauvins2 commented at 2022-01-18 15:51:¶
@gauvins2 would need to completely migrate his booting from
systemd-boot
togrub
in order to use ReaR, since to my current knowledge, ReaR does not supportsystemd-boot
.
My conclusion as well. I've configured a recovery USB drive as per POP_OS instructions
[Export of Github issue for rear/rear.]