So after having to get one laptop to boot on UEFI I got to make the Latitude work with that as well, if anything, as a point of pride. Last time I was able to get Windows booting as UEFI but I ended up using GRUB 2 with the legacy BIOS booting instead of UEFI for Linux, and promisd myself to find a way to set this up before.
Well, after the comments on my previous post I made sure to update my copy of SysRescueCD, as I only had a version 2.x on my USB key the other day, and that does not support EFI booting — but the new version (3.0) actually supports it out of the box, which makes it much easier, as I no longer need the EFI shell to boot an EFI stub kernel. To be precise, there also no need to use EFI stub, if not to help in recovery situations.
So, after booting into SysRescueCD, I zeroed out the Master Boot Record (to remove the old-style GRUB setup), re-typed the first partition to EF00 — it was set to EF02 which is what GRUB2 uses to install its modules on non-EFI systems), and formatted it to vfat, then… I chrooted into the second partition (which is my Gentoo Linux’s root partition), rebuilt GRUB2 to support efi-64, and just used grub2-install
. Done!
Yes, the new SysRescueCD makes it absolutely piece of cake. And now I actually disabled the non-UEFI booting of that laptop and, not sure if it’s just my impression, though, it feels like it’s actually a second or two faster.
Still on the UEFI topic, turns out that Fabio ordered the same laptop I got (and I’m writing from right now), which means that soon Sabayon will have to support UEFI booting. On the other hand, I got Gentoo working fine on this laptop and the battery life is great, s I’m not complaining about it too much. I’ll actually write something about the laptop and how it feels soon, but tonight, I’m just too tired for it.
Hi Diego, can you post your /boot/efi/EFI directory ?Also, can you post the grub2-install command that you ran ?I would like to know where Grub2 installed all his stuff when you ran grub2-install ?I suspect that it uses the /boot/efi/EFI/GRUB2 but I’m not sure, since I cannot try UEFI on my current box.Thanks
Within the EFI system partition (which is indeed mounted as @/boot/efi@), I only have one file: @/EFI/gentoo/grubx64.efi@, that is all.The installation files have been put in @/boot/grub2@ exactly as before, actually to the side of the @i386-pc@ platform which I now need to remove I suppose.And here was the command I ran: @grub2-install –efi-directory=/boot/efi /dev/sda@ (it’s the same for both laptops).
Hi Diego, that’s really nice :PCan you mount your /boot/efi partition and post this command :# efibootmgrI would like to see how Grub2 declare your grubx64.efi :PFinally, I suspect that your /boot/grub2/grub.cfg is now somewhere inside your /boot/efi/?Because I think that Grub2 now has all of his config from /boot/efi instead of /boot/Did you find any grub.cfg file inside your /boot/efi ?Thanks 😛
All the stuff get installed in @/boot/grub2@ as I said on the other comment, _including_ the @grub.cfg@ file — the only thing that is installed in @/boot/efi/EFI@ is @/boot/efi/EFI/gentoo/gentoox64.efi@ which seems to be a 120KiB launcher for the real GRUB code (which can then load everything else from ext4).It probably could have been different if I had my rootfs over LVM and not split /boot — but I didn’t want to go there to begin with, on a laptop.As for the @efibootmgr@ output:<typo:code>Boot0005* gentoo HD(1,800,64000,08fba7fc-bae9-43dd-8842-298beb809665)File(EFIgentoogrubx64.efi)Boot0007* Windows Boot Manager HD(1,800,32000,ba0637ed-2ab2-43a3-a8d0-7751bde4e751)File(EFIMicrosoftBootbootmgfw.efi)WINDOWS………x…B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}…a…………….</typo:code>
Do test the grub.cfg stuff, I think that the best way is to install a new kernel and then run this command :# grub2-mkconfig -o /boot/grub2/grub.cfgWhen you reboot, if you don’t see the new entry, then try this :# grub2-mkconfig -o /boot/efi/EFI/gentoo/grub.cfg
I’m not guessing, I’m sure of what I’m saying. I changed the settings on my kernel twice already after install, and the file I’m re-generating is @/boot/grub2/grub.cfg@ for sure, and it works.
Thanks for the info, I’m gonna update my wiki 😛
Hi,Some weeks ago I tried getting UEFI to work on my lenovo thinkpad and really got confused with all the guides out there and made a royal mess of it. My laptop wouldn’t boot and I had no way of reverting back to legacy BIOS. I really panicked, thinking I’d broken my laptop for good. Well, I did get UEFI to work in the end, and it was rather simple. This thread documents my experiences somewhat: http://forums.gentoo.org/vi…
I do trust all the ideas you’ve introduced on your post.They’re very convincing and will definitely work. Nonetheless,the posts are too brief for novices. Could you please lengthen them a bit from next time?Thanks for the post.