• Anand Jain's avatar
    btrfs: do not skip re-registration for the mounted device · d565fffa
    Anand Jain authored
    There are reports that since version 6.7 update-grub fails to find the
    device of the root on systems without initrd and on a single device.
    
    This looks like the device name changed in the output of
    /proc/self/mountinfo:
    
    6.5-rc5 working
    
      18 1 0:16 / / rw,noatime - btrfs /dev/sda8 ...
    
    6.7 not working:
    
      17 1 0:15 / / rw,noatime - btrfs /dev/root ...
    
    and "update-grub" shows this error:
    
      /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?)
    
    This looks like it's related to the device name, but grub-probe
    recognizes the "/dev/root" path and tries to find the underlying device.
    However there's a special case for some filesystems, for btrfs in
    particular.
    
    The generic root device detection heuristic is not done and it all
    relies on reading the device infos by a btrfs specific ioctl. This ioctl
    returns the device name as it was saved at the time of device scan (in
    this case it's /dev/root).
    
    The change in 6.7 for temp_fsid to a...
    d565fffa
volumes.c 225 KB