LinuxQuestions.org
Help answer threads with 0 replies.
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 07-02-2010, 12:19 AM   #1
wenchin
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Rep: Reputation: 0
Question Having problem in LFS6.6 chap8.4 for grub setting


To whom who might help me:
Good day to everyone.
I met some problem in LFS6.6 chap 8.4 and wish someone could help me. Thanks in advance.

I am using CentOS 5.5/x86 32bit platform to study the LFS,according to the book saying, I issue below command to config my grub.
----------------------------------------------------
cd /tmp
grub-mkrescue --image-type=floppy floppy.img
dd if=floppy.img of=/dev/hd0 bs=1440 count=1
grub-mkdevicemap --device-map=device.map
grub-install --grub-setup=/bin/true /dev/hda
grub-mkconfig -o /boot/grub/grub.cfg
----------------------------------------------------
then I get a grub.cfg like this:
.....
......
.......
### BEGIN /etc/grub.d/10_linux ###
menuentry "GNU/Linux, Linux 2.6.30.8-lfs6-6" {
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set 915852a7-859e-45a6-9ff0-d3ebfdb5cea2
linux /boot/vmlinux-2.6.32.8-lfs-6.6 root=/dev/hda5 ro
}
menuentry "GNU/Linux, Linux 2.6.30.2-lfs6-6 (recovery mode)" {
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set 915852a7-859e-45a6-9ff0-d3ebfdb5cea2
linux /boot/vmlinux-2.6.32.8-lfs-6.6 root=/dev/hda5 ro single
}
.......
......
.....
then I would like to try GRUB as below

grub> root (hd0,4)
grub> kernel /boot/grub/core.img
grub> boot

then I got error message as :
.......
.......
VFS: Unable to mount root fs via NFS,trying floppy.
VFS: Cannot open root device "(hd0,5)" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available aprtitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
Pid: 1, comm: swapper Not tainted 2.6.32.8 #1
.......
......
.....

So I think if it is possible that I made wrong GRUB config.

below is my partition table:
Device Boot Start End Blocks Id System
/dev/hda1 1 2611 20972826 7 W95 FAT32(LBA)
/dev/hda2 * 2612 5222 20972857+ 83 Linux
/dev/hda3 5223 5287 522112+ 82 Linux swap / Solaris
/dev/hda4 5288 7295 16129260 f W95 Ext'd (LBA)
/dev/hda5 5288 6331 8385898+ 83 Linux
 
Old 07-02-2010, 08:27 PM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Quote:
Originally Posted by wenchin View Post
grub> root (hd0,4)
grub> kernel /boot/grub/core.img
grub> boot

then I got error message as :
.......
.......
VFS: Unable to mount root fs via NFS,trying floppy.
VFS: Cannot open root device "(hd0,5)" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available aprtitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
Pid: 1, comm: swapper Not tainted 2.6.32.8 #1
.......
Is this error from grub or the linux kernel? It looks like the kernel to me, which means that grub worked Ok
Are you sure that the kernel sees the partition as /dev/hda5? With a 2.6.32 kernel most hardware is supported by libata which would call the partition /dev/sda5. Try altering your grub.cfg to read
Code:
menuentry "GNU/Linux, Linux 2.6.32.8-lfs6-6" {
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set 915852a7-859e-45a6-9ff0-d3ebfdb5cea2
linux /boot/vmlinux-2.6.32.8-lfs-6.6 root=/dev/sda5 ro
}
If that doesn't work I'd look at your kernel config. Something is making your kernel panic.
 
Old 07-05-2010, 02:50 AM   #3
wenchin
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Question

Thanks for Andrew's reply.
I tried to modify the grub.cfg as your suggestion to ...(hd0,5)...../dev/sda5 ro
the error sympton just like the earlier which mark in Red, no matter I change it to /dev/hda5 or /dev/sda5, all the results are the same.
.......
.......
VFS: Unable to mount root fs via NFS,trying floppy.
VFS: Cannot open root device "(hd0,5)" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available aprtitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
Pid: 1, comm: swapper Not tainted 2.6.32.8 #1
.......
......
.....

I agree with Andrew's thinking,it looks like that kernel can not recognize the /dev/hda5 or /dev/sda5, so I checked my kernel config, I do add ext3 support and also SATA & PATA support, attached file (config-lfs66.txt) is my kernel config file.

Is it possible that LFS partition can not work on Extended partition??
Just as my first post, my LFS partition is on /dev/hda5 which is also on an Extended partition. I am now trying to check about this.
Thanks.
Attached Files
File Type: txt config-lfs66.txt (67.1 KB, 15 views)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
make check problem gcc in section 6.15.1 of lfs6.5 aahiqmir Linux From Scratch 17 09-29-2012 04:47 AM
Problem on Glibc-2.11.1, LFS6.6, Ubuntu 9.10 merinoss Linux From Scratch 1 04-29-2010 04:51 AM
problem making Binutils-2.18 - PASS1(LFS6.4) slim.chen Linux From Scratch 5 07-15-2009 12:39 AM
make problem in section 5.7.1 of lfs6.4 aahiqmir Linux From Scratch 2 03-28-2009 08:45 AM
LFS6.0 Glibc compile problem Chapter5.8 Pass1 Paulsuk Linux From Scratch 1 04-19-2005 04:50 PM

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

All times are GMT -5. The time now is 08:56 AM.

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