Bug#676644: fails to find UUID with multi-device BTRFS root
Claus Faerber
cfaerber at cfaerber.name
Fri Jun 8 13:42:43 UTC 2012
Package: grub-common
Version: 1.99-21
Severity: normal
Tags: upstream patch
'update-grub' may fail to determine the UUID for a BTRFS filesystem
that is part of a multi-device BTRFS filesystem.
The patch for '/etc/grub.d/10_linux' gets the UUID from
'btrfs filesystem show' instead.
Background:
The root cause is that BTRFS breaks the assumption that
device-to-uuid is a 1:1 mapping. Under BTRFS, it can happen that the
mount point for '/' in mtab and the UUID of the BTRFS filesystem
point to different devices.
On my system, one disk is connected to the SATA port on the
mainboard and found first during boot. Under the booted system
(from which update-grub is run), the disks connected to the PCIe
SAS/SATA come first, resulting in the following mtab (excerpt,
please note that '/' maps to 'sdE1' instead of 'sdb1'):
/dev/sde1 on / type btrfs (rw,relatime,nospace_cache)
/dev/sdb1 on /home type btrfs (rw,relatime,nospace_cache)
/dev/sdb1 on /srv type btrfs (rw,relatime,nospace_cache)
/dev/sdb1 on /.btrfs type btrfs (rw,relatime,nospace_cache)
and in the following UUID-device mapping:
$ ls -l /dev/disk/by-uuid/
lrwxrwxrwx 1 root root 10 Jun 8 11:49 04e9d27d-4274-4ab0-8b58-03acdeb1505a -> ../../sdc1
lrwxrwxrwx 1 root root 10 Jun 8 11:49 0ea28750-415a-477f-aad4-8329a3c09bd8 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Jun 8 11:49 9be5e3d9-7e99-4c38-95d3-cad6f7c4981d -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 8 11:49 e799dfed-2423-4fbb-984c-15393ea14549 -> ../../sdc2
-- System Information:
Debian Release: wheezy/sid
APT prefers testing-proposed-updates
APT policy: (500, 'testing-proposed-updates'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.4.0 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages grub-common depends on:
ii gettext-base 0.18.1.1-8
ii libc6 2.13-32
ii libdevmapper1.02.1 2:1.02.67-2
ii libfreetype6 2.4.9-1
ii libfuse2 2.8.7-2
ii zlib1g 1:1.2.7.dfsg-11
Versions of packages grub-common recommends:
ii os-prober 1.53
Versions of packages grub-common suggests:
pn desktop-base <none>
pn grub-emu <none>
pn multiboot-doc <none>
pn xorriso <none>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 10_linux.diff
Type: text/x-diff
Size: 1426 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20120608/c11ee884/attachment.diff>
More information about the Pkg-grub-devel
mailing list