[Bug 1238347] Re: Invalid grub.cfg generated if root on RAID1 btrfs
Toby Corkindale
1238347 at bugs.launchpad.net
Sun Nov 3 23:11:54 UTC 2013
>From /usr/sbin/grub-mkconfig
Note the addition of the "head -n 1" to the pipeline. Not a great fix, but does work.
# Device containing our userland. Typically used for root= parameter.
GRUB_DEVICE="`${grub_probe} --target=device / | head -n 1`"
GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true
# Device containing our /boot partition. Usually the same as GRUB_DEVICE.
GRUB_DEVICE_BOOT="`${grub_probe} --target=device /boot | head -n 1`"
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1238347
Title:
Invalid grub.cfg generated if root on RAID1 btrfs
Status in “grub2” package in Ubuntu:
New
Bug description:
If Ubuntu Saucy is installed onto a btrfs root device, which is
configured to be a RAID1 mirror (or probably other configurations)
then the grub.cfg is generated with invalid entries.
This is because /etc/grub.d/10_linux gets *both* device names from
btrfs, with a newline between them, and then just sticks that
everywhere in the config file where it was expecting just one device.
The newline in the middle prematurely truncates lines and then starts
new invalid ones.
To reproduce, create your btrfs device something like this during install:
mkfs.btrfs -d raid1 -m raid1 /dev/sda1 /dev/sdb1
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: grub-common 2.00-19ubuntu1 [modified: usr/sbin/grub-mkconfig usr/share/grub/grub-mkconfig_lib]
ProcVersionSignature: Ubuntu 3.11.0-11.17-generic 3.11.3
Uname: Linux 3.11.0-11-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.12.5-0ubuntu1
Architecture: amd64
Date: Fri Oct 11 12:21:17 2013
InstallationDate: Installed on 2013-10-09 (1 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Beta amd64 (20130925.1)
MarkForUpload: True
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.grub.d.10.linux: [modified]
mtime.conffile..etc.grub.d.10.linux: 2013-10-11T12:18:01.364605
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1238347/+subscriptions
More information about the foundations-bugs
mailing list