Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.