View previous topic :: View next topic |
Author |
Message |
lcsavb n00b
Joined: 11 Jun 2020 Posts: 46 Location: Sao Paulo / Brasil
|
Posted: Wed Jun 17, 2020 10:47 am Post subject: Gentoo on ZFS root and UEFI |
|
|
Hello!
I'm trying to install Gentoo in a zfs root. But the output of command efibootmgr -v seens strange:
Quote: |
sysresccd /efi # efibootmgr -v
BootCurrent: 0009
Timeout: 1 seconds
BootOrder: 0000,0003,0008,000A,0009,0002,0007
Boot0000* Gentoo ZFS 5.4.38 HD(1,GPT,39cfc197-109d-4a54-a216-0ccca39327fe,0x800,0xf4000)/File(efi\gentoo\vmlinuz-5.4.38-gentoo.efi)r.o.o.t.=.Z.F.S.=.r.p.o.o.l./.R.O.O.T./.g.e.n.t.o.o. .d.o.z.f.s. .i.n.i.t.r.d.=.\.e.f.i.\.g.e.n.t.o.o.\.i.n.i.t.r.a.m.f.s.-.5...4...3.8.-.g.e.n.t.o.o...i.m.g.
Boot0002 CT2000MX500SSD1 BBS(HD,,0x0)..BO
Boot0003* Samsung SSD 970 EVO Plus 500GB BBS(HD,,0x0)..BO
Boot0007 Samsung SSD 970 EVO Plus 500GB BBS(HD,,0x0)..BO
Boot0008* Seagate Expansion 0710 BBS(Floppy,,0x0)..BO
Boot0009* UEFI: ADATA USB Flash Drive 1100, Partition 1 PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(3,0)/HD(1,MBR,0xde1d416a,0x800,0x1ce7000)..BO
Boot000A* ADATA USB Flash Drive 1100 BBS(HD,,0x0)..BO
|
All that periods are correct? I double checked it, but couldn't find a syntax error in the command for adding it to the firmware:
efibootmgr --disk /dev/sda --part 1 --create --label "Gentoo ZFS 5.4.38" --loader "efi\gentoo\vmlinuz-5.4.38-gentoo.efi" --unicode 'root=ZFS=rpool/ROOT/gentoo ro initrd=\efi\gentoo\initramfs-5.4.38-gentoo.img'
I'm unable to boot - the screen freezes in the motherboard's logo stage. I'm suspicious that the entry is the culprit. Is there a way to view debugging information about the uefi boot? Could be a bug in motherboard's firmware?
Thanks in advance!
Last edited by lcsavb on Wed Jun 17, 2020 7:26 pm; edited 1 time in total |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Wed Jun 17, 2020 11:18 am Post subject: Re: efibootmgr syntax |
|
|
Are you sure your computer's EFI implementation can deal with a separate initramfs?
I was having big trouble here which made me have the initramfs built-in. |
|
Back to top |
|
|
lcsavb n00b
Joined: 11 Jun 2020 Posts: 46 Location: Sao Paulo / Brasil
|
Posted: Wed Jun 17, 2020 4:01 pm Post subject: |
|
|
My motherboard is an Aorus X570. I've google and haven't found any information at all about its capacity to deal with a standalone initramfs.
But my main problem is that I don't know where to find information to debug this problem. The computer freezes in early boot. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4156 Location: Bavaria
|
Posted: Wed Jun 17, 2020 5:06 pm Post subject: Re: efibootmgr syntax |
|
|
lcsavb wrote: | efibootmgr --disk /dev/sda --part 1 --create --label "Gentoo ZFS 5.4.38" --loader "efi\gentoo\vmlinuz-5.4.38-gentoo.efi" --unicode 'root=ZFS=rpool/ROOT/gentoo ro initrd=\efi\gentoo\initramfs-5.4.38-gentoo.img' |
Dont do it this way.
Set all needed options into the kernel in "Built-in kernel command line"
Code: | [*] Built-in kernel command line
--unicode 'root=ZFS=rpool/ROOT/gentoo ro initrd=\efi\gentoo\initramfs-5.4.38-gentoo.img' |
and create only a simple uefi boot entry:
Code: | efibootmgr --disk /dev/sda --part 1 --create --label "Gentoo ZFS 5.4.38" --loader "efi\gentoo\vmlinuz-5.4.38-gentoo.efi" |
Nothing else.
Recommendation: Dont work with version numbers .... so you dont need to create always new uefi boot entries. Better:
Code: | efibootmgr --disk /dev/sda --part 1 --create --label "Gentoo ZFS" --loader "efi\gentoo\vmlinuz.efi" |
Of coures you have to copy your kernel into your efi dir as "vmlinuz.efi". |
|
Back to top |
|
|
ali3nx l33t
Joined: 21 Sep 2003 Posts: 722 Location: Winnipeg, Canada
|
Posted: Wed Jun 17, 2020 5:16 pm Post subject: Re: efibootmgr syntax |
|
|
lcsavb wrote: | Hello!
I'm trying to install Gentoo in a zfs root. But the output of command efibootmgr -v seens strange:
|
here's the efibootmgr command results example from my gentoo nas server. Those "strange" looking text formats are functional and normal.
Quote: | efibootmgr -v
BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0001,0008,0009,0004
Boot0000* Gentoo ZFS 5.4.38 HD(1,GPT,13d98509-d1c6-4341-a426-8cb830fb5120,0x800,0xf3800)/File(efi\gentoo\vmlinuz-5.4.38-gentoo.efi)r.o.o.t.=.Z.F.S.=.r.p.o.o.l.2./.R.O.O.T./.g.e.n.t.o.o. .r.o. .i.n.i.t.r.d.=.\.e.f.i.\.g.e.n.t.o.o.\.i.n.i.t.r.a.m.f.s.-.5...4...3.8.-.g.e.n.t.o.o...i.m.g.
Boot0001* Gentoo ZFS 5.4.38 Backup HD(1,GPT,30226498-83fa-4131-9717-32c59fb9553b,0x800,0xf3800)/File(efi\gentoo\vmlinuz-5.4.38-gentoo.efi)r.o.o.t.=.Z.F.S.=.r.p.o.o.l.2./.R.O.O.T./.g.e.n.t.o.o. .r.o. .i.n.i.t.r.d.=.\.e.f.i.\.g.e.n.t.o.o.\.i.n.i.t.r.a.m.f.s.-.5...4...3.8.-.g.e.n.t.o.o...i.m.g.
|
This does work but the "freezing" as you describe it may be caused by other reasons. Disabling the bios splash screen to display verbose boot messages may be a benefit.
If you had a short phone video of a boot attempt you could provide I can attempt to help. This may be easier to provide on discord.
Jump on the gentoo discord server you'll find me there as xartin.
If and when this issue is resolved please add comments to the install guide relevant to your hardware
https://wiki.gentoo.org/wiki/User:Ali3nx/Installing_Gentoo_Linux_EFISTUB_On_ZFS _________________ Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper! |
|
Back to top |
|
|
lcsavb n00b
Joined: 11 Jun 2020 Posts: 46 Location: Sao Paulo / Brasil
|
Posted: Wed Jun 17, 2020 7:12 pm Post subject: Re: efibootmgr syntax |
|
|
Unfortunately, with the boot splash disabled it doesn't pop up any messages whatsoever, just a black screen.
Code: |
Model: Unknown (unknown)
Disk /dev/nvme1n1: 500GB* up there I wrote the efibootmgr command with dev/sda, but actually I've used the rigth path (/dev/nvme1n1)
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 513MB 512MB fat32 esp boot, esp
2 514MB 500GB 500GB rootfs
|
Code: |
➜ ~ zpool status
pool: rpool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
nvme-Samsung_SSD_970_EVO_Plus_500GB_S58SNJ0N300209A-part2 ONLINE 0 0 0
errors: No known data errors
|
My initial plan is to built in the initramfs into the Kernel as Charles suggested. Afterwards, I think I'll remove zfs from kernel and rebuild it as a module and/or regenerate the zfs cache file. Maybe that works. Right now I don't see a way to debug this, maybe I'll need to start all over again from scratch
Last edited by lcsavb on Wed Jun 17, 2020 7:31 pm; edited 1 time in total |
|
Back to top |
|
|
lcsavb n00b
Joined: 11 Jun 2020 Posts: 46 Location: Sao Paulo / Brasil
|
Posted: Wed Jun 17, 2020 7:27 pm Post subject: Re: efibootmgr syntax |
|
|
pietinger wrote: | lcsavb wrote: | efibootmgr --disk /dev/sda --part 1 --create --label "Gentoo ZFS 5.4.38" --loader "efi\gentoo\vmlinuz-5.4.38-gentoo.efi" --unicode 'root=ZFS=rpool/ROOT/gentoo ro initrd=\efi\gentoo\initramfs-5.4.38-gentoo.img' |
Dont do it this way.
Set all needed options into the kernel in "Built-in kernel command line"
Code: | [*] Built-in kernel command line
--unicode 'root=ZFS=rpool/ROOT/gentoo ro initrd=\efi\gentoo\initramfs-5.4.38-gentoo.img' |
and create only a simple uefi boot entry:
Code: | efibootmgr --disk /dev/sda --part 1 --create --label "Gentoo ZFS 5.4.38" --loader "efi\gentoo\vmlinuz-5.4.38-gentoo.efi" |
Nothing else.
Recommendation: Dont work with version numbers .... so you dont need to create always new uefi boot entries. Better:
Code: | efibootmgr --disk /dev/sda --part 1 --create --label "Gentoo ZFS" --loader "efi\gentoo\vmlinuz.efi" |
Of coures you have to copy your kernel into your efi dir as "vmlinuz.efi". |
Thanks, that's an elegant way to do it. |
|
Back to top |
|
|
lcsavb n00b
Joined: 11 Jun 2020 Posts: 46 Location: Sao Paulo / Brasil
|
Posted: Sat Jun 20, 2020 4:15 am Post subject: Re: efibootmgr syntax |
|
|
charles17 wrote: | Are you sure your computer's EFI implementation can deal with a separate initramfs?
I was having big trouble here which made me have the initramfs built-in. |
Code: |
nvme0n1 259:0 0 465.8G 0 disk # XFS
├─nvme0n1p1 259:2 0 10M 0 part
├─nvme0n1p2 259:3 0 100G 0 part /
└─nvme0n1p3 259:4 0 365.8G 0 part /home
nvme1n1 259:1 0 465.8G 0 disk ### ZFS (GRUB HERE - UEFI MODE)
├─nvme1n1p1 259:5 0 488M 0 part
└─nvme1n1p2 259:6 0 465.3G 0 part
|
Because building a custom initramfs is out of my league, I've decided to install GRUB in UEFI mode. Whereas I can boot to my Gentoo Installation in nvme0n1, the screen freezes when I try to boot to nvme1n1 (exactly when it shows "Loading INITRAMFS"). It's important to point out that I've enabled the zpool with all its default features... Possibly a problem for GRUB, but if that is the case shouldn't GRUB crash? After all, it needs to reads is .cfg file from ZFS.
Tomorrow I'll try to enable only the supported features as it's described in arch wiki. |
|
Back to top |
|
|
lcsavb n00b
Joined: 11 Jun 2020 Posts: 46 Location: Sao Paulo / Brasil
|
Posted: Mon Jun 22, 2020 2:14 am Post subject: |
|
|
Hey guys!
Just to post an update: I finally made it!
It was a dumb mistake, I've forgotten to set EFI_STUB (EFI runtime service support) in the kernel.
Now it's working perfectly and I'm taking a lot of snapshots.
I'm in love with ZFS + Gentoo. Cutting edge FS with the best linux distro. I've learned a lot in the process to accomplish this. |
|
Back to top |
|
|
ali3nx l33t
Joined: 21 Sep 2003 Posts: 722 Location: Winnipeg, Canada
|
Posted: Mon Jun 22, 2020 3:55 am Post subject: |
|
|
Hey congrats
The little things are easy to miss and sometimes miss twice upon review _________________ Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper! |
|
Back to top |
|
|
|