PDA

View Full Version : rebuild grub-efi



Japplo
30th November 2012, 12:33 AM
Hi guys,

I've changed my grub configuration. How can I rebuild and install it?

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install --boot-directory=/boot /dev/sda --no-floppy

works, but I'm using grub-efi.

Thanks japplo

R3v0lut10nary
30th November 2012, 02:35 AM
As far as I know you don't rebuild grub when using efi. The efi bootloader is an executable stored in the EFI system partition, typically /boot/efi/EFI.

To manage your boot order etc you would use the command -


# efibootmgr

The best information I've been able to get regarding EFI is from Rod Smith's rEFInd (http://www.rodsbooks.com/refind/) page.

AdamW
30th November 2012, 07:05 AM
edit: I think I misread the question.

GoinEasy9
30th November 2012, 08:15 AM
If you changed your grub configuration, and you installed under UEFI, using "grub2-mkconfig -o /boot/grub2/grub.cfg" will update your grub. There's no special grub update command for EFI installed systems.

Has anyone tried a clean install to a UEFI motherboard yet? (Note: I'm stating UEFI not Secure Boot.) I've been waiting for the Grub2 version in F18. I'm also wondering how well FedUp would work if upgrading an F17 legacy grub EFI install to a grub2 EFI install.

fpmurphy
30th November 2012, 02:07 PM
Has anyone tried a clean install to a UEFI motherboard yet? (Note: I'm stating UEFI not Secure Boot.)

There is no difference between UEFI and Secure Boot as far as installation is concerned. Secure Boot is simply UEFI 2.3.1 with enforced policy regarding what PE/COFF images can be loaded based on the contents of the db (permitted) and dbx (forbidden) authenticated variables (which contain either X.509 certificates or hashes).

Japplo
30th November 2012, 08:21 PM
The file /boot/grub2/grub.cfg does not exist. I tried:


grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

and now I see a Ubuntu boot entry, but it does not start, and since I've run this command, I see some penguins after the grub boot menu :C

GoinEasy9
30th November 2012, 11:18 PM
I haven't installed F18 to a UEFI machine yet, so I can't look to see what files are in the /boot folders. I run F17 in UEFI mode and it still uses legacy grub.

You can run "efibootmgr" as root and it will tell you what you have installed in EFI mode.

My F18 install has a /boot/grub2/grub.cfg, as I assume all other installs of F18 have. I can't tell you why your's doesn't.

Japplo
1st December 2012, 12:09 AM
With F17 and legancy grub, i was able to start Fedora and on my second HDD Windows and Ubuntu without problems (all installed in UEFI Mode).
But now in F18, grub2 is buggy....
I think the /boot/grub2/grub.cfg file is not necessary with grub-efi. I have a clean F18 Beta Installation without that file...

GoinEasy9
1st December 2012, 12:33 AM
Interesting, I guess I'll have to keep an eye out when I do the install to the UEFI machine. I've been waiting for the grub2-efi version for a while.

srs5694
1st December 2012, 01:36 AM
You can always install another boot loader. Several are available, (http://www.rodsbooks.com/efi-bootloaders/) although most require manual maintenance when you upgrade kernels. One that doesn't (necessarily) is my own rEFInd, (http://www.rodsbooks.com/refind/) although to work best, you'll need to set things up so that your kernels can be read from the EFI. That means storing your kernels on a FAT, ext2fs, ext3fs, ReiserFS, or HFS+ partition, and if you use anything but FAT (or HFS+ on a Mac), you'll need to install EFI drivers for same. Unless things have changed with Fedora 18, the standard Fedora installation that places /boot on a separate partition works well for this, except that you need to change the filesystem used on /boot from ext4fs to something else. See rEFInd's Linux documentation (http://www.rodsbooks.com/refind/linux.html) for more information.

AdamW
1st December 2012, 02:23 AM
japplo: I'm not sure why you're wanting to chainload Ubuntu from Fedora if you're on a UEFI setup. I'd expect Fedora, Windows and Ubuntu each to have an entry in the EFI boot manager, and you can just boot any one of them directly. Or am I misreading your post?

R3v0lut10nary
1st December 2012, 03:04 AM
japplo: I'm not sure why you're wanting to chainload Ubuntu from Fedora if you're on a UEFI setup. I'd expect Fedora, Windows and Ubuntu each to have an entry in the EFI boot manager, and you can just boot any one of them directly. Or am I misreading your post?

I think you're right, and that's what I was trying to say. Ubuntu and Fedora are both good at handling this stuff for you at installation. A folder is placed in the EFI system partition (/boot/efi/EFI) with the respective .efi binaries.

Also, I can say that Rod's rEFInd boot manager is excellent and very easy to use. I went from having no clue what to do with EFI to a functional boot manager in 10 minutes.

Thanks, Rod. :thumb:

Japplo
2nd December 2012, 01:22 PM
japplo: I'm not sure why you're wanting to chainload Ubuntu from Fedora if you're on a UEFI setup. I'd expect Fedora, Windows and Ubuntu each to have an entry in the EFI boot manager, and you can just boot any one of them directly. Or am I misreading your post?

Adam you are right, but the reason why I'm asking is, that I can't configure a timeout on the EFI boot manager.

rtguille
2nd December 2012, 04:01 PM
I am still using bios, so i never tested this.

Man efibootmgr



-t | --timeout seconds
Boot Manager timeout, in seconds.
-T | --delete-timeout
Delete Timeout variable.

did you tried it?

Japplo
2nd December 2012, 04:35 PM
I am still using bios, so i never tested this.

Man efibootmgr

did you tried it?

yes I tried it, but it doens't work. The boot manager only appea's, when I enter F12.

rtguille
2nd December 2012, 05:00 PM
What mobo are you using?

AdamW
3rd December 2012, 04:45 AM
you might find more help with this on a motherboard forum, as it's not at all OS-specific. they may have more help for your particular firmware.