-   Linux - Newbie (
-   -   Error 15 : File not found (

hifun 03-31-2009 03:56 AM

Error 15 : File not found
I am using Fedora-8 and currently learning about grub.
On booting my system,in grub shell I typed
find /boot/grub/stage1
It flashes an error
Error 15: File not found
Then I simply boot my system and checked stage1 file.It was there.
Why it was not showing in grub shell?

alan_ri 03-31-2009 05:17 AM

Welcome to LQ!
That would be because that file is hidden from GRUB or you're not running that command as root..You can run

grub> unhide (hd0) 
grub> find /boot/grub/stage1

Maybe you'll need to change the code to (hd0,x).It should show something then.
This could be because you maybe have Windoze on some other partition and not on the first one.

hifun 03-31-2009 07:29 AM

Thanks alan_ri,
I am running this command as superuser
I've tried your solution. While unhide (hd0),an error was falsing.
Error 30: Invalid Argument
My Windows is on first partition ie (hd0,0).
How to solve this?:confused:

alan_ri 03-31-2009 07:45 AM


grub> unhide (hd0,0)
Or use Fedora's partition number in the code,but remember,for example /dev/hda5 would be (hd0,4).

hifun 03-31-2009 08:07 AM

while unhide (hd0,4) an error was shown
Error 5: Partition table invalid or corrupt
One magic happened:
before running unhide, on fdisk -l all /dev/sda1 to /dev/sda5 was there, but after running unhide, fdisk -l only showing upto /dev/sda4,with and error
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)
Then I did fdisk /dev/sda and press w(rite) , it again gave an error
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

What is this?
I think, my system is full of errors and warnings.:scratch:

alan_ri 03-31-2009 08:33 AM

Please reboot and post the output of

fdisk -l

gedit /boot/grub/grub.conf

hifun 03-31-2009 10:10 AM

strange things are happening:confused:
I rebooted my system and after linux kernel uncompressed, hell lot of errors were there.

monut: Could not find the filesystem '/dev/mount
setuproot: moving /dev/failed :No such file or directory
setuproot: error mounting /proc :No such file or directory
setuproot: error mounting /sys :No such file or directory
switchroot: mount failed :No such file or directory

and system hangs.
I am posting this from windows_XP:o, how to fix the problem?

alan_ri 03-31-2009 11:14 AM

You wrote a new partition table with fdisk and you messed up some things.That's why it's not good to use commands that you don't understand completly what they can do.
Do you have some program in Windoze to see your current hard disk state (partitions) and can you say how your disk was partitioned before this?
On what partition was Fedora installed and did you maybe had a separate /boot partition?

hifun 04-01-2009 11:52 PM

I have no such software. I have one ext2-fsd which shows linux partition on windows.But now, it says unavailable location to linux and swap partition.But yes, seprate /boot partition is good. I can still see /boot in windows.
How can I get back my linux.

alan_ri 04-02-2009 02:13 AM

Have a look here;1,2.Remember,you must know where is your /root partition and point Grub to it,so that Fedora would run,also you must know where is /boot partition,so that Grub would be installed on the right partition.Maybe you should install Grub to MBR.
Have a look here,too.

hifun 04-02-2009 04:36 AM

Thank you man. Testdisk worked. :)
My grub need not be reinstalled as only partition table was corrupted( only pointers were lost may be) , i think. One more question,while installing grub stage1 is installed in MBR, does this file do anything with 64 bytes of partition table?:confused:
And yes, my previous query was still not solved., ie GRUB shell still not able to find /boot/grub/stage1.:confused:

hifun 04-02-2009 05:00 AM

Also I didnt understand working of Test-Disk. It was showing 4 partitions . I analysed with it and re-write partition table. Then there were 5. How ?

alan_ri 04-02-2009 05:06 AM

Grub stage1 only points to Grub stage2.
Have you tried

find /stage1
It was 5 because you said that you had 5 before.

hifun 04-02-2009 07:37 AM


grub> find /stage1

Error 15: File not found

grub> find /boot/grub/stage1

