
FastTurtle ... the efi executable needn't be on an ESP or partition marked as EF00, Apple for instance stores their EFI loader in /System/Library/CoreServices/ on the OS partition. The EFI specification uses {ESP}/efi/boot/boot{x64,ia32}.efi as the default but you can modify efivars to point to wherever the efi executable is located.FastTurtle wrote:What I'm thinking was the problem was that the /boot was labeled as Linux (8300) instead of the needed ef00 for an ESP so any information would be appreciated.
Code: Select all
# modprobe efivars
# efibootmgr -v
BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0000
Boot0000* rEFInd HD(1,28,64000,a5d32078-64a7-4c13-a0f1-1286c2f6422b)File(\efi\refind\refind_ia32.efi)Code: Select all
# efibootmgr --create --part 1 --label "rEFInd" --loader "\efi\refind\refind_ia32.efi"Using a bootmanager (like rEFInd) means that when updating a kernel no changes to efivars are required. rEFInd will search the hardisk looking for efi executables and offer them as boot options (so, in my case I simply add the new kernel to {ESP}/vmlinuz-{version}.efi and the next boot this is offered as the first available ... as it uses modification time to order them). rEFInd can also be supplied a 'refind_linux.conf' with boot parameters, (so no changes to the config file are needed) or configured to search/load/offer, kernels in a certain place (obviously having rEFInd autodetect and offer them is generally preferable to editing the config on the addition of new kernels). So, in short using a boot manager simplifies the whole process of updating, booting efi_stub/kernels, and selecting boot parameters. While you needn't use one,using a bootmanager is more flexable (also when not using a bootmanager you'd need to add boot parameters to the kernel itself in menuconfig, and there is no method of changing/modifying them at boot time).FastTurtle wrote:Another thing is that I'm seeing lots of efi_stub kernels that use one of the efi packages such as refind in place of grub. Links appreciated on how to configure such to show now only various gentoo but a Win7-64 kernel (Yes! it's efi aware as you can install on a Mac).
Code: Select all
"Boot softlevel default" "quiet ro nopat threadirqs video.use_native_backlight=1 rootfstype=ext4 luks enc_root=/dev/sda2 lvm root=/dev/mapper/vg-root swsusp resume=/dev/mapper/vg-swap"
"Boot softlevel online" "quiet ro nopat threadirqs video.use_native_backlight=1 rootfstype=ext4 luks enc_root=/dev/sda2 lvm root=/dev/mapper/vg-root swsusp resume=/dev/mapper/vg-swap softlevel=online"
"Boot softlevel single" "quiet ro nopat threadirqs video.use_native_backlight=1 rootfstype=ext4 luks enc_root=/dev/sda2 lvm root=/dev/mapper/vg-root swsusp resume=/dev/mapper/vg-swap softlevel=single"
Code: Select all
tube ~ # gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.10
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/sda: 500118192 sectors, 238.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): FD999B21-5639-44BD-BE36-AC0E264ACBFC
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 500118158
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 8191 3.0 MiB EF02 biosboot
2 8192 1032191 500.0 MiB 8300 boot
3 1032192 500118158 238.0 GiB 8300 root
This is true when booting in BIOS/CSM/legacy mode from a GPT disk; but in EFI/UEFI mode, this partition will be useless. FastTurtle implies that s/he is booting in EFI mode, but the error message from GRUB might indicate a BIOS-mode version of GRUB. (The exact error message would be useful in making this determination. General tip: Don't summarize error messages; quote them exactly.)vaxbrat wrote:Grub2 wants an EF02 partition number.
The precise size required for the BIOS Boot Partition varies depending on your GRUB version and what features you're using. It can be as small as about 30KiB (I'm unsure of the precise lower limit). In most cases, 1MiB is big enough, and most automated tools create the partition at that size. I've seen claims from some people that 1MiB has been insufficient for them, and these people have gone as large as 2MiB. I have yet to see claims that it needs to be bigger than that, although I have seen posts from people who've created larger BIOS Boot Partitions. Doing so is a waste of disk space, but AFAIK does no other damage.I think it only really needs 2mb as a bare minimum.
srs5694 ... hmmm, so I was wrong above? I ask because Apple's diskutils creates an ESP but the OS doesn't use it, the actual efi executable is stored on the OS partition. At least this was the case the last I looked, which admittedly is some many years ago.srs5694 wrote:[...] in EFI mode. In that case, a FAT EFI System Partition (ESP) must be present, and it must hold boot program(s) such as GRUB, rEFInd, the Windows boot loader, etc.
Yes and no. Apple, like Microsoft, often plays fast and loose with the rules. In the case of EFI, Apple deviates in significant ways on many levels, and one of these is on the role of the ESP and where boot loaders reside; EFI's ESP is normally empty, and its boot loader lives on the OS X root (/) partition. Apple can do this because they include an HFS+ driver in their EFI implementation. (This doesn't actually violate the EFI spec, but it is a non-standard extension, and so is something that programs and users should not assume is present.) Apple also modifies the boot process so that the usual EFI NVRAM boot manager isn't quite the same as it is on more normal implementations.khayyam wrote:srs5694 ... hmmm, so I was wrong above? I ask because Apple's diskutils creates an ESP but the OS doesn't use it, the actual efi executable is stored on the OS partition. At least this was the case the last I looked, which admittedly is some many years ago.srs5694 wrote:[...] in EFI mode. In that case, a FAT EFI System Partition (ESP) must be present, and it must hold boot program(s) such as GRUB, rEFInd, the Windows boot loader, etc.
Code: Select all
/dev/sda
1 2048 976895 476.0 MiB EF00 ESI (EFI drive, FAT32)
2 976896 8790015 3.7 GiB 8200 primary (linux swap)
3 8790016 156301311 70.3 GiB 0700 primary (linux system)
/dev/sdb
1 2048 264191 128.0 MiB 0C01 Microsoft reserved (?, automaticaly created by windows installer)
2 264192 409602047 195.2 GiB 0700 Basic data partition (windows files)
3 409602048 1953525134 736.2 GiB 8300 Linux filesystem (/home partition)



