LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 01-01-2013, 12:02 AM   #1
k84834
Member
 
Registered: Aug 2012
Posts: 142

Rep: Reputation: Disabled
'/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).
Code:
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)
Code:
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 ]#
Code:
root [ /home/blfs ]# grub-install -v
grub-install (GRUB) 1.99
root [ /home/blfs ]#
my problem is:
Code:
root [ /home/blfs ]# grub-install /dev/sdb
/usr/sbin/grub-probe: error: cannot stat `/dev/root'.
root [ /home/blfs ]#

Last edited by k84834; 01-01-2013 at 12:14 AM.
 
Old 01-01-2013, 12:48 AM   #2
k84834
Member
 
Registered: Aug 2012
Posts: 142

Original Poster
Rep: Reputation: Disabled
this is my /proc/self/mountinfo file
Code:
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!
 
Old 01-01-2013, 02:30 AM   #3
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

So you want lfs to control the booting?
Is lfs built on a usb devivce?
Can you post
Code:
sudo fdisk -l
And where did you install grub to?
 
Old 01-01-2013, 11:37 PM   #4
k84834
Member
 
Registered: Aug 2012
Posts: 142

Original Poster
Rep: Reputation: Disabled
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

Last edited by k84834; 01-01-2013 at 11:38 PM.
 
Old 01-02-2013, 04:21 AM   #5
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: Cannot find 'ssh-keygen' in '/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin' venu.navat Linux - Software 3 03-08-2012 04:00 AM
/usr/sbin/grub-probe: error: no such disk. mpyusko Debian 3 01-05-2012 10:28 AM
[SOLVED] GRUB: Cannot find list of partitions && /usr/sbin/grub-setup: error w1k0 Linux Mint 26 12-21-2010 03:29 PM
[SOLVED] gcc linker error - hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS) chaosless Linux - Software 1 09-17-2009 12:33 PM
As root, not seeing /sbin and /usr/sbin in path weghman Linux - Newbie 3 04-25-2004 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 02:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration