LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-26-2009, 10:51 PM   #1
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Rep: Reputation: 16
Trouble with GRUB


I'm almost done with LFS. Only thing left is the bootloader. However, when I try to boot into the LFS partition, I get a Kernel panic. When I try to boot into the host, I get GRUB error 15. Note that /dev/sda1 (or (hd0,0)) is the host, /dev/sda2 is the extended partition that has the swap (/dev/sda5) in it, and /dev/sda3 (or (hd0,2)) is LFS.

This is the kernel panic message:

Code:
*Lots of stuff, I'm posting starting from the first error I found*
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "UUID=211a5e31-25dd-41f4-ac28-3498c928fa79" or unknown-block(2,0)
Please append a correct "root=" boot option: here are the available options:
 0800   20971520 sda driver: sd
   0801    9767488 sda1
   0802          1 sda2
   0803   10217340 sda3
 0b00    1048575 sr0 driver: sr
Kernal panic - not syncing: VFS: Unable to mount root fs on unknown-block (2,0)
Here are the contents of the grub menu.lst inside the LFS partition.

Code:
title LFS 6.4
uuid 	211a5e31-25dd-41f4-ac28-3498c928fa79
root (hd0,2)
kernel /boot/lfskernel-2.6.27.4 root=UUID=211a5e31-25dd-41f4-ac28-3498c928fa79

title		Ubuntu 9.04, kernel 2.6.28-13-generic
uuid		249b9a7e-996f-4d0d-8699-fb029e6f7286
kernel		/boot/vmlinuz-2.6.28-13-generic root=UUID=249b9a7e-996f-4d0d-8699-fb029e6f7286 ro quiet splash 
initrd		/boot/initrd.img-2.6.28-13-generic
quiet
#This section was copied and pasted from Ubuntu's (the host) menu.lst file.

Last edited by ReyJavikVI; 06-26-2009 at 10:53 PM.
 
Old 06-26-2009, 11:26 PM   #2
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
stop fighting it if you have a /boot/grub/menu.1st on sda3 or (hd0,2) then add this to your grub menu.1st
Quote:
title Linux sda3
root (hd0,2)
configfile /boot/grub/menu.lst
now grub will go to that partition and load that menu.1st then you can select your OS.
why do this it makes it easier when using uuid there is other reasons but just to keep it simple. good luck
 
Old 06-27-2009, 10:42 AM   #3
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
I solved the problem with the host by making GRUB load from its partition, but I still get the Kernel Panic. Any ideas?
 
Old 06-27-2009, 11:19 AM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,305

Rep: Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578
when you configured your kernel under file systems nfs see if root=nfs is checked, if so uncheck it. When I was installing gentoo it was a default option, and is easily overlooked.
 
Old 06-27-2009, 12:13 PM   #5
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
Yes, it's checked. Do I have to recompile the kernel? How do I do that?
 
Old 06-27-2009, 01:06 PM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,305

Rep: Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578
yes. rerun make menuconfig, make, make modules_install, and so on according to III-8 in the lfs book again. uncheck nfs=root, or is it root=nfs, when you rerun make menuconfig. do not run make mrproper otherwise you will have to redo all the other options in your config file.
 
Old 06-27-2009, 03:28 PM   #7
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
That didn't work.
 
Old 06-27-2009, 06:39 PM   #8
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,305

Rep: Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578
Then I don't know. I just know that recompiling my kernel fixed the "Unable to mount root fs via NFS, trying floppy" error that I was getting. Maybe somebody else can help
 
Old 06-28-2009, 01:27 AM   #9
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
the only reason you have a kernel panic because your not in sync. the grub loader is not loading the right root= uuid so it is not loading root it is not loading the kernel it panics it never found the kernel this all means you may have it set to the right partiton but your fstab is not right. When the init calls for root=uuid it is looking at your /etc/fstab file for where root is. so if your loading a wrong partition it is reading the wrong /etc/fstab file
untill it can find the root tree it will never find /boot/vmlinuz and that is the kernel it is not fining so it panics
theses have to be in sync grub points to the (hd0,2) there it looks for a grub menu then it reads it then it goes to that partion and looks for /etc/fstab/file there it loads the root tree and /boot/vmlinuz if you need an initrd.img then it will load it if your system has to have an initrd.img to boot then make sure it is loaded by grub so it can install the modules to get things going or you will get a kernel panic file not found.
 
Old 06-28-2009, 12:15 PM   #10
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
I'm looking at /etc/fstab, I don't understand what I am supposed to edit. And please, no offense, but could you write a little clearer? Your posts are really hard to read.
 
Old 06-28-2009, 02:46 PM   #11
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Kernel Recompile.

After you re-compiled your kernel you did copy the new one to /boot right?
 
Old 06-29-2009, 11:52 AM   #12
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
Yes, I did. Maybe I should revert to before making all the boot stuff and redo it.
 
Old 06-30-2009, 01:21 PM   #13
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,305

Rep: Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578
when you config your kernel make sure your hardware support , filesystem, and volume management items is configured into the kernel and not as modules.
 
  


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
Grub trouble Geminias Linux - Newbie 10 07-18-2006 06:13 AM
Grub Trouble RedNovember Linux - Software 13 02-20-2006 11:09 PM
Trouble with GRUB technician Linux - Software 5 02-16-2004 11:37 PM
Grub trouble p1az Linux - General 4 10-03-2003 01:20 PM
Grub trouble mcm8327 Linux - General 2 07-04-2003 09:00 AM

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

All times are GMT -5. The time now is 09:16 PM.

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