Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub setup error 15: File not found
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
c0der935
n00b
n00b


Joined: 23 Aug 2013
Posts: 17
Location: Auckland,NewZealand

PostPosted: Mon Aug 26, 2013 8:17 am    Post subject: Grub setup error 15: File not found Reply with quote

First time attempting to install gentoo.
Here is what happens when I try to install grub to the MBR.

Code:
grub> root (hd0,1)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
 checking if "/boot/grub/stage1" exists... no
 checking if "/grub/stage1" exists... no

Error 15: File not found


my /boot/grub/grub.conf file
Code:
default 0
timeout 30

title Gentoo Linux 2.6.24-r5

root (hd0,1)
kernel /boot/kernel-3.10.7-gentoo root=/dev/sda4


The partitions are as follows:
/dev/sda2 -> boot
/dev/sda3 -> swap
/dev/sda4 -> root

The kernel name in the grub.conf file and the one in /boot match.

Any ideas on how to fix this error would be greatly appreciated.
_________________
Windows is great - I used it to download Linux
Back to top
View user's profile Send private message
sjorna
n00b
n00b


Joined: 29 Nov 2006
Posts: 71
Location: New South Wales, Australia

PostPosted: Mon Aug 26, 2013 9:05 am    Post subject: Reply with quote

Greetings;

Glad to hear your giving Gentoo a try. I've been using it on and off for years, and what can I say - I keep coming back! :-)

Make sure your /boot partition is mounted and try running the following command to use the grub-install utility. Replace /dev/sda with your boot device; and post the results back here.
Code:
grub-install --no-floppy /dev/sda


Cheers, and hope you enjoy Gentoo!
Back to top
View user's profile Send private message
c0der935
n00b
n00b


Joined: 23 Aug 2013
Posts: 17
Location: Auckland,NewZealand

PostPosted: Mon Aug 26, 2013 9:40 am    Post subject: Reply with quote

The results of grub-install --no-floppy /dev/sda2:

Code:
grub-install --no-floppy /dev/sda2
Probing devices to guess BIOS drives. This may take a long time.
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0) /dev/sda
(hd1) /dev/sdb


results of mount:

