LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-17-2009, 01:46 AM   #1
jpeters
Member
 
Registered: Mar 2009
Posts: 30

Rep: Reputation: 16
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?
 
Old 04-17-2009, 02:33 AM   #2
kandiru
Member
 
Registered: Mar 2009
Location: Genoa, Italy
Distribution: Slackware
Posts: 33

Rep: Reputation: 16
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
 
Old 04-17-2009, 02:37 AM   #3
jpeters
Member
 
Registered: Mar 2009
Posts: 30

Original Poster
Rep: Reputation: 16
The path is correct. Also, partition is correctly listed in fstab.

Last edited by jpeters; 04-17-2009 at 02:39 AM.
 
Old 04-17-2009, 02:57 AM   #4
kandiru
Member
 
Registered: Mar 2009
Location: Genoa, Italy
Distribution: Slackware
Posts: 33

Rep: Reputation: 16
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?
 
Old 04-17-2009, 04:32 AM   #5
jpeters
Member
 
Registered: Mar 2009
Posts: 30

Original Poster
Rep: Reputation: 16
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

Last edited by jpeters; 04-17-2009 at 04:40 AM.
 
Old 04-17-2009, 04:51 AM   #6
kandiru
Member
 
Registered: Mar 2009
Location: Genoa, Italy
Distribution: Slackware
Posts: 33

Rep: Reputation: 16
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
 
Old 04-17-2009, 05:05 AM   #7
kandiru
Member
 
Registered: Mar 2009
Location: Genoa, Italy
Distribution: Slackware
Posts: 33

Rep: Reputation: 16
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?
 
Old 04-17-2009, 10:45 AM   #8
jpeters
Member
 
Registered: Mar 2009
Posts: 30

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by kandiru View Post
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
 
Old 04-17-2009, 11:04 AM   #9
kandiru
Member
 
Registered: Mar 2009
Location: Genoa, Italy
Distribution: Slackware
Posts: 33

Rep: Reputation: 16
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
 
Old 04-17-2009, 11:08 AM   #10
kandiru
Member
 
Registered: Mar 2009
Location: Genoa, Italy
Distribution: Slackware
Posts: 33

Rep: Reputation: 16
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 )
 
Old 04-17-2009, 12:19 PM   #11
jpeters
Member
 
Registered: Mar 2009
Posts: 30

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by kandiru View Post
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

Last edited by jpeters; 04-17-2009 at 12:50 PM.
 
Old 04-17-2009, 12:51 PM   #12
kandiru
Member
 
Registered: Mar 2009
Location: Genoa, Italy
Distribution: Slackware
Posts: 33

Rep: Reputation: 16
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?
 
Old 04-17-2009, 02:03 PM   #13
jpeters
Member
 
Registered: Mar 2009
Posts: 30

Original Poster
Rep: Reputation: 16
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%
 
Old 04-19-2009, 08:28 AM   #14
kandiru
Member
 
Registered: Mar 2009
Location: Genoa, Italy
Distribution: Slackware
Posts: 33

Rep: Reputation: 16
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)?
 
Old 04-19-2009, 05:24 PM   #15
jpeters
Member
 
Registered: Mar 2009
Posts: 30

Original Poster
Rep: Reputation: 16
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.
 
  


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
Older Grub will not boot newer Suse: error 15 File not found ronaldv SUSE / openSUSE 3 10-08-2008 03:53 AM
how to execute a script file? Have file/directory not found error sirius57 Linux - Software 2 11-21-2007 11:43 PM
grub Error 15: File not found lowbrow Debian 2 11-10-2007 06:52 PM
GRUB, SUSE, Error 15 File Not Found fizgigtiznalkie Linux - Distributions 2 08-31-2004 05:38 PM
grub 'file not found' iidbis Linux - General 1 02-02-2004 04:13 PM

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

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