5.7 KiB
| layout | title | permalink |
|---|---|---|
| doc | UEFI Troubleshooting | /doc/uefi-troubleshooting/ |
Troubleshooting UEFI related problems
Cannot start installation, installation completes successfully but then BIOS loops at boot device selection, hangs at four penguins after choosing "Test media and install Qubes OS" in GRUB menu
There is some common bug in UEFI implementation, affecting mostly Lenovo systems, but probably some others too. You can try existing workaround:
-
In GRUB menu1, select "Troubleshoot", then "Boot from device", then press
e. -
At the end of
chainloaderline add/mapbs /noexitboot. -
Perform installation normally, but not reboot system at the end yet.
-
Go to
tty2(Ctrl-Alt-F2). -
Enable
/mapbs /noexitbooton just installed system. This step differs between Qubes releases:For Qubes 3.1:
-
Execute
mount | grep boot/efiand note device name (first column). It should be something like/dev/sda1. -
Execute
efibootmgr -v, search forQubesentry and note its number (it should be something likeBoot0001-0001is an entry number). -
Replace existing
Qubesentry with modified one. ReplaceXXXXwith entry number from previous step,/dev/sdawith your disk name and-p 1with/boot/efipartition number):efibootmgr -b XXXX -B efibootmgr -v -c -u -L Qubes -l /EFI/qubes/xen.efi -d /dev/sda -p 1 "placeholder /mapbs /noexitboot" -
Compare new entry with the old one (printed in step 6) - it should only differ in additional options at the end, and look probably something like this:
Boot0001* Qubes HD(1,GPT,partition-guid-here,0x800,0x64000)/File(\EFI\qubes\xen.efi)p.l.a.c.e.h.o.l.d.e.r. ./.m.a.p.b.s. ./.n.o.e.x.i.t.b.o.o.t.If instead it looks like:
Boot0001* Qubes HD(1,0,00000000...0,0x0,0x0)/File(\EFI\qubes\xen.efi)p.l.a.c.e.h.o.l.d.e.r. ./.m.a.p.b.s. ./.n.o.e.x.i.t.b.o.o.t.then try passing
/dev/sda1or/dev/nvme0n1p1or whatever is your EFI partition instead of/dev/sdaand-p 1. -
Now you can reboot the system by issuing
rebootcommand.For Qubes 3.2 or later:
-
Edit
/mnt/sysimage/boot/efi/EFI/qubes/xen.cfg(you can usevieditor) and add to every kernel section:mapbs=1 noexitboot=1Note: You must add these parameters on two separate new lines (one paramater on each line) at the end of each section that includes a kernel line (i.e., all sections except the first one, since it doesn't have a kernel line).
-
Now you can reboot the system by issuing
rebootcommand.
System crash/restart when booting installer
Some Dell systems and probably others have another bug in UEFI firmware. And there is another workaround for it:
-
In GRUB menu1 press
e. -
At the end of
chainloaderline add-- efi=attr=uc. -
Perform installation normally, but not reboot system at the end yet.
-
Go to
tty2(Ctrl-Alt-F2). -
Execute:
sed -i -e 's/^options=.*/\0 efi=attr=uc/' /mnt/sysimage/boot/efi/qubes/xen.cfgor if you're installing 3.2 execute:
sed -i -e 's/^options=.*/\0 efi=attr=uc/' /mnt/sysimage/boot/efi/EFI/qubes/xen.cfg -
Now you can reboot the system by issuing
rebootcommand.
1 If you use rEFInd, you can see 3 options regarding the USB installer. Choose "Fallback Boot Loader" to enter the GRUB menu. ↩ ↩
Boot device not recognized after installing
Some firmware will not recognize the default Qubes EFI configuration. As such, it will have to be manually edited to be bootable (this will need to be done after every kernel and Xen update.)
- Copy
/boot/efi/EFI/qubes/to/boot/efi/EFI/BOOT/. - Rename
/boot/efi/EFI/BOOT/xen.efito/boot/efi/EFI/BOOT/BOOTX64.efi. - Rename
/boot/efi/EFI/BOOT/xen.cfgto/boot/efi/EFI/BOOT/BOOTX64.cfg.
Installation finished but "Qubes" boot option is missing and xen.cfg is empty
In some cases installer fails to finish EFI setup and leave the system without
Qubes-specific EFI configuration. In such a case you need to finish those parts
manually. You can do that just after installation (switch to tty2 with
Ctrl-Alt-F2), or booting from installation media in "Rescue a Qubes system" mode.
-
Examine
/boot/efi/EFI/qubes(if using Qubes installation media, it's in/mnt/sysimage/boot/efi/EFI/qubes). You should see there 4 files:- xen.cfg (empty, size 0)
- xen-(xen-version).efi
- vmlinuz-(kernel-version)
- initramfs-(kernel-version).img
-
Copy
xen-(xen-version).efitoxen.efi:cd /mnt/sysimage/boot/efi/EFI/qubes cp xen-*.efi xen.efi -
Create xen.cfg with this content (adjust kernel version, and filesystem locations, below values are based on default installation of Qubes 3.2):
[global] default=4.4.14-11.pvops.qubes.x86_64 [4.4.14-11.pvops.qubes.x86_64] options=loglvl=all dom0_mem=min:1024M dom0_mem=max:4096M kernel=vmlinuz-4.4.14-11.pvops.qubes.x86_64 root=/dev/mapper/qubes_dom0-root rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap i915.preliminary_hw_support=1 rhgb quiet ramdisk=initramfs-4.4.14-11.pvops.qubes.x86_64.img -
Create boot entry in EFI firmware (replace
/dev/sdawith your disk name and-p 1with/boot/efipartition number):efibootmgr -v -c -u -L Qubes -l /EFI/qubes/xen.efi -d /dev/sda -p 1 "placeholder /mapbs /noexitboot"