Public bug reported:

Hello,
If /etc/fstab is newer than /run/systemd/systemd-units-load, mount emits a hint 
to STDOUT.
This causes the following mount call to return a message which is later 
interpreted as a path:
https://git.launchpad.net/~ubuntu-core-dev/grub/+git/ubuntu/tree/debian/patches/ubuntu-zfs-enhance-support.patch?h=debian/2.12-5ubuntu5.3#n180
https://git.launchpad.net/~ubuntu-core-dev/grub/+git/ubuntu/tree/debian/patches/ubuntu-zfs-enhance-support.patch?h=debian/2.12-5ubuntu5.3#n472
To reproduce:
* Install Ubuntu 25.04 with a /boot and a / dataset:
  root@test:~# zfs list
  NAME      USED  AVAIL  REFER  MOUNTPOINT
  zp0      2.73G   212G    24K  none
  zp0/zd0   118M   906M   118M  /boot
  zp0/zd1  2.61G   212G  2.61G  /
* Run "touch /etc/fstab"

root@test:~# grub-mkconfig 
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
[…]
### BEGIN /etc/grub.d/10_linux_zfs ###
find: ‘mount: (hint) your fstab has been modified, but systemd still uses\n     
  the old version; use 'systemctl daemon-reload' to 
reload.\n/tmp/zfsmnt.f2yDJq/boot’: No such file or directory
### END /etc/grub.d/10_linux_zfs ###
[…]

util-linux's upstream might change mount's behavior to skip the hint
when STDOUT is not a TTY, see https://github.com/util-linux/util-
linux/issues/3558#issuecomment-2854381281

In the meantime, I think it might be prudent to discard output from all
mount calls from /etc/grub.d/10_linux_zfs, or to use upstream's 10_linux
for ZFS too.

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2110050

Title:
  grub-mkconfig fails with ZFS when /etc/fstab was touched: find:
  ‘mount: (hint) your fstab has been modified, but systemd still
  uses[…]/tmp/zfsmnt.2a85H0/boot’: No such file or directory

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/2110050/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to