Code:
mount
proc on /proc type (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=111391,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on / type tmps (rw,relatime)
/dev/sr0 on /mnt/cdrom type iso9660 (ro,relatime)
/dev/loop0 on /mnt/livecd type squashfs (ro,relatime)
/dev/sr0 on /mnt/cdrom type iso9660 (ro,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /mnt/livecd/lib/firmware type tmpfs (rw,relatime)
tmpfs on /mnt/livecd/usr/portage type tmpfs (rw,relatime)
/dev/sda4 on / type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /boot type fuseblk (rw,nosuid,nodev,relatime,user_id=0,groub_id=0,allow_other,blksize=4096)
none on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=111391,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda2 on /boot type ext2 (rw)


(may be some typos in this)

I wasn't sure if it was mounted correctly so I copied out the results of typing mount.
Thanks for the encouragement, I found that I have learnt heaps trying to install gentoo!
_________________
Windows is great - I used it to download Linux
Back to top
View user's profile Send private message
sjorna
n00b
n00b


Joined: 29 Nov 2006
Posts: 71
Location: New South Wales, Australia

PostPosted: Mon Aug 26, 2013 9:46 am    Post subject: Reply with quote

It can feel like you're thrown in the deep-end a little every now and then, but it's usually someone on the Gentoo Forums that pulls me back out when I get that way!

Now, the results of the grub-install appear fine, however grub-install needs to be run against the device itself not a partition:
Code:
#grub-install --no-floppy /dev/sda    #correct
#grub-install --no-floppy /dev/sda1   #incorrect

Otherwise, it will attempt to install in the first few sectors of the partition instead of the first few sectors of the disk (which are typically reserved for the Master Boot Loader (MBR - which is what grub is).

Because you ran it with /dev/sda2, you may want to unmount and mount your boot partition before continuing to make sure it hasn't corrupted the filesystem. Good thing, though that as it's your boot partition, if it is corrupted you can re-format, copy over your bzImage, and re-emerge grub to fix everything back up.

Just check, first though, then re-run grub-install against /dev/sda not /dev/sda2.

:-)
Back to top
View user's profile Send private message
c0der935
n00b
n00b


Joined: 23 Aug 2013
Posts: 17
Location: Auckland,NewZealand

PostPosted: Mon Aug 26, 2013 9:48 am    Post subject: Reply with quote

Tried setup(hd0) again after following the advice of sjorna.

Code:
grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5 (hd0)" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd0)"... 22 sectors are embedded.
succeeded
 Running "install /grub/stage1 (hd0) (hd0)1+22 p (hd0,1)/grub/stage2 /grub/menu.lst"... succeeded
Done.


Pretty sure this is working now but could you please confirm If this is how it is supposed to look.

Thank-you so much sjorna
_________________
Windows is great - I used it to download Linux
Back to top
View user's profile Send private message
sjorna
n00b
n00b


Joined: 29 Nov 2006
Posts: 71
Location: New South Wales, Australia

PostPosted: Mon Aug 26, 2013 9:56 am    Post subject: Reply with quote

That looks about right!

Like I said though, just make sure you can umount and mount your boot partition before rebooting, because it's a pain having to boot into the LiveCD, mount your partitions, and fix whatever needs to be fixed...

Trust me, I've done it many, many times...

Otherwise, I'm just glad to have helped - the people on this forum made Gentoo usable for me, so I can only hope to do the same for someone else.

Cheers, and I hope you enjoy it!
Back to top
View user's profile Send private message
c0der935
n00b
n00b


Joined: 23 Aug 2013
Posts: 17
Location: Auckland,NewZealand

PostPosted: Mon Aug 26, 2013 9:59 am    Post subject: Reply with quote

When I rebooted I just came to the GRUB console. I don't know how to get it to boot to Gentoo.
_________________
Windows is great - I used it to download Linux
Back to top
View user's profile Send private message
sjorna
n00b
n00b


Joined: 29 Nov 2006
Posts: 71
Location: New South Wales, Australia

PostPosted: Mon Aug 26, 2013 10:02 am    Post subject: Reply with quote

Okay, well the first thing to try is to instruct the bootloader manually (which is pretty much the same as your grub.conf):
Code:
> root (hd0,1)
> kernel /boot/kernel-3.10.7-gentoo root=/dev/sda4

If that doesn't work, post the message that it gives you.
Back to top
View user's profile Send private message
c0der935
n00b
n00b


Joined: 23 Aug 2013
Posts: 17
Location: Auckland,NewZealand

PostPosted: Mon Aug 26, 2013 10:10 am    Post subject: Reply with quote

Here is what it says:

Code:
grub> root (hd0,1)
 Filesystem type is ext2fs, partition type 0x83

grub> kernel /boot/kernel-3.10.7-gentoo root=/dev/sda4

Error 15: File not found

_________________
Windows is great - I used it to download Linux
Back to top
View user's profile Send private message
sjorna
n00b
n00b


Joined: 29 Nov 2006
Posts: 71
Location: New South Wales, Australia

PostPosted: Mon Aug 26, 2013 10:20 am    Post subject: Reply with quote

Okay, you have two options here:

You can either keep trying to debug why grub can't find your kernel. For that, try typing in just `kernel /` then press <tab> to list possible files. It could be that you don't have the '/boot' symlink on your boot partition (which would make '/boot/kernel-1.2.3' and '/kernel-1.2.3' the same thing).
Code:
grub> root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83

grub> kernel /<tab>
 Possible files are: lost+found .keep kernel-3.8.13-gentoo.img boot grub kernel-3.10.7-gentoo.img initramfs-splash


The other option is to boot back into your LiveCD and try and mount your boot partition. If that works, you can try re-installing the bootloader. If it fails, you can reformat your boot partition, then copy over your kernel and re-emerge grub, and then re-install the bootloader.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum