Bug#595458: /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?). [btrfs]
Alexander Kurtz
kurtz.alex at googlemail.com
Wed Sep 15 14:30:44 UTC 2010
Tags: moreinfo
Hi,
I had a btrfs / until very recently (it was just too unstable for me)
and that worked fine. I hope that we'll be able to figure out what went
wrong with your system:
Let's first check some package versions. You'll need at least
* grub-pc 1.98_20100602-1
This version make grub-probe work with / on btrfs[1]. Note that this
does not mean GRUB can boot from btrfs, you'll still need a separate
boot partition. Also note that currently only the single-device case
is supported.
* btrfs-tools 0.19-11
This version adds initramfs integration[2]. Without this package your
initramfs will simply not contain the btrfs kernel module so the
kernel won't be able to mount the root fs.
* klibc-utils 1.5.18-1
This version adds support for btrfs to the
`/usr/lib/klibc/bin/fstype' program[3]. This is needed for
example if you use cryptsetup to encrypt your root fs.
You'll probably already have all these packages installed in the
required versions, but please re-check.
Am Samstag, den 04.09.2010, 01:50 -0400 schrieb Nicolas STRANSKY:
> Since I migrated / to btrfs, update-grub stropped working and complains
> with the following error:
> /usr/sbin/grub-probe: error: cannot find a device for / (is /dev
> mounted?).
> /boot is ext3.
> Manually altering grub.cfg works though and the system boots fine, so
> grub does support btrfs.
As mentioned above GRUB does not really support btrfs (otherwise you
wouldn't need a separate /boot partition). However it should support
correctly writing the root device into `/boot/grub/grub.cfg'. I assume
that is precisely your problem, right?
This should be the relevant part in `grub-mkconfig' (`update-grub' is
only a wrapper for that script):
$ sed --quiet '152,153p' /usr/sbin/grub-mkconfig
GRUB_DEVICE="`${grub_probe} --target=device /`"
GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true
So can you try these commands as root and send me the output:
mount
grub-probe --target=device --verbose /
> *********************** BEGIN /proc/mounts
> /dev/root / btrfs rw,relatime 0 0
> /dev/sda3 /boot ext3 rw,relatime,errors=continue,commit=5,barrier=0,data=writeback 0 0
> /dev/sda4 /home btrfs rw,relatime 0 0
> *********************** END /proc/mounts
Hmm `/dev/root' sounds strange to me. Are you using any special hw (raid
controller etc.)? Or what does this mean?
Please give a short short overview over your partitions, e.g. /dev/sda1
contains /boot, /dev/sda2 contains /, /dev/sda3 contains swap, etc.
Can you please show how your grub.cfg looks like, before manually
altering it?
Finally did you do anything special when migrating your / to btrfs? Any
config files you changed (for example something under
`/etc/initramfs-tools' or `/etc/grub.d') or any scripts you hacked (for
example some of the grub scripts), etc.?
Best regards
Alexander Kurtz
[1] http://packages.debian.org/changelogs/pool/main/g/grub2/grub2_1.98+20100804-4/changelog#versionversion1.98_20100602-1
[2] http://packages.debian.org/changelogs/pool/main/b/btrfs-tools/btrfs-tools_0.19+20100601-3/changelog#versionversion0.19-11
[3] http://packages.debian.org/changelogs/pool/main/k/klibc/klibc_1.5.20-1/changelog#versionversion1.5.18-1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20100915/1cb023ed/attachment-0001.pgp>
More information about the Pkg-grub-devel
mailing list