[lfs-support] Cannot boot to LFS with seperate boot partition

Yasser Zamani yasser.zamani at live.com
Thu Jun 21 09:04:05 PDT 2012




> Date: Thu, 21 Jun 2012 01:05:45 -0600
> From: e_lion_1 at hotmail.com
> To: lfs-support at linuxfromscratch.org
> Subject: Re: [lfs-support] Cannot boot to LFS with seperate boot partition
> 
> Hello,
> 
> On Thu, Jun 21, 2012 at 09:43:00AM +0430, Yasser Zamani wrote:
> > 
> > Hi there,
> >  
> > When I reboot to LFS with following /etc/fstab and /boot/grub/grub.cfg, 
> > after selecting the boot menu, it tells me "error: file not found"
> 
> This means that grub (the bootloader) hasn't found the linux kernel.
> 
> <snip>
> > # Begin /etc/fstab
> > # file system  mount-point  type     options             dump  fsck
> > #                                                              order
> > /dev/sda6     /             ext3     defaults            1     1
> > /dev/sda7     /boot         ext3     defaults            1     1
> 
> <snip>
> 
> > # Begin /boot/grub/grub.cfg
> > set default=0
> > set timeout=5
> > insmod ext3
> > set root=(hd0,7)
> > menuentry "GNU/Linux, Linux 3.4.1-lfs-SVN-20120617" {
> >         linux   /boot/vmlinuz-3.4.1-lfs-SVN-20120617 root=/dev/sda6 ro
> > }
> 
> <snip>
> 
> > Then I tried following /boot/grub/grub.cfg instead; the result was getting two 
> > "file not found"s but after pressing key something takes place on screen then 
> > the pc halts and CAPS LOCK and NUM LOCK's LEDs are flashing! 
> > What do these LEDs flashing mean?
> 
> This means that the kernel was found, started running and
> then hung. Usually this happens when the kernel doesn't find the root
> partition.  It also means that you are a little closer to finding a
> solution because this time grub found the linux kernel.
> 
> <snip>
> 
> > # Begin /boot/grub/grub.cfg
> > set default=0
> > set timeout=5
> > insmod ext3
> > set root=(hd0,7)
> > menuentry "GNU/Linux, Linux 3.4.1-lfs-SVN-20120617" {
> >         linux   /vmlinuz-3.4.1-lfs-SVN-20120617 root=/dev/sda7 ro
> > }
> 
> <snip>
> 
> > Could you please help me to understanding followings:
> > Which one takes place at first? Processing and applying 
> > /etc/fstab or processing /boot/grub/grub.cfg. If second one takes place at first so how it 
> > finds out that where it should look for /boot?
> 
> The GRand Unified Bootloader (grub) processes /boot/grub/grub.cfg first.
> After the kernel has booted, the system bootscripts read /etc/fstab.
> 
> > If above two question's answers can not teach me the solution, so could you please help 
> > me to sort this problem out?
> > Thanks in advance!
> 
> Let's have a look at these lines from your second try:
> 
> > set root=(hd0,7)
> This line is correct as it tells grub to look for your boot partition.
> 
> 
> This next line needs a little tweaking:
> >         linux   /vmlinuz-3.4.1-lfs-SVN-20120617 root=/dev/sda7 ro
>                   ^^^^^                                     ^^^
>                   |                                         |
>                   |                                         |
>                   |                  This is where I think the error is.
>                   This part is good.
> root=/dev/XXX should match the root in /etc/fstab.  In your case this would
> be /dev/sda6.
> 
> Try:
>           linux   /vmlinuz-3.4.1-lfs-SVN-20120617 root=/dev/sda6 ro

Thanks a lot Andrew; Now, system can find Linux kernel and boot to the root :)
But at first, it tells "error: file not found" and I have to press a key to continue; do you have any idea please?
Thanks!

> 
> Also, you will find editing the /boot/grub/grub.cfg easier with vim.
> There is a little bit of a learning curve, so finding an online tutorial
> is a good idea.
> 
> Best of luck!
> ae
> 
> -- 
> My Blog: http://elian001.wordpress.com
> -- 
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20120621/1b515ab8/attachment.html>


More information about the lfs-support mailing list