New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for EFI boot #794
Comments
Modified by joanna on 14 Mar 2014 12:51 UTC |
Modified by joanna on 20 Apr 2014 17:07 UTC |
Comment by anonymous on 22 Oct 2014 19:50 UTC |
Comment by anonymous on 3 Nov 2014 13:56 UTC |
There is progress here, some preliminary code here: https://github.com/marmarek/qubes-installer-qubes-os/tree/efi Currently the problem is with ISO9660 boot format ("El Torito"). It support boot images up to 32MB, our have 56MB (which includes 40MB of initrd.img). How it works
The problem"El Torito" boot catalog structure have 16-bit field for image size (expressed in 512-bytes sectors). This means maximum image size is 32MB. If bigger is used, the field will be silently truncated and only part of the image would be loaded by UEFI firmware. I've found that out looking at hex dump of boot catalog... Then Possible solutionsThe most universal solution would be having smaller But if we fails at it, we can still have EFI compatible USB version. We simply need fixing partition size to match Further steps/problems
|
Some progress has been made:
|
Will other people trying out exactly the same image on their hardware to see what changes be of any assistance? |
I think so :) The image should be treated as untrusted! Test instructions 1:
Possible results:
Tell me which one do you see and continue to "Test instructions 2". Test instructions 2 (continue from the point above):
Possible results:
If you get here, you can try to install the system somewhere (do not override your primary system!). I haven't got that far, installation will probably fail. In such case, note the exact failure. Test instructions 3:
Test instructions 4:Perform test instructions 1-2 using DVD instead of USB stick. |
Untrusted as in 'never boot from untrusted device' or is it just poor wording? |
On Mon, Sep 14, 2015 at 04:25:29PM -0700, Daerdemandt wrote:
Untrusted as it may steal your data, infect everything it touches and Best Regards, |
Regarding that ISO9660/grub/xen.efi problem loading vmlinuz and initrd - using refind instead of grub seems to solve the problem. No need to have separate images for DVD and USB :) |
Regarding hang at efivars initialization, this happens also on Thinpad T430. Relevant xen-devel thread:
There are also patches attached, I'll check whether are available in any stable Xen version, or is the backport feasible. |
Regarding rEFInd/Grub - finally managed to get that working with Grub. When New images, this time built in more trustworthy environment: And bonus - EFI-enabled LIVE image: Any feedback welcome :) |
Problems with the latest EFI Live image:
So, I would say a few regressions from the previous (August) image. |
On Sat, Oct 03, 2015 at 01:18:42AM -0700, Joanna Rutkowska wrote:
Also in legacy mode? In EFI mode initramfs is really limited (32MB
Strange, template is unchanged... I'll look into it. Best Regards, |
Antiplex, I'd recommend the rEFInd image from above with -- efi=attr=uc, except... Marek, is there any update on the possibility of a newer rEFInd version? The problem is the older rEFInd version fails at efibootmgr -c -w -L Qubes -d /dev/sda -p 1 -l \EFI\qubes\shim.efi because efibootmgr is "cowardly refusing to create a boot option". Attempting to create a valid /boot/efi and even a separate /boot and re-running the installer fails because "You have not created a bootloader stage1 target device" and https://bugzilla.redhat.com/show_bug.cgi?id=1010495 is still an open issue. Installing to a different system and copying the entire installation over seems to be getting me the furthest, but I'm stuck because Qubes NetVM doesn't start, throwing a Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory error (presumably as a result of a failed root partition clone, I'm still investigating). I started work on taking the rEFInd EFI directories from the last test image and merging in the R3.1 release but it wouldn't boot at all. Thoughts? Linux hasn't been this difficult to install for more than a decade. :) |
50+ hour mark, it's 2:00 AM PST and I'm giving in for the night, but I'm very close to getting this working on my MacBook Pro 10,1 "Early 2013". Steps - install rEFInd from OS X so the Mac boots to it by default and set refind.conf to scan from all media types, i.e. the default option. Insert stock R3.1 USB key but boot "normally" to reach rEFInd, select the EFI option on the USB key, hit F2 to edit it, and add -- efi=attr=uc. Once reaching graphical Anaconda, ctrl+alt+F2 and edit /usr/lib64/python2.7/site-packages/pyanaconda/bootloader.py and change the raise near line 1696 to a pass (or, just replace all of them :). Then, restart Anaconda with:
Proceed with the installation and you will have everything except a valid xen.cfg, which you will have to build yourself. This is the part I'm getting stuck at, and others have gotten stuck here before as well; what goes in xen.cfg when using an LVM for root= parameters, and/or how do you determine what should go there? The problem is /dev/mapper is empty and booting stops at a dracut shell. I'll fall back to standard partitions next but it would be good to figure this bit out. |
Example xen.cfg: #794 (comment) Regarding empty /dev/mapper - is your disk even discovered there? Check |
This will help installing, even when efibootmgr fails. Because xen.cfg will be already populated. QubesOS/qubes-issues#794
HI Marek - I should also quickly note that the MacBook Pro keyboard does not work in dracut, I have to use an external keyboard but at least that works. There is no fdisk in dracut but I do see /dev/sda4 with TYPE="LVM2_member" from blkid. If I attempt to mount it it fails saying unknown filesystem type 'LMV2_member'. My xen.cfg directly matches above, specifically kernel=vmlinuz-4.1.13-8.pvops.qubes.x86_64 root=/dev/mapper/core3-root vconsole.font=latarcyrheb-sun16 rd.lvm.lv=core3/root but because /dev/mapper is empty I don't know where the name core3-root would come from. I see no path forward with LVM as much as it seems like it would e a better choice so I will re-perform the steps from my last comment as well as your change in commit 2556a42 and see what I get. Thanks! |
For LVM - run Best Regards, |
Marek, unfortunately none of those tools exist in dracut. As I indicated I opted to try again with standard partitioning but it's almost the same problem, now it's unknown filesystem type 'crypto_LUKS'. I'm beginning to believe I have the wrong initramfs. Should that have been generated during installation and placed somewhere? |
If there is no Best Regards, |
OK, this is likely the last update from me in this thread, and thankfully it's for a good reason - I finally have everything booting, with LVM, and even with LUKS! The problem was definitely an incorrect initramfs; after the install completed I failed to copy the file to the correct /EFI/qubes location and thus I was using a bad copy. I had additional problems because the suggested xen.cfg configuration did not work as I had no core3-root (and have no idea how something would be named like that), but simply adding root=/dev/dm-1 with no rd.lvm.ld specified worked fine and I was able to see the post-install welcome configuration wizard for the first time. My luck changed after that as I have a 14e4:4331 BCM4331 wireless adapter that hard-freezes the system as soon as netvm is started with that device included. I've tried the /etc/systemd/system/qubes-pre-netvm.service permissive mode change as identified in the issue described at #1261 and I've even (painfully) copied in firmware and re-run the b43-fwcutter tool but unfortunately any attempt at normal networking hard locks the system. Because a MacBook Pro of this era has no network port this means I have no networking at all unless I violate dom0 with a USB network adapter. These problems probably belong in the other thread but I wanted to extend my thanks to Marek for the help along the way, and I hope my notes in this history help someone else in the future. |
Adding -- efi=attr=uc to the boot options in refind lets me boot into the installer on my lenovo yoga 2 pro. After installation adding efi=attr=uc to the options lines in /EFI/qubes/xen.cfg on the first partition results in a bootable system. Things seem to work fine after that. (Well, KDE doesn't like HiDPI displays, but I can work around that.) Thanks dwangoac & marmarek |
hmmm... still unsure if using rEFInd was repeatedly recommended to be used in order to fix such EFI-related problems but i'm lacking some sort of understanding about how to apply rEFInd. can anyone help me out with a short step-by-step description of what to boot/load/copy/... when? cheers, anti |
I think these images from marmarek contain Qubes with rEFInd instead of GRUB to overcome the issues.
I personally made a USB 3.0 stick from the ISO using dd and tried to do UEFI boot, but it failed for the same reason as the official 3.1 does. Hangs on "EFI Variables Facility..." line. See my bugreport referenced by marmarek 3 days ago. I did not try "/mapbs /noexitboot", because it was not possible. I tried it on official 3.1 GRUB2 boot, but with no change. Marmarek says its a vendor, or Xen bug, but it does not affect Fedora 23 respin. I can do UEFI boot on it. I think there is no hope for my HP Probook 4730s to do UEFI boot for Qubes 3.1, I will have to get by using Legacy BIOS. |
@slazer Thanks for pointing me to these ISO's, i must somehow have overseen those ;( I've come across the hang on well... now i tried to use marmarek's rEFInd version but failed to see how i could modify the boot-menu entries (to try different options/combinations of |
I waneed to thank everyone for input here! I know tail end was mostly regarding Mac's but had some MAJOR hiccups first time installing Qubes 3.1 and this thread lead me down some good roads! I did want to chime in with my own general observations regarding some of the EFI and freezing. I mean not sure of EFI specific, but I decided to work my way forward, installed R2. Started upgrading templates etc, working my forward to kind of "shade tree" upgrade / troubleshoot (maybe a stretch being first time Linux user, upgrading borderline Legacy/UEFU aged windows 8 machine). So I made a snap judgement to try newest stable Qubes Kernel 3.19 via console and was running semi solid loading in then BANG! Freeze on boot, lockup after initial extended login. I rolled back to early kernel (worked fine) the kernel (3.19.018) I researched and found some similar issues in Fedora Git hub and was apparently pretty common. There were numerous issues with 3.19 causing lock up and freeze (usb related) right after initial login in or during OS initial loading after user login. I'm going to work my way forward version by version until I do more research, but you might try a different kernel version? I was seeing that 3.19.030 had some luck, but it seems that in general 3.19 had some pretty unhappy customers. |
You can try the other kernel that Qubes should ship with; edit your xen.cfg to have dom0 use the 4.1.13-pvops kernel instead of 3.19. |
No good on either, can't even load OS. The only kernel I've got
|
I did get it to install 3.0, working on updates and kernel now
|
Please, where could I download any of these?
I would like to test any of these, as it might have solved my issue. I am able to compile stuff, though some advice, links or tutorials might come in handy. |
There are no new images yet. You can build one yourself - instructions here: Also watch Fedora 23 dom0 - there will be links for test images when available. |
My comprehensive comment got wiped after Vivaldi crash, so I will be short. Just compiled the master branch of marmarek, but the boot still hangs on "EFI Variables Facility..." line like before. The UEFI troubleshooting nor rEFInd did not help. As soon as the fedora-23 branch at installer-qubes-os gets merged with master, I can recompile the master branch with I wonder what I can expect from fc23 in dom0, instead of fc20 like in Qubes3.1. Given the fact it is a |
On Sun, Apr 10, 2016 at 05:24:20PM -0700, Martin Páleník wrote:
I wouldn't expect much from that. The hang on "EFI Variables
Yes ;) Best Regards, |
After tl; dr other 6/8 of all these discussions, all I can say is that I confirm that release Qubes .iso dd -ed to USB and ran in strict UEFI mode without CSM crap their pants on my HP UEFI GPT notebook too (Intel i5/HM77express+AMD powered main GPU. BIOS is H20 Insyde (anyway, in CSM it can start the installation). Just wanna say something is not yet mature here. Not nearly. Cheers to the dear devs. I will contrib as much as I gather insight. M. |
For those attempting to install via USB on a MacBook, you can remove the ESP flag on your USB with GParted, mount the prior ESP, and rename the |
Installed 3.2 on Dell Lattitude E6320. I had the same experience as ManoftheSea. I stucked at the penguins with efi and esrt error messages: The usb device for qubes installation loaded and checked the files. Great project guys (and girls). |
Reported by marmarek on 4 Feb 2014 02:53 UTC
EFI is more and more popular, soon there will be some machines with EFI-only boot, so we need badly support for it.
Adding such support may be non-trivial, because Xen 4.1 do not support direct EFI boot (AFAIR it is supported in >=4.2 or even >=4.3). But perhaps some workaround like grub-efi can be used.
Migrated-From: https://wiki.qubes-os.org/ticket/794
The text was updated successfully, but these errors were encountered: