Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
efibootmgr cannot boot (solved, efi was 32bit)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
babagau
n00b
n00b


Joined: 04 May 2021
Posts: 22
Location: Volos, Greece

PostPosted: Wed May 26, 2021 10:39 am    Post subject: efibootmgr cannot boot (solved, efi was 32bit) Reply with quote

Hello, I have a kernel compiled but I can't boot it. I am constantly working by mounting the drive where gentoo will grow up and chrooting there from usb stick. I installed stage3 and have emerge and various other utils working. I try to do it without a bootloader, with efibootmgr, and without initramfs. Whenever I reboot I have this light blue screen with the blinking question mark folder on the Macbook2.1. On the internal disk, there already pre exists esp created years ago by debian. The debian root partition was resized to make place for a gentoo partition. The resizing messed it and it seems unbootable, but we don't mind. The debian entry in the esp is booted ok by efibootmgr. What we cannot boot is the efi/boot entry labeled "gentoo". Next thing I plan to do is study the minimal installation gentoo usb boot mechanism as it boots successfully but I am bored going through this all alone. Here is the info gathered, concatenated from terminal in a txt file and uploaded from another machine, I hope the style is ok for humans:...

dmesg|grep Apple |head -n2
Code:
[ 0.000000] efi: EFI v1.10 by Apple
[ 0.000000] DMI: Apple Inc. MacBook2,1/Mac-F4208CA9, BIOS MB21.88Z.00A5.B07.0706270922 06/27/07

parted /dev/sda print
Code:
Model: ATA Samsung SSD 850 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: Number Start End Size File system Name Flags 1 20.5kB 210MB 210MB fat32 EFI System Partition boot, esp 2 211MB 220GB 220GB ext4 msftdata 3 220GB 226GB 6442MB linux-swap(v1) swap 4 226GB 250GB 23.6GB ext4

efibootmgr -v
Code:
BootCurrent: 0000 Timeout: 5 seconds
BootOrder: 0000,0080,0081,0082
Boot0000* gentoo HD(1,GPT,74200b2d-12a6-441c-b881-6e2187aee8d7,0x28,0x64000)/File(\EFI\boot\bootx64.efi)
Boot0080* Mac OS X PciRoot(0x0)/Pci(0x1f,0x2)/Sata(2,0,0)/HD(2,GPT,a3aa6c59-7665-4340-8ad7-e4852d10f86a,
0x64028,0x9375940)
Boot0081* Mac OS X PciRoot(0x0)/Pci(0x1f,0x2)/Sata(2,0,0)/HD(1,GPT,00003f43-72df-0000-6770-000079580000,
0x28,0x64000)/File(\EFI\APPLE\FIRMWARE\EfiUpdaterApp2.efi)".-.x. .e.f.i.-.a.p.p.l.e.-.p.a.y.l.o.a.d.0.-.d.a.t.a."...
Boot0082* PciRoot(0x0)/Pci(0x1f,0x2)/Sata(2,0,0)/HD(2,GPT,707d79fb-3bd6-4c92-878d-ced2e00ba4dc,
0x64028,0x1cfeba00)
BootFFFF* PciRoot(0x0)/Pci(0x1d,0x1)/USB(0,0)/HD(2,MBR,0x9c60b,0x39def800,0x596800)/File(\EFI\BOOT\BOOTIA32.efi)

ls /sys/firmware/efi/efivars/
Code:
AAPL,PathProperties0000-4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14
AcpiGlobalVariable-af9ffd67-ec10-488a-9dfc-6cbf5ee22c2e
Boot0000-8be4df61-93ca-11d2-aa0d-00e098032b8c
Boot0082-8be4df61-93ca-11d2-aa0d-00e098032b8c
BootCampHD-7c436110-ab2a-4bbb-a880-fe41995c9f82
BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c
BootFFFF-8be4df61-93ca-11d2-aa0d-00e098032b8c
BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c
ConOut-8be4df61-93ca-11d2-aa0d-00e098032b8c
ConOutDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
ErrOutDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
FirmwareFeatures-4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14
FirmwareFeaturesMask-4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14
Lang-8be4df61-93ca-11d2-aa0d-00e098032b8c
LangCodes-8be4df61-93ca-11d2-aa0d-00e098032b8c
MTC-eb704011-1402-11d3-8e77-00a0c969723b
MemoryTypeInformation-4c19049f-4137-4dd3-9c10-8b97a83ffdfa
Setup-4dfbbaab-1392-4fde-abb8-c41cc5ad7d5d
SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82
Timeout-8be4df61-93ca-11d2-aa0d-00e098032b8c
aht-results-7c436110-ab2a-4bbb-a880-fe41995c9f82
backlight-level-7c436110-ab2a-4bbb-a880-fe41995c9f82
boot-args-7c436110-ab2a-4bbb-a880-fe41995c9f82
boot-gamma-7c436110-ab2a-4bbb-a880-fe41995c9f82
boot-image-7c436110-ab2a-4bbb-a880-fe41995c9f82
current-network-36c28ab5-6566-4c50-9ebd-cbb920f83843
efi-apple-payload0-7c436110-ab2a-4bbb-a880-fe41995c9f82
efi-apple-payload0-data-7c436110-ab2a-4bbb-a880-fe41995c9f82
efi-boot-device-7c436110-ab2a-4bbb-a880-fe41995c9f82
efi-boot-device-data-7c436110-ab2a-4bbb-a880-fe41995c9f82
fmm-computer-name-7c436110-ab2a-4bbb-a880-fe41995c9f82
fmm-mobileme-token-FMM-7c436110-ab2a-4bbb-a880-fe41995c9f82
platform-uuid-7c436110-ab2a-4bbb-a880-fe41995c9f82
prev-lang:kbd-7c436110-ab2a-4bbb-a880-fe41995c9f82

# /etc/fstab: static file system information.
Code:
efivarfs            /sys/firmware/efi/efivars   efivarfs   rw,nosuid,nodev,noexec,relatime      0 0
UUID=70D6-1701                  /boot      vfat      noauto,noatime            0 2
UUID=a95b5af2-0002-41b1-8905-59ff5821d4d7      /      ext4      noatime               0 1
UUID=be8198a7-60ac-4640-b472-9da9cc580e43    none          swap          sw                   0 0
/dev/sr0                  /mnt/cdrom   auto      noauto,user            0 0

cat /usr/src/linux/.config | grep root=
Code:
CONFIG_CMDLINE="root=/dev/sda4"


cat /usr/src/linux/.config | grep -i apple_prop
Code:
CONFIG_APPLE_PROPERTIES=y


cat .config |grep -i extra_firmware
Code:
CONFIG_EXTRA_FIRMWARE="intel-ucode/06-0f-06"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"


cat .config | grep -i efi
Code:
CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_EFI_MIXED=y
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# EFI (Extensible Firmware Interface) Support
CONFIG_EFI_VARS=y
CONFIG_EFI_ESRT=y
# CONFIG_EFI_RUNTIME_MAP is not set
# CONFIG_EFI_FAKE_MEMMAP is not set
CONFIG_EFI_RUNTIME_WRAPPERS=y
CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
# CONFIG_EFI_CAPSULE_LOADER is not set
# CONFIG_EFI_TEST is not set
# CONFIG_EFI_RCI2_TABLE is not set
# CONFIG_EFI_DISABLE_PCI_DMA is not set
# end of EFI (Extensible Firmware Interface) Support
CONFIG_EFI_DEV_PATH_PARSER=y
CONFIG_EFI_EARLYCON=y
# CONFIG_EFI_CUSTOM_SSDT_OVERLAYS is not set
CONFIG_EFI_PARTITION=y
CONFIG_FB_EFI=y
CONFIG_EFIVAR_FS=y
# CONFIG_EFI_PGT_DUMP is not set


tree /boot
Code:
/boot
├── EFI
│   ├── APPLE
│   │   └── EXTENSIONS
│   │       └── Firmware.scap
│   ├── boot
│   │   └── bootx64.efi
│   └── debian
│       ├── grub.efi
│       └── grubia32.efi
├── System.map-5.10.27-gentoo
├── System.map-5.10.27-gentoo.old
├── config-5.10.27-gentoo
├── config-5.10.27-gentoo.old
├── vmlinuz-5.10.27-gentoo
├── vmlinuz-5.10.27-gentoo.old

5 directories, 14 files


[Moderator edit: added [code] tags to preserve output layout; broke long whitespace-free lines in code tags to fix thread layout. -Hu]


Last edited by babagau on Mon May 31, 2021 6:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Wed May 26, 2021 10:54 am    Post subject: Reply with quote

Plz post output of
Code:

lsblk
cat /etc/fstab
cat /etc/default/grub

_________________
:)
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Wed May 26, 2021 2:43 pm    Post subject: Reply with quote

alamahant wrote:
Plz post output of
Code:

lsblk
cat /etc/fstab
cat /etc/default/grub
OP already provided /etc/fstab, and stated in the opening post that this system is not using grub.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Wed May 26, 2021 2:57 pm    Post subject: Reply with quote

Then this how you do
If you prefer to not use grub then plz copy the kernel to

/boot/EFI/boot

and create an efistub efibootmgr entry

Code:

efibootmgr --disk /dev/sdX --part Y --create --label "Gentoo" --loader /vmlinuz.......... --unicode 'root=PARTUUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw --verbose

Although it would be a million times better to use grub and an initrd the good old tested orthodox way.
You do have grub after all installed in your machine no???

It shows in /boot
For debian no?
And

furthermore consider plz mounting the ESP on /boot/efi
NOT
on /boot
You do not need an efivar entry in fstab unless you want them mounted ro
This is what i do
Code:

efivarfs            /sys/firmware/efi/efivars   efivarfs   ro,nosuid,nodev,noexec,relatime      0 0


and remount them rw on a need-to basis

Sorry Hu for my lapse of attention....
:)
_________________
:)


Last edited by alamahant on Wed May 26, 2021 3:21 pm; edited 4 times in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Wed May 26, 2021 2:58 pm    Post subject: Reply with quote

Is this 32 bit UEFI? If it is then you cannot boot 64 bit EFI stub kernel directly, you must use some loader, like rEFInd.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
babagau
n00b
n00b


Joined: 04 May 2021
Posts: 22
Location: Volos, Greece

PostPosted: Wed May 26, 2021 8:06 pm    Post subject: Reply with quote

Jaglover wrote:
Is this 32 bit UEFI? If it is then you cannot boot 64 bit EFI stub kernel directly, you must use some loader, like rEFInd.

Hey jaglover why are you doing this to me, I dreamed of booting without a loader and shouting it to the neighbourhood :-P And that's the only uefi machine I have. So I abandon efibootmgr and will try with syslinux. In that case I guess I need the efi mixed mode enabled ...

By the way, your installation notes are interesting and inspiring.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum