LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-13-2010, 01:49 AM   #1
Lyle
Member
 
Registered: May 2010
Location: Guyana, South America
Distribution: Debian, Sabayon
Posts: 37

Rep: Reputation: 15
Can't boot LFS ( kernel panic - not syncing ) LFS 6.6


The following is the output following the panic

Code:
kernel panic - not syncing: Unable to mount root fs on unknown-block(2,0)
Pid:1,comm: swapper
Not tainted 2.6.32.8 #1
panic+0x75/011d
mount_block_root+0x1ce/0x1e5
mount_root+0x6b/0x8b
prepare_namespace+0x170/019d
kernel_init+0xf7/0x19d
? schedule_tail+0x16/0x42
child_rip+ 0xa/0x20
kernel_init+0x6/0x102
child_rip+0x0/0x20
 
Old 05-13-2010, 03:43 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,288

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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.
 
Old 05-13-2010, 06:30 AM   #3
Lyle
Member
 
Registered: May 2010
Location: Guyana, South America
Distribution: Debian, Sabayon
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by business_kid View Post
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.

Last edited by Lyle; 05-13-2010 at 06:32 AM.
 
Old 05-13-2010, 01:31 PM   #4
Lyle
Member
 
Registered: May 2010
Location: Guyana, South America
Distribution: Debian, Sabayon
Posts: 37

Original Poster
Rep: Reputation: 15
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.
 
Old 05-13-2010, 01:44 PM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

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
 
Old 05-14-2010, 02:19 AM   #6
Lyle
Member
 
Registered: May 2010
Location: Guyana, South America
Distribution: Debian, Sabayon
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by EricTRA View Post
Hi,

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?
 
Old 05-14-2010, 02:44 AM   #7
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

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.

Kind regards,

Eric
 
Old 05-14-2010, 04:47 AM   #8
Lyle
Member
 
Registered: May 2010
Location: Guyana, South America
Distribution: Debian, Sabayon
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by EricTRA View Post
Hello,

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.

Kind regards,

Eric
ok, thanks.
 
Old 05-14-2010, 07:34 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,288

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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?
 
Old 05-14-2010, 08:46 AM   #10
Lyle
Member
 
Registered: May 2010
Location: Guyana, South America
Distribution: Debian, Sabayon
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by business_kid View Post
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.

Last edited by Lyle; 05-14-2010 at 08:48 AM.
 
Old 05-14-2010, 09:36 AM   #11
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

As promised.
Code:
/dev/sda1     /          ext3    defaults    1     1
/dev/sda5     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
Hope that helps.

Kind regards,

Eric
 
Old 05-14-2010, 10:11 AM   #12
Lyle
Member
 
Registered: May 2010
Location: Guyana, South America
Distribution: Debian, Sabayon
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by EricTRA View Post
Hi,

As promised.
Code:
/dev/sda1     /          ext3    defaults    1     1
/dev/sda5     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
Hope that helps.

Kind regards,

Eric
thanks
 
Old 05-15-2010, 03:13 AM   #13
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,288

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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?
 
Old 05-15-2010, 03:18 AM   #14
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi business_kid,

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?

Kind regards,

Eric
 
Old 05-15-2010, 03:22 AM   #15
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Quote:
Originally Posted by business_kid View Post
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.

Kind regards,

Eric
 
  


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
LFS will not boot: kernel panic Bliepo Linux From Scratch 2 06-16-2009 03:30 PM
LFS 6.3 Kernel panic - not syncing:VFS: Unable to mount root fs on unknown-block(2,0) wyylling Linux From Scratch 4 09-24-2008 03:15 PM
Unable to boot LFS... Kernel Panic - not syncing lfs_rocks Linux From Scratch 5 04-13-2008 02:37 AM
Kernel panic on first boot -- LFS 6.2 on i686 PC. creativename Linux From Scratch 3 06-16-2007 03:32 AM
Kernel Panic lfs LFS gbiyer Linux From Scratch 8 05-07-2006 03:48 AM

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

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