LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   grub > Error 15: File not found (http://www.linuxquestions.org/questions/linux-from-scratch-13/grub-error-15-file-not-found-719769/)

jpeters 04-17-2009 01:46 AM

grub > Error 15: File not found
 
I'm trying to add LFS to two other grub installs on my /menu.list, but
can't get grub to find /boot/lfskernel-2.6.27.4.

Code:

grub> root (hd0,3)
  Filesystem type is ext2fs, partition type 0x83

grub> kernel /boot/lfskernel-2.6.27.4
  Error 15: File not found

grub> find (hd0,3)/boot/lfskernel-2.6.27.4
  Error 15: File not found

I'm trying to avoid overwriting my current MBR, and had no luck with
"setup (hd0,3)"

Code:

grub> setup (hd0,3)
  Error 12: Invalid device requested

Is there any way to add LFS to a current MBR?

kandiru 04-17-2009 02:33 AM

Hello,

I'm not yet acquainted with LFS (I'm beginning now to build my own LFS)

anyway are you sure the partition you gave to grub is correct?

I mean (hd0,3) refers to "/dev/hda4", from the error

Quote:

grub> kernel /boot/lfskernel-2.6.27.4
Error 15: File not found
it seems that you don't have the file "lfskernel-2.6.27.4" in the directory "boot" in your "/" partition (hd0,3).

Bye

David

jpeters 04-17-2009 02:37 AM

The path is correct. Also, partition is correctly listed in fstab.

kandiru 04-17-2009 02:57 AM

Ok,

can you try the following command to list the possible files hitting tab,

Quote:


grub> kernel (hd0,3)/boot/ <<tab>>

and post the result?

jpeters 04-17-2009 04:32 AM

Tab doesn't 'complete' anything

Code:

grub> kernel (hd0,3)/boot/
 Error 15: File not found

