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.
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)
- 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.
### 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 ###
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.