Error 15: File not found

after exiting from grub

[root@localhost ~]# ls -ld /boot/grub/stage1
-rw-r--r-- 1 root root 512 Apr  2 13:53 /boot/grub/stage1
[root@localhost ~]#

Now where's the problem ?:confused:

alan_ri 04-02-2009 08:00 AM

Please post the output of /boot/grub/grub.conf.
Also ls -l in /boot/grub directory and fdisk -l.

hifun 04-02-2009 08:22 AM


[root@localhost ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,1)
#          kernel /vmlinuz-version ro root=/dev/sda5
#          initrd /initrd-version.img
title Fedora (2.6.21-2950.fc8xen)
        root (hd0,1)
        kernel /xen.gz-2.6.21-2950.fc8
        module /vmlinuz-2.6.21-2950.fc8xen ro root=LABEL=/ rhgb quiet
        module /initrd-2.6.21-2950.fc8xen.img
title Fedora-base (
        root (hd0,1)
        kernel /vmlinuz- ro root=LABEL=/ rhgb quiet
        initrd /initrd-
title Windows XP
        rootnoverify (hd0,0)
        chainloader +1
[root@localhost ~]#


[root@localhost ~]# ls -l /boot/grub
total 203
-rw-r--r-- 1 root root    63 Feb 18 10:30
-rw-r--r-- 1 root root  8096 Apr  2 13:53 e2fs_stage1_5
-rw-r--r-- 1 root root  7936 Apr  2 13:53 fat_stage1_5
-rw-r--r-- 1 root root  7200 Apr  2 13:53 ffs_stage1_5
-rw------- 1 root root    819 Feb 18 10:30 grub.conf
-rw-r--r-- 1 root root  7200 Apr  2 13:53 iso9660_stage1_5
-rw-r--r-- 1 root root  8672 Apr  2 13:53 jfs_stage1_5
lrwxrwxrwx 1 root root    11 Feb 18 10:30 menu.lst -> ./grub.conf
-rw-r--r-- 1 root root  7328 Apr  2 13:53 minix_stage1_5
-rw-r--r-- 1 root root  9696 Apr  2 13:53 reiserfs_stage1_5
-rw-r--r-- 1 root root  7459 Oct 29  2007 splash.xpm.gz
-rw-r--r-- 1 root root    512 Apr  2 13:53 stage1
-rw-r--r-- 1 root root 105468 Apr  2 13:53 stage2
-rw-r--r-- 1 root root  7520 Apr  2 13:53 ufs2_stage1_5
-rw-r--r-- 1 root root  6752 Apr  2 13:53 vstafs_stage1_5
-rw-r--r-- 1 root root  9344 Apr  2 13:53 xfs_stage1_5
[root@localhost ~]#


[root@localhost ~]# fdisk -l

Disk /dev/sda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x35fc35fc

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        5099    40957686    7  HPFS/NTFS
/dev/sda2            5100        5112      104422+  83  Linux
/dev/sda3            5113        5239    1020127+  82  Linux swap / Solaris
/dev/sda4            5240        7297    16530885    f  W95 Ext'd (LBA)
/dev/sda5            5240        7297    16530853+  83  Linux
[root@localhost ~]#

alan_ri 04-02-2009 08:40 AM

Well I see some really strange things goin' on here.
Change this:

title Fedora-base (
        root (hd0,1)
        kernel /vmlinuz- ro root=LABEL=/ rhgb quiet
        initrd /initrd-

to look like this

title Fedora-base (
        root (hd0,1)
        kernel /vmlinuz- ro root=/dev/sda2 rhgb quiet
        initrd /initrd-

Do the same for xen,save,reboot and try to find stage1 then.

hifun 04-02-2009 09:24 AM

You could have led me in danger.I did as u said and while booting I got more errors.

mount: could not find filesystem /dev/root
setuproot: error mounting /proc: No such file or dir
setuproot: error mounting /sys: No such file or dir
Error opening /dev/console : No such file or dir
Trying to use fd 0 instead.
nash recieved SIGABRT ! Backtrace(8)
/*files and adresses*/
WARNING: cant access (null)
exec of init ((null)) failed !!! Bad address.

then i reset my grub.conf as it was before. I've installed FC-8 several times and every time grub.conf is same and you are saying this is a strange thing.How come?

One more thing, when I'm doing find /etc/passwd grub shell returns the (hd0,4) and for other files also.But for any file in /boot directory it is not able to find.

alan_ri 04-02-2009 11:20 AM


Originally Posted by hifun (Post 3496028)
You could have led me in danger.

Well,Mr.Torvalds said that if you're using Linux you better be ready to laugh in the face of danger... :D. Just kidding.

Originally Posted by hifun (Post 3496028)
and you are saying this is a strange thing.How come?

Now I will say that it's even more strange then before,check out quote below...


Originally Posted by hifun (Post 3496028)
One more thing, when I'm doing find /etc/passwd grub shell returns the (hd0,4) and for other files also.But for any file in /boot directory it is not able to find.

That would mean that Fedora is on /dev/sda5 and it looks like it is,but how come there's no sign of it in the grub.conf?
If you want you can try with /dev/sda5 in the code I posted before.It should work.
Stage1 should be on the MBR.

find /grub/stage1
You can reinstall with installing GRUB into the directory /boot/boot/grub,so you need to create /boot directory in the /boot directory.As they say:

If you have the partition /boot and you install GRUB images into the directory /boot/grub, GRUB recognizes that the images lies under the directory /grub but not /boot/grub.
Or you can try:

grub-install --root-directory=/boot /dev/hda
Or create a symbolic link before installing GRUB, like

cd /boot && ln -s . boot
Or install GRUB by specifying the paths of GRUB images:

grub> root (hd0,1)
grub> install /grub/stage1 d (hd0) /grub/stage2 p /grub/menu.lst  [-You'll need grub.conf instead menu.lst -]

But remember,sometimes find /grub/stage1 will work and sometimes find /boot/grub/stage1.It depends.

malekmustaq 04-02-2009 12:33 PM


Another way at solving your boot prob is doing it "outside" grub: try reinstall grub in your linux /boot, then install grub also into the MBR.

The first procedure is booting through your live cd. Chroot to the linux partition install grub package as you would install other software package.

Then at the bash prompt: grub-install /dev/sda
<you wouldn't need use (hd0,0) because you are dealing with bash not with grub prompt.

The second part writes the usual boot image into the mbr; you don't need specify what stage, usually stage 1.5 is enough. (I have a disk containing more than ten partitions yet grub stage 1.5 has no problem loading the systems.)

Please read grub tutorials available on web before using the procedure here, it is wise to get familiar with grub before using it.

Good luck.

Hope this helps.

hifun 04-02-2009 03:18 PM

Thanks again. find /grub/stage1 worked.As u said it depends...on what.?
if you are saying root=/dev/sda5 is valid then what does root=LABEL=/ means?
Thanks you too. I already know steps suggested by you.I've read some tutorials.
Tell me one thing ,how can system loads w/o GRUB stage2, i mean system is booted through grub shell which came into existence at stage2. stage 1.5 can identify file-systems only and can find files by names anywhere in HDD (usually through LBA), main booting is done by stage2.

alan_ri 04-02-2009 03:57 PM


Originally Posted by hifun (Post 3496405)
Thanks again. find /grub/stage1 worked.As u said it depends...on what.?
if you are saying root=/dev/sda5 is valid then what does root=LABEL=/ means?

It depends on where is Grub installed,maybe on other OSes installed,etc.
What I can tell you based on what I know and what they say > you should install Grub on the MBR always,do not create boot partitions,of course if you have other Linux distros there then they should go on their root partitions,logic.
About root=LABEL=/ >> well,it looks like Fedora specific some kind of labeling things.This is what I've found.

hifun 04-02-2009 05:19 PM

Thank you, your last post helped me. Now I got the thing.
I had 1 problem, but learned solutions to many.;)
Thank You once again.

All times are GMT -5. The time now is 01:59 PM.