grub> kernel (hd0,3)/boot/*
  Error 15: File not found


kandiru 04-17-2009 04:51 AM

So,

the

Quote:

Error 15: File not found
after the

Quote:

grub> kernel (hd0,3)/boot/
command does it appear immediatly after you hit the tab button?

The boot directory you are using is the same used for booting other linux distro?

Could you please give the following commands and post the result?

When you are in front of the Grub prompt:
grub>
If you installed a /boot partition:

Code:

find /grub/stage1
If you did not do a /boot partition:


Code:

find /boot/grub/stage1
Using the info found above:

Code:

root (hd0,X)
then

Code:

kernel (hd0,X)/boot/  hit TAB
and see if it gives you any options.

Hope this will help to find the problem.

Bye

David

kandiru 04-17-2009 05:05 AM

By the way, what do you mean with

Quote:

Is there any way to add LFS to a current MBR?
I think you want to add a new entry to a /boot/grub/menu.lst file that you are using to boot other linux distro in your machine.

Quote:

From the GRUB manual:

15 : File not found
This error is returned if the specified file name cannot be found, but everything else (like the disk/partition info) is OK.
How was created the boot directory you want to use? What files does it contain?

What is your running distro in your machine?

jpeters 04-17-2009 10:45 AM

Quote:

Originally Posted by kandiru (Post 3512009)
So,
does it appear immediatly after you hit the tab button?

yes

Quote:

The boot directory you are using is the same used for booting other linux distro?

Could you please give the following commands and post the result?

When you are in front of the Grub prompt:
grub>
If you installed a /boot partition:

Code:

find /grub/stage1
If you did not do a /boot partition:

Code:

find /boot/grub/stage1

A separate partition was created for LFS/ with it's own boot directory.
The partition is recognized (e.g., grub > root (hda0,3), but the boot partition is not. This appears to be the issue.

Code:

grub> find /boot/grub/stage1
 (hd0,0)

I would like to add LFS to my current /boot/grub/menu.lst with:

Code:

# Linux bootable partition config begins
 title TinyCoreLinux on hda3 (tce=hda3)
 kernel (hd0,2)/tinycore/bzimage quiet restore=hda3/tc_backup nolocal tce=hda3/tcZ max_loop=55
  initrd (hd0,2)/tinycore/tinycore.gz
# Linux bootable partition config ends
#Linux bootable partition config begins
  title LFS 6.4
  root (hd0,3)
  kernel (hd0,3}/boot/lfskernel-2.6.27.4 root=/dev/hda4


kandiru 04-17-2009 11:04 AM

Can you list the content of your LFS boot directory ?

How did you create that?

It seems as if grub couldn't find there the right files (I mean stage1, stage2, and *stage1_5)

Here

in section 3.2 you can find some hints about what I mean.

Can you try the following command and see the result?

Code:

kernel (hd0,0)/boot/  hit TAB

kandiru 04-17-2009 11:08 AM

Of course the following is not the problem but in

Quote:

kernel (hd0,3}/boot/lfskernel-2.6.27.4 root=/dev/hda4
after the 3 the bracket is not } but )

jpeters 04-17-2009 12:19 PM

Quote:

Originally Posted by kandiru (Post 3512328)
Of course the following is not the problem but in



after the 3 the bracket is not } but )

right...that was just a typo. I transferred everything out of /boot
into another folder /lfs, and had more success....at least it found the file. It also booted bzImage, copied from the /arch/boot directory. This presents a new bag of problems, however, in that it doesn't accept 'root=/dev/hda4', resulting in kernel panic
Code:

Cannot open root device "hda4"
It lists available partitions only on sda

kandiru 04-17-2009 12:51 PM

Quote:

and had more success
I'm glad to hear that.

Can you post the content of the menu.lst you're using and the content of the lfs directory?

Did you use any initrd with LFS in the menu.lst file?

The bzIMage you copied does it work correctly with grub in another boot sequence?

jpeters 04-17-2009 02:03 PM

bzImage can replace the lfskernal file, with same result. I didn't try initrd since that seems to be used for opening packaged directory files (eg lfs.gz).

Code:

# GRUB configuration file '/boot/grub/menu.lst'.       
# generated by 'grubconfig'.  Tue Jun 17 00:30:55 2008 
#                                                                             
# Start GRUB global section                                                   
#timeout 30                                                                   
color light-gray/blue black/light-gray                                         
# End GRUB global section                                                     
# Linux bootable partition config begins                                       
  title Puppy Linux 400 frugal                                                 
  rootnoverify (hd0,0)                                                         
  kernel /puppy400/vmlinuz pmedia=idehd psubdir=puppy400                       
  initrd /puppy400/initrd.gz                                                   
# Linux bootable partition config ends                                         
# Linux bootable partition config begins                                       
 title TinyCoreLinux on hda3 (tce=hda3)                                       
 kernel (hd0,2)/tinycore/bzimage quiet restore=hda3/tc_backup nolocal tce=hda3/t
  initrd (hd0,2)/tinycore/tinycore.gz                                         
  # Linux bootable partition config ends                 
  #Linux bootable partition config begins               
  title LFS 6.4                                         
  root (hd0,3)                                           
  kernel (hd0,3)/lfs/lfs/lfskernel-2.6.27.4 root=/dev/hda4       
# Linux bootable partition config ends                           
- menu.lst [Readonly] 1/36 2%


kandiru 04-19-2009 08:28 AM

Quote:

Filesystem type is ext2fs, partition type 0x83
I had a kernel panic like yours when some months ago I used a kernel where the ext2 file system hadn't been compiled into the kernel image (it was compiled as a module, that's a case when you have to use a initial ramdisk file i.e. initrd.gz ).

I still don't understand why the system doesn't like your "boot" directory as it does with the "lfs" dir: do they have the same permission set (the same chmod)?

jpeters 04-19-2009 05:24 PM

There's probably no need to install another grub if using a previous installation, and there was some confusion with having two boot directories. Also, it seems necessary to configure the kernel with ext2/ext3 support for devices to be recognized. Since I already have a correctly configured kernel (same version) on puppy, I decided to simply use that one. Presently, it gets stuck with error "Unable to mount root fs on unknown block (0,13)."
I've screwed around with an initrd file, booting from other partitions, etc., etc., but so far I've yet to uncover all the mysteries of grub.


All times are GMT -5. The time now is 10:59 AM.