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-28-2011, 07:27 PM   #1
PJB3589
LQ Newbie
 
Registered: Jul 2005
Posts: 6

Rep: Reputation: 0
Can't get LFS6.7 to boot


Hello,

Just finished building an LFS 6.7 system. When I reboot it, I get tossed to the grub rescue prompt with an error of file not found. When I run the set command, I get the following:

Code:
prefix=(hd0,0)/boot/grub
root=hd0,1
This is incorrect. My LFS system is on the partition hd1,1. If I look in the grub.cfg file, this is specified correctly. So why is it wrong when I reboot?

If I manually set the prefix and root to the correct partition, I am able to start booting LFS. However, I get a kernel panic of:

Code:
kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
Any ideas?

Thanks
 
Old 01-29-2011, 04:20 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Could you post the following information:

- Content of $LFS (and, if you decided to create it as a mount point, $LFS/boot)
- Your /etc/fstab file,
- Relevant menu entry from /boot/grub/grun.cfg.

Are you doing this while still running from the host OS (chap. 8.4.3) or after finishing chap. 8.4.4?

You do know that grub and grub2 have a difference in numbering when pointing to devices?
For example if you used /dev/sda3 its notation would be:
- Grub -> hd0,2
- Grub2 -> hd0,3

You mention hd1,1, which grub2 translates to: /dev/sdb1

The kernel panic message might be related to the above, so I'm not going into that yet.

Hope this helps.
 
Old 01-31-2011, 01:17 PM   #3
PJB3589
LQ Newbie
 
Registered: Jul 2005
Posts: 6

Original Poster
Rep: Reputation: 0
My LFS partition is on /dev/sdb1. This is after 8.4.4.

Contents of /etc/fstab:
Code:
root:/sources# cat /etc/fstab
# Begin /etc/fstab

# file system  mount-point  type   options         dump  fsck
#                                                        order

/dev/sdb1     /            ext2  defaults        1     1
#/dev/sda2     swap         swap   pri=1           0     0
proc           /proc        proc   defaults        0     0
sysfs          /sys         sysfs  defaults        0     0
devpts         /dev/pts     devpts gid=4,mode=620  0     0
tmpfs          /dev/shm     tmpfs  defaults        0     0
# End /etc/fstab
GRUB menu entry:

Code:
### BEGIN /etc/grub.d/10_linux ###
menuentry "GNU/Linux, with Linux 2.6.37-lfs-6.7" --class gnu-linux --class gnu --class os {
        insmod ext2
        set root='(hd1,1)'
        search --no-floppy --fs-uuid --set 95537638-04e2-433d-b1f5-b23d33ffe716
        echo    Loading Linux 2.6.37-lfs-6.7 ...
        linux   /boot/vmlinux-2.6.37-lfs-6.7 root=/dev/sdb1 ro  
}
menuentry "GNU/Linux, with Linux 2.6.37-lfs-6.7 (recovery mode)" --class gnu-linux --class gnu --class os {
        insmod ext2
        set root='(hd1,1)'
        search --no-floppy --fs-uuid --set 95537638-04e2-433d-b1f5-b23d33ffe716
        echo    Loading Linux 2.6.37-lfs-6.7 ...
        linux   /boot/vmlinux-2.6.37-lfs-6.7 root=/dev/sdb1 ro single 
}
### END /etc/grub.d/10_linux ###
 
Old 01-31-2011, 01:42 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

The /etc/fstab file looks ok.

You posted the wrong grub file. You need to look at this one: /boot/grub/grub.cfg

Which command did you execute in chapter 8.4.4? And are you sure you want to override your current boot-loader?
 
Old 01-31-2011, 04:05 PM   #5
PJB3589
LQ Newbie
 
Registered: Jul 2005
Posts: 6

Original Poster
Rep: Reputation: 0
That menu entry is from my /boot/grub/grub.cfg file.

I'm building LFS in a VM, so I did overwrite my boot loader as I have a snapshot prior to running the "grub-setup /dev/sda" command.
 
Old 01-31-2011, 06:53 PM   #6
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Hi,

did you compile your kernel with the ext2 module? I once compiled it with the default options and the ext2 module was not in it. The system also would not boot up. I do not recall the exact error message. Boot into your host, remount your LFS partition and issue the following
Code:
grep 'EXT2' $LFS/boot/config-2.6*
If the output is something like
Code:
#CONFIG_EXT2_FS is not set
Then you will have to recompile your kernel - partly at least.
 
Old 02-02-2011, 09:04 AM   #7
PJB3589
LQ Newbie
 
Registered: Jul 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Actually, that's a mistake. The partition LFS is on is ext3. I corrected /etc/fstab, but I still have the same problem.
 
  


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
Problem on Glibc-2.11.1, LFS6.6, Ubuntu 9.10 merinoss Linux From Scratch 1 04-29-2010 03:51 AM
can't get perl to compile for lfs6.5 deathalele Linux - Software 1 10-23-2009 05:02 PM
permission denied lfs6.4 section 5.10 aahiqmir Linux From Scratch 1 03-30-2009 08:47 AM
make problem in section 5.7.1 of lfs6.4 aahiqmir Linux From Scratch 2 03-28-2009 07:45 AM
Some help please with chaper 8.3 of LFS6.0. DrRock Linux From Scratch 1 12-29-2004 08:08 PM

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

All times are GMT -5. The time now is 10:25 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