-   Linux From Scratch (
-   -   '/usr/sbin/grub-probe: error: cannot stat `/dev/root' (

k84834 01-01-2013 01:02 AM

'/usr/sbin/grub-probe: error: cannot stat `/dev/root'
Hi everybody
I build target BLFS, now I want to use LFS as a standalone OS and boot directly from Bios, not as a bootable partition by host.
I have installed grub2 on LFS7.2 and I'd make my grub.cfg file.
my partition that LFS is located on it, is sdb1
now I am booted on BLFS through my host grub and below info is from booted BLFS(that have X and fluxbox and Firefox).

root [ /home/blfs ]# mount
/dev/sdb1 on / type ext3 (rw,barrier=1)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
tmpfs on /run type tmpfs (rw)
devtmpfs on /dev type devtmpfs (rw,nosuid,mode=0755)
devpts on /dev/pts type devpts (rw,gid=4,mode=620)


root [ /home/blfs ]# cat /boot/grub/grub.cfg
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod ext2
set root=(hd1,1)

menuentry "GNU/Linux, MYLinux 3.5.2-lfs-7.2" {
        linux  /boot/vmlinuz-3.5.2-lfs-7.2 root=/dev/sdb1 ro
root [ /home/blfs ]#


root [ /home/blfs ]# grub-install -v
grub-install (GRUB) 1.99
root [ /home/blfs ]#

my problem is:

root [ /home/blfs ]# grub-install /dev/sdb
/usr/sbin/grub-probe: error: cannot stat `/dev/root'.
root [ /home/blfs ]#

k84834 01-01-2013 01:48 AM

this is my /proc/self/mountinfo file

root [ /home/blfs ]# cat /proc/self/mountinfo
15 1 8:17 / / rw,relatime - ext3 /dev/root rw,errors=continue,user_xattr,acl,barrier=1,data=writeback
16 15 0:5 / /dev rw,relatime - devtmpfs devtmpfs rw,size=1033844k,nr_inodes=219992,mode=755
17 15 0:14 / /run rw,relatime - tmpfs tmpfs rw
18 15 0:3 / /proc rw,nosuid,nodev,noexec,relatime - proc proc rw
19 15 0:15 / /sys rw,nosuid,nodev,noexec,relatime - sysfs sysfs rw
20 16 0:10 / /dev/pts rw,relatime - devpts devpts rw,gid=4,mode=620
root [ /home/blfs ]#

in this file /dev/root has been specified. why grub dose not detect it ?!!!!
I read thisquestion but I don't find how the problem has been solved!

spiky0011 01-01-2013 03:30 AM


So you want lfs to control the booting?
Is lfs built on a usb devivce?
Can you post

sudo fdisk -l
And where did you install grub to?

k84834 01-02-2013 12:37 AM

Hi Spiky0011
I build LFS on a VM.
yesterday I wanted to boot LFS as a standalone OS and the problem have been solved with this thread. for install grub, I logout from LFS GUI and chroot to LFS env according to LFS book instructions and the problem solved and now LFS is booted on a VM.
but now I want to transfer LFS on a hardware like flash or thin.
to do this, I first compressed LFS to lfs.tar.bz2 that its size is about 500M and my thin memory is 2G.
I first run a iso os like fedora 13 then I mount my flash and my thin to live fedora and copy lfs.tar.bz2 to my hard. but when I extract the lfs.tar.bz2 because the size of LFS is about 1.4G then my memory space not is enough.
what do I do?
please give me your suggestions.
thank you every body

spiky0011 01-02-2013 05:21 AM


I have done similar using dd but you need at least the same size partition

All times are GMT -5. The time now is 12:20 AM.