bugGNU GRUB - Bugs: bug #52746, An extra trailing slash is added...


You are not allowed to post comments on this tracker with your current authentication level.

bug #52746: An extra trailing slash is added to ZFS root pool and it's not bootable

Submitter:  Jozsef Fejes <fejesjoco>
Submitted:  Tue 26 Dec 2017 09:21:40 PM UTC
Category:  Configuration Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  None Privacy:  Public
Assigned to:  cjwatson Originator Name: 
Open/Closed:  Open Release:  2.02
Release:  Reproducibility:  Every Time
Planned Release:  None

Mon 29 Oct 2018 12:35:00 PM UTC, comment #2: 

I sent a patch for this to grub-devel today; attaching it here as well.

(file #45321)

Colin Watson <cjwatson>
Group Member
Tue 26 Dec 2017 09:31:25 PM UTC, comment #1: 

Some more context:

Grub apparently passes this (invalid) value to initramfs, which is processed here under Debian: https://anonscm.debian.org/cgit/pkg-zfsonlinux/zfs.git/tree/contrib/initramfs/scripts/zfs#n770

And this is apparently passed verbatim to zfsonlinux, which dies here: https://github.com/zfsonlinux/zfs/search?utf8=%E2%9C%93&q=%22trailing+slash+in+name%22&type=

I think it sounds sane that ZOL has this validation. One might argue that the first link is a bit confusing since their format string includes the slash unconditionally, so at least their documentation should be fixed. I'm not sure why this file is under a Debian repo, probably other distros have a different file with similar functionality?

I'm pretty sure life would be great if update-grub produced a valid name, ie. without the trailing slash. That should hopefully not break any existing setup.

Jozsef Fejes <fejesjoco>
Tue 26 Dec 2017 09:21:40 PM UTC, original submission:  

I have a ZFS pool named "rpool". There are no datasets under it, the pool itself is a normal dataset.

I'm running Debian Buster and it's update-grub script. It calls /etc/grub.d/10_linux which produces the root parameter.

I end up with this: root=ZFS=rpool/

This prevents the system from booting with the following message: cannot open 'rpool/': trailing slash in name

When I hand-edit the generated /boot/grub/grub.cfg, and remove the trailing slash, the system boots normally.

There are several issues like this already reported for zfsonlinux, but I believe the file producing this error is part of grub, hence I'm reporting it here. Eg:

If you can confirm you can own this bug, I'll hop over to github to tell them to follow this instead.

Jozsef Fejes <fejesjoco>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #45321:  0001-Cope-with-being-on-a-ZFS-root-dataset.patch added by cjwatson (2KiB - text/x-patch - Cope with / being on a ZFS root dataset)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by cjwatson (Updated the item)
  • -email is unavailable- added by fejesjoco (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-10-29 cjwatson Attached File- Added 0001-Cope-with-being-on-a-ZFS-root-dataset.patch, #45321
        Assigned toNone cjwatson

    Back to the top

    Powered by Savane 3.13-f762.
    Corresponding source code