Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ZFS system: grub-mkconfig is misidentifying my root dataset
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10601
Location: Somewhere over Atlanta, Georgia

PostPosted: Sun Jun 23, 2024 8:54 pm    Post subject: ZFS system: grub-mkconfig is misidentifying my root dataset Reply with quote

I loosely followed Ali3nx's Installing Gentoo Linux EFISTUB On ZFS during a storage upgrade on my main home server and have had a working ZFS root "partition" since around Christmas. The vital statistics of my zpool and datasets are:
Code:
ceres ~ # zpool status
  pool: rpool
 state: ONLINE
  scan: scrub repaired 0B in 02:14:12 with 0 errors on Wed Apr 24 10:45:01 2024
config:

        NAME                              STATE     READ WRITE CKSUM
        rpool                             ONLINE       0     0     0
          raidz2-0                        ONLINE       0     0     0
            scsi-2b1ea01f100d00000-part4  ONLINE       0     0     0
            scsi-2b1ea513300d00000-part4  ONLINE       0     0     0
            scsi-2b1eaa12700d00000-part4  ONLINE       0     0     0
            scsi-2b1fa01e700d00000-part4  ONLINE       0     0     0

errors: No known data errors
ceres ~ # zfs list
NAME                 USED  AVAIL  REFER  MOUNTPOINT
rpool               1.20T  12.7T   140K  none
rpool/ROOT          1.18T  12.7T   140K  none
rpool/ROOT/gentoo   1.18T  12.7T  1.18T  none
rpool/home          27.0G  12.7T   140K  none
rpool/home/jgraham  27.0G  12.7T  27.0G  none
rpool/usr            140K  12.7T   140K  none
rpool/var            279K  12.7T   140K  none
rpool/var/lib        140K  12.7T   140K  none
ceres ~ # mount | grep 'on / '
rpool/ROOT/gentoo on / type zfs (rw,relatime,xattr,posixacl,casesensitive)

The issue I'm having is that grub-mkconfig has begun to misbehave. The correct kernel command line parameter to mount my root dataset would be
    root=ZFS=rpool/ROOT/gentoo
but what grub-mkconfig is coming up with is
    root=ZFS=/ROOT/gentoo
Has anyone else seen this issue? And, yes, I know I could plug the right parameter into GRUB_CMDLINE_LINUX in /etc/default/grub, whcih is what I've just done, but I'd prefer a solution over a Band-Aid. I'm about to research upstream bugs & then perhaps file one.

The usual demographic data are:
  • It's a genkernel "kitchen sink" kernel. Config file shouldn't matter, but it's here.
  • /etc/genkernel.conf is here.
  • emerge --info is here.
  • /etc/default/grub is here.
  • And grub is built with these USE flags.
(I'm also mad at myself because I first encountered this sometime in the spring and apparently manually patched /boot/grub/grub.cfg and went on about my business—and forgot about the whole thing—so, the next time I upgraded my kernel, well, you know.)

Thanks in advance for the help.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20148

PostPosted: Mon Jun 24, 2024 1:01 am    Post subject: Reply with quote

Maybe this bug?

https://wiki.archlinux.org/title/Install_Arch_Linux_on_ZFS#bug:_broken_root_pool_detection

https://github.com/zfsonlinux/grub/issues/22
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10601
Location: Somewhere over Atlanta, Georgia

PostPosted: Mon Jun 24, 2024 2:57 am    Post subject: Reply with quote

Yep, looks like. Thanks!

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10601
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jun 26, 2024 4:31 pm    Post subject: Reply with quote

Looks like that bug was being shepherded by Cardoe, but died on the vine due to lack of timely response to questions from upstream, perhaps due to his Gentoo retirement. I'm going to try to pick this up.

There's an ebuild up on my JRG overlay that contains a provisional fix.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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