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.
kernel panic - not syncing: Unable to mount root fs on unknown-block(2,0)
The middle of that line is your error. You told grub where the root filesystem was, and you were wrong
On the bootup screen hit 'e' (the e key, not e and two '') your boot line comes up. hit 'e' again, and you can edit it. Fix your mistake. press return, and then 'b'
Last edited by business_kid; 05-13-2010 at 03:45 AM.
kernel panic - not syncing: Unable to mount root fs on unknown-block(2,0)
The middle of that line is your error. You told grub where the root filesystem was, and you were wrong
On the bootup screen hit 'e' (the e key, not e and two '') your boot line comes up. hit 'e' again, and you can edit it. Fix your mistake. press return, and then 'b'
My root filesystem is on /dev/hda1. How can i make grub realize it. What entry do i make.
I tried everything the book said, on cfdisk my partition with LFS is /dev/hda1 so i tried (hd0,1) for grub, didn't work so i tried (hd1,1) and (hd0,0)and /dev/hda /dev/hda0 /dev/hda1. Nothing works.
I recently finished the LFS 6.6 book and encountered booting problems too. Although my hard disk also got detected as hda, I was unable to boot into my LFS. After some trying I changed root=/dev/hda1 to root=/dev/sda1 (don't ask me why I did such an illogical thing because I just don't know) and all of a sudden I was able to boot into LFS. Needles to say that you'll also have to change your /etc/fstab file accordingly. Has been working ever since. I plan to get to the bottom of this but that might take some time.
Just wanted to share this, maybe it works for you the same way. At least, if you don't try, you'll never know.
I recently finished the LFS 6.6 book and encountered booting problems too. Although my hard disk also got detected as hda, I was unable to boot into my LFS. After some trying I changed root=/dev/hda1 to root=/dev/sda1 (don't ask me why I did such an illogical thing because I just don't know) and all of a sudden I was able to boot into LFS. Needles to say that you'll also have to change your /etc/fstab file accordingly. Has been working ever since. I plan to get to the bottom of this but that might take some time.
Just wanted to share this, maybe it works for you the same way. At least, if you don't try, you'll never know.
Kind regards,
Eric
Thanks, I just tried that--it didn't work, but maybe im doing something wrong. Can you paste your fstab and grub.cnf contents so i can compare?
No problem concerning posting the fstab but you'll have to wait until I get home. I'm at the office right now and will be home in about 6 hours. I'll post it then.
No problem concerning posting the fstab but you'll have to wait until I get home. I'm at the office right now and will be home in about 6 hours. I'll post it then.
Install grub on hd0. Reread my last post. Your grub line for LFS should look like this (Presuming your kernel is in /boot
kernel /your_kernel root=/dev/sda1 ro
If for some reason you used the old ide driver, sda would be hda. This means you have installed lfs on the first partion of the first disk. Is this whet you have actually done? What did you use as a host system?
Install grub on hd0. Reread my last post. Your grub line for LFS should look like this (Presuming your kernel is in /boot
kernel /your_kernel root=/dev/sda1 ro
If for some reason you used the old ide driver, sda would be hda. This means you have installed lfs on the first partion of the first disk. Is this whet you have actually done? What did you use as a host system?
The lfs partition is listed as /dev/hda1 in fdisk and I used lenny as the host.
This is my partition table as seen from lenny, Sabayon calls them sda, but ive tried both in LFS.
Code:
-l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x95aa95aa
Device Boot Start End Blocks Id System
/dev/hda1 1 729 5855661 83 Linux
/dev/hda2 3396 4830 11526637+ 83 Linux
/dev/hda3 4831 9729 39351217+ f W95 Ext'd (LBA)
/dev/hda4 * 730 2034 10482412+ 83 Linux
/dev/hda5 4831 4960 1044193+ 82 Linux swap / Solaris
/dev/hda6 4961 8291 26756226 83 Linux
/dev/hda7 8292 9729 11550703+ 83 Linux
Partition table entries are not in disk order
Ive also tried reinstalling the Sabayon bootloader but it doesn't recognize LFS apparently.
If you're referring to me posting my fstab, then yes, this is from my LFS system, which I finished last Sunday and that boots perfectly. Why do you ask? I'm aware that this thread is about LFS, why would you think I am not?
This query is about LFS, which is about making a second system from the first one
Is this /etc/fstab from your LFS, or /etc/fstab from your host system?
I thought LFS is all about building a new system from scratch, not making a second one from the first, but using a host system to be able to use the necessary tools in it (toolchain and build environment) to put together a new system. At least that's the way I see it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.