qubes-doc/troubleshooting/uefi-troubleshooting.md

76 lines
3.5 KiB
Markdown
Raw Normal View History

2016-03-05 18:12:01 -05:00
---
layout: doc
title: UEFI Troubleshooting
permalink: /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
2016-03-05 18:12:01 -05:00
---------------------
There is some [common bug in UEFI implementation](http://xen.markmail.org/message/f6lx2ab4o2fch35r), affecting mostly Lenovo systems, but probably some others too. You can try existing workaround:
01. In GRUB menu<sup id="a1-1">[1](#f1)</sup>, select "Troubleshoot", then "Boot from device", then press `e`.
2016-06-08 11:32:49 -04:00
02. At the end of `chainloader` line add `/mapbs /noexitboot`.
03. Perform installation normally, but not reboot system at the end yet.
04. Go to `tty2` (Ctrl-Alt-F2).
05. Enable `/mapbs /noexitboot` on just installed system. This step differs between Qubes releases:
2016-06-08 11:32:49 -04:00
**For Qubes 3.1:**
2016-03-05 18:12:01 -05:00
2016-06-08 11:32:49 -04:00
06. Execute `mount | grep boot/efi` and note device name (first column). It should be something like `/dev/sda1`.
07. Execute `efibootmgr -v`, search for `Qubes` entry and note its number (it should be something like `Boot0001` - `0001` is an entry number).
08. Replace existing `Qubes` entry with modified one. Replace `XXXX` with entry number from previous step, `/dev/sda` with your disk name and `-p 1` with `/boot/efi` partition number):
2016-03-05 18:12:01 -05:00
2016-06-08 11:32:49 -04:00
efibootmgr -b XXXX -B
efibootmgr -v -c -u -L Qubes -l /EFI/qubes/xen.efi -d /dev/sda -p 1 "placeholder /mapbs /noexitboot"
09. 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/sda1` or `/dev/nvme0n1p1` or whatever is your EFI partition instead of `/dev/sda` and `-p 1`.
2016-06-08 11:32:49 -04:00
10. Now you can reboot the system by issuing `reboot` command.
2016-06-08 11:32:49 -04:00
**For Qubes 3.2 or later:**
2016-06-08 11:32:49 -04:00
11. Edit `/mnt/sysimage/boot/efi/EFI/qubes/xen.cfg` (you can use `vi` editor) and add to every kernel section:
2016-06-08 11:32:49 -04:00
mapbs=1
noexitboot=1
**Note:** 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).
2016-06-08 11:32:49 -04:00
12. Now you can reboot the system by issuing `reboot` command.
2016-03-05 18:12:01 -05:00
System crash/restart when booting installer
-------------------------------------------
Some Dell systems and probably others have [another bug in UEFI firmware](http://markmail.org/message/amw5336otwhdxi76). And there is another workaround for it:
2016-05-18 09:51:02 -04:00
1. In GRUB menu<sup id="a1-2">[1](#f1)</sup> press `e`.
2016-03-05 18:12:01 -05:00
2. At the end of `chainloader` line add `-- efi=attr=uc`.
3. Perform installation normally, but not reboot system at the end yet.
4. Go to `tty2` (Ctrl-Alt-F2).
5. Execute:
2016-11-25 02:43:00 -05:00
sed -i -e 's/^options=.*/\0 efi=attr=uc/' /mnt/sysimage/boot/efi/qubes/xen.cfg
2016-03-05 18:12:01 -05:00
6. Now you can reboot the system by issuing `reboot` command.
2016-05-18 09:51:02 -04:00
* * *
<b name="f1">1</b> If you use rEFInd, you can see 3 options regarding the USB installer. Choose "Fallback Boot Loader" to enter the GRUB menu. [](#a1-1) [](#a1-2)