Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub Error 15, not found issue
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
Gremnon
n00b
n00b


Joined: 28 Jan 2010
Posts: 50
Location: UK

PostPosted: Fri May 27, 2011 4:07 pm    Post subject: Grub Error 15, not found issue Reply with quote

Followed the handbook to install gentoo. All went well, went with genkernel for the kernel and a separate /boot partition.

/boot is on /dev/sda9, and / is on sda10. Grub was installed to sda9 because there are other systems on this box that I don't want to disturb.

When attempting to make the first load of Gentoo from it's own grub entries, it results in an error 15, file not found.

GRUB2 from other systems notices the presence of Gentoo on sda10, but does not create entries for either it or it's grub. I may be wrong, but when coupled with OS-Prober (also present) isn't it meant to create one of the two such entries?

Will add offending grub.cfg shortly.
[edit] gentoo grub.cfg below:
Code:
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.

default 0
timeout 30
#splashimage=(hd0,8)/grub/splash.xpm.gz

title Gentoo Linux 2.6.39-r4
root (hd0,8)
kernel /boot/kernel-genkernel-x86-2.6.39-gentoo-r4 real_root=/dev/sda10
initrd /boot/initramfs-genkernel-x86-2.6.39-gentoo-r4

title Gentoo Linux 2.6.39-r4 (rescue)
root (hd0,8)
kernel /boot/kernel-genkernel-x86-2.6.39-r4 real_root=/dev/sda10 init=/bin/bb
initrd /boot/initramfs-genkernel-x86-2.6.39-gentoo-r4

# vim:ft=conf:
Back to top
View user's profile Send private message
webbruno
n00b
n00b


Joined: 01 May 2010
Posts: 24

PostPosted: Fri May 27, 2011 5:00 pm    Post subject: Reply with quote

Boot from the liveCD

mount your filesystem under /mnt/gentoo
mount proc and bind your /dev to /mnt/gentoo/dev
chroot to /mnt/gentoo

type

Code:
grub --no-floppy


and then

Code:
find /boot/kernel-genkernel-x86-2.6.39-gentoo-r4


this should tell you where in your disk your kernel is (most likely it's on hd(0,9))
Back to top
View user's profile Send private message
Gremnon
n00b
n00b


Joined: 28 Jan 2010
Posts: 50
Location: UK

PostPosted: Fri May 27, 2011 5:06 pm    Post subject: Reply with quote

Both with and without the '/boot' prefix, I get the same error 15 when trying to find the kernel files.
I'm guessing this isn't normal, but I don't understand why I'm getting it - I've followed the handbook, with the single exception of installing grub to the partition and not MBR.
Back to top
View user's profile Send private message
webbruno
n00b
n00b


Joined: 01 May 2010
Posts: 24

PostPosted: Fri May 27, 2011 5:17 pm    Post subject: Re: Grub Error 15, not found issue Reply with quote

Gremnon wrote:
Followed the handbook to install gentoo. All went well, went with genkernel for the kernel and a separate /boot partition.

/boot is on /dev/sda9, and / is on sda10. Grub was installed to sda9 because there are other systems on this box that I don't want to disturb.

When attempting to make the first load of Gentoo from it's own grub entries, it results in an error 15, file not found.

GRUB2 from other systems notices the presence of Gentoo on sda10, but does not create entries for either it or it's grub. I may be wrong, but when coupled with OS-Prober (also present) isn't it meant to create one of the two such entries?

Will add offending grub.cfg shortly.
[edit] gentoo grub.cfg below:
Code:
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.

default 0
timeout 30
#splashimage=(hd0,8)/grub/splash.xpm.gz

title Gentoo Linux 2.6.39-r4
root (hd0,8)
kernel /boot/kernel-genkernel-x86-2.6.39-gentoo-r4 real_root=/dev/sda10
initrd /boot/initramfs-genkernel-x86-2.6.39-gentoo-r4

title Gentoo Linux 2.6.39-r4 (rescue)
root (hd0,8)
kernel /boot/kernel-genkernel-x86-2.6.39-r4 real_root=/dev/sda10 init=/bin/bb
initrd /boot/initramfs-genkernel-x86-2.6.39-gentoo-r4

# vim:ft=conf:


As you can see you have root on (hd0,8 ) (which in GRUB legacy /dev/sda9) but you're passing /dev/sda10 as root...

If the problem happens before the grub being loaded, boot from the live{CD,USB,Whatever}, chroot and then

Code:
grub --no-floppy


and on grub:

Code:

>root (hd0,8)
>setup (hd0)
>quit


EDIT: BTW, even if you are installing on a partition instead of the whole disk, you must setup (hd0) anyway
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Fri May 27, 2011 6:03 pm    Post subject: Re: Grub Error 15, not found issue Reply with quote

Gremnon wrote:
...
GRUB2 from other systems notices the presence of Gentoo on sda10, but does not create entries for either it or it's grub. I may be wrong, but when coupled with OS-Prober (also present) isn't it meant to create one of the two such entries?

In my setup grub-2 with os-prober creates entries perfectly for every OS (gentoo, haikuos, win7) installed. Even Haiku OS entry is created. You said you installed grub to the partition and not MBR. So you have to chainload grub-2 whatever boot manager you have on mbr (grub-1, ntldr?).
In my setup I use win7 boot manager to boot grub-2 which is installed at /boot partition.
Anyway, what commands did you used to get the grub-2 menu entries? Since you use separate /boot partition, you can use it instead of mbr like this:

Grub-2 install using ntldr to load grub-2
This way, you can boot with ntldr into win7 and linux. And also with grub-2 can boot win7 and linux. It will be safe, because linux won't mess with mbr and windows patitions.
1) Install easybcd-2 in windows and create an entry for linux referring to your /boot partition. For type choese FreeBSD. I did not choosed grub2 because it did not worked.. For device, choose "Partition 9 (linux - size)" for your setup.
From bootloade menu, choose partition: your win7 boot partition. (for me it is: "Partition 1 (NTFS - 100 MiB)".
Then choose Install Vista/7 bootloader to the mbr.
And press buuton "Write MBR"
2) Boot into gentoo and emerge grub-2 and os-prober (I use os-prober-1.47 in my overlay because it can also detect HaikuOS)
Code:

emege -va grub os-prober

It may not be needed but just for being safe, mount other OS you have (sabayon, etc). So the kernel images can be found.
Then install and create a grub-2 config like this:
Code:

mount /boot
grub-mkconfig -o /boot/grub/grub.cfg
grub-install --force /dev/sda9

Since we are not installing grub-2 to mbr, we use "--force" switch above. Actually, the second command has a "--root-directory=/boot part, but grub Can't find kernel images if you use it like this:
grub-install --force --root-directory=/boot /dev/sda9
So I recommend don't use it, just stick with the code snipped above.

You may want to look at Gentoo Grub Error Collection.
_________________
Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1"


Last edited by keenblade on Fri May 27, 2011 11:57 pm; edited 5 times in total
Back to top
View user's profile Send private message
Gremnon
n00b
n00b


Joined: 28 Jan 2010
Posts: 50
Location: UK

PostPosted: Fri May 27, 2011 9:34 pm    Post subject: Reply with quote

Well I was going to try both solutions in order... and the bootloader in the MBR was the Windows 7 ntldr...
but after follow webbruno's solution, I now have GRUB on the MBR, and no access to Windows 7 or Sabayon's GRUB 2 on the system, and to top it all off, GRUB is still giving me the Error 15: File not found even after all that.
I was going to try to get Sabayon's GRUB2 to gain a gentoo entry following keenblade's instructions, but with no access...

Unless someone knows a way to restore ntldr first, I'm going nowhere with any system on this laptop now.

And I apologise if any of that sounds unkind. I might be a little miffed, but I'm not annoyed or anything. Honest.
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Fri May 27, 2011 9:42 pm    Post subject: Reply with quote

Gremnon, do you have a win7 install cd , rescue disk, or a rescue partition? you can restore ntldr from any of them.
Also did you mount /boot partition before running grub-2 commands?
_________________
Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1"


Last edited by keenblade on Fri May 27, 2011 9:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
Gremnon
n00b
n00b


Joined: 28 Jan 2010
Posts: 50
Location: UK

PostPosted: Fri May 27, 2011 9:43 pm    Post subject: Reply with quote

I might have a vista rescue disk, but I don't think I've got an install or rescue for 7, and I know I don't have a rescue partition. At least, not one that isn't going to completely wipe whatever else is on the disk and restore it to factory fresh, something I'll know it'll do because I checked it as soon as I got the laptop so I'd know in future. It's the little things that count when embuggrances like this crop up.

Edit: No, I didn't get as far as the GRUB2 commands. Gentoo is using GRUB (legacy); it's the Sabayon install that has GRUB2, and since this has effectively barred access to all systems, I can't get to GRUB2 to issue them.
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Fri May 27, 2011 10:00 pm    Post subject: Reply with quote

I think you can use windows-7-system-repair-discs to repair win7 mbr. Also they have a win7 boot manager editor that can boot linux within ntldr called EasyBCD-2. After you repair boot, I suggest to use it. so you don't have to mess with grub-2 and mbr. You will just install grub-2 to your /boot partition.
_________________
Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1"
Back to top
View user's profile Send private message
Gremnon
n00b
n00b


Joined: 28 Jan 2010
Posts: 50
Location: UK

PostPosted: Fri May 27, 2011 10:15 pm    Post subject: Reply with quote

Okay... it seems the repair partition did have the capability needed, I just didn't realise it.
I now have the ntldr back, with it's chainload entry for Sabayon (which was added by EasyBCD)
I also used EasyBCD to add a legacy GRUB entry to load Gentoo, though again it still says Error 15, etc...

As to using GRUB2... two reasons against... when I first put Sabayon on, I was advised to use ntldr and chainload as it is right now because Windows 7 wouldn't boot if chainloaded from GRUB2... that's the first.
The second is, I don't really want to switch this Gentoo install to GRUB2 without some measure of handbook or handbook-like guide I can follow and understand, which I understand is hard to come by with the mess that is GRUB2 - I prefer legacy if possible, but if GRUB2 is going to be the only way to fix this... I'd rather do it with some kind of HowTo, I guess.
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Fri May 27, 2011 10:45 pm    Post subject: Reply with quote

Gremnon wrote:
Okay... it seems the repair partition did have the capability needed, I just didn't realise it.
I now have the ntldr back, with it's chainload entry for Sabayon (which was added by EasyBCD)
I also used EasyBCD to add a legacy GRUB entry to load Gentoo, though again it still says Error 15, etc...

If you use grub-2 you have to use EasyBCD-2.
Quote:

As to using GRUB2... two reasons against... when I first put Sabayon on, I was advised to use ntldr and chainload as it is right now because Windows 7 wouldn't boot if chainloaded from GRUB2... that's the first.

Grub-2 can chainload win7 fine.
Quote:

The second is, I don't really want to switch this Gentoo install to GRUB2 without some measure of handbook or handbook-like guide I can follow and understand, which I understand is hard to come by with the mess that is GRUB2 - I prefer legacy if possible, but if GRUB2 is going to be the only way to fix this... I'd rather do it with some kind of HowTo, I guess.

I think grub-2 is easier and safe. I highly recommend it. Since it creates all entries, there is no risk of typos in grub.conf. And it is pretty ok to edit the created grub.conf by hand.
If you decide to go with grub-2, I can write my way of installing.
_________________
Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1"
Back to top
View user's profile Send private message
Gremnon
n00b
n00b


Joined: 28 Jan 2010
Posts: 50
Location: UK

PostPosted: Fri May 27, 2011 10:47 pm    Post subject: Reply with quote

Now I know how to restore ntldr if I hit trouble, I'll give it a try. Having it handle the entries automagically would definitely cut out the user-error on my part, at least, and gods know how many times that's caused me trouble.
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Fri May 27, 2011 11:11 pm    Post subject: Reply with quote

I added a mini howto in my firs post in this thread. You can try.
_________________
Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1"
Back to top
View user's profile Send private message
Gremnon
n00b
n00b


Joined: 28 Jan 2010
Posts: 50
Location: UK

PostPosted: Fri May 27, 2011 11:24 pm    Post subject: Reply with quote

Um, just one thing thing. Just which overlay do you enable to get GRUB2 to show up?
(Since I kinda haven't figured out how to search overlays not enabled, and I figure probably best not to enable them all until I find one...)
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Fri May 27, 2011 11:35 pm    Post subject: Reply with quote

It is already in portage, not from an overlay. sys-boot/grub-1.99_rc1. You need to add it to your /etc/portage/package.keywords file like this:
Code:

=sys-boot/grub-1.99_rc1 **

_________________
Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1"
Back to top
View user's profile Send private message
Gremnon
n00b
n00b


Joined: 28 Jan 2010
Posts: 50
Location: UK

PostPosted: Sat May 28, 2011 12:28 am    Post subject: Reply with quote

Got that now.
Now I'm trying to figure out how to create a second GRUB2 entry via EasyBCD... since it auto-detects, and picks up Sabayon first - which I've run the grub-mkconfig for, and which picked up the Gentoo system this time... but failed to boot it, saying the kernel needed to be loaded first.
So I'm guessing either I need to rearrange and put Sabayon after Gentoo, or give up Sabayon. Would rather not, but I guess if there's no other way... well, I can make a backup and go back if things go pear shaped.
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Sat May 28, 2011 2:24 am    Post subject: Reply with quote

Gremnon wrote:
Got that now.
Now I'm trying to figure out how to create a second GRUB2 entry via EasyBCD... since it auto-detects, and picks up Sabayon first..

Don't use grub2 within EasyBCD, choose FreeBSD and for device select Partition 9 (linux - size)". It will chainload grub2 fine. Plus you will use the gentoo grub2. If it does not work, choose grub legacy inn easybcd and specify Partition 9, as well.
_________________
Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1"
Back to top
View user's profile Send private message
Gremnon
n00b
n00b


Joined: 28 Jan 2010
Posts: 50
Location: UK

PostPosted: Sat May 28, 2011 8:46 am    Post subject: Reply with quote

Both gave me an unresponsive black screen.
While creating the entries though, I noticed that EasyBCD couldn't see past sda9 to sda10, the root of the Gentoo install - I'm probably wrong, since GRUB and 2 as far as I know aren't limited in how many partitions and such, but could that be the reason why nothing seems to make it boot?
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Sat May 28, 2011 9:17 am    Post subject: Reply with quote

Gremnon wrote:
...I noticed that EasyBCD couldn't see past sda9 to sda10, the root of the Gentoo install - I'm probably wrong, since GRUB and 2 as far as I know aren't limited in how many partitions and such, but could that be the reason why nothing seems to make it boot?

Which version of EasyBCD do you use? You must use EasyBCD version-2. It sees all my 15 partitions. Since your easybcd can't see sda9, you have to fix that first. You are right, that must be the reason.
_________________
Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1"
Back to top
View user's profile Send private message
Gremnon
n00b
n00b


Joined: 28 Jan 2010
Posts: 50
Location: UK

PostPosted: Sat May 28, 2011 9:20 am    Post subject: Reply with quote

As far as I know, 2.0.2. Would it matter if it were run under a 64-bit version of Windows? Probably not, but I'm trying to think of all possibilities.
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Sat May 28, 2011 9:23 am    Post subject: Reply with quote

Mine is an 64-bit version of Windows 7.

EDIT : Try to give UUID to your partitions. It may help, I think.
To see your current situation:
Code:

blkid

My box outputs this for /boot and / :
Code:

/dev/sda5: UUID="b9744580-8793-46df-8022-0b6e295f9625" TYPE="ext2"
/dev/sda7: UUID="ab8330a0-040a-422b-8f94-66d9bcd7ad5f" TYPE="reiserfs"

_________________
Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1"
Back to top
View user's profile Send private message
Gremnon
n00b
n00b


Joined: 28 Jan 2010
Posts: 50
Location: UK

PostPosted: Sat May 28, 2011 10:18 am    Post subject: Reply with quote

This is what it gives me for the same:
Code:
/dev/sda1: LABEL="PQSERVICE" UUID="9C9ECBC79ECB9862" TYPE="ntfs"
/dev/sda2: LABEL="SYSTEM RESERVED" UUID="6448CC3548CC082E" TYPE="ntfs"
/dev/sda3: LABEL="Acer" UUID="E682CDB982CD8E8D" TYPE="ntfs"
/dev/sda6: LABEL="backup" UUID="64ff7002-bcc2-4ed2-82bb-fb15c560a305" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda8: UUID="620db623-aba1-4615-8e4d-24e3c03fe590" TYPE="swap"
/dev/sda5: UUID="0a88ec3e-5b1f-45b0-813c-789b9ce10cc8" TYPE="ext2"
/dev/sda10: LABEL="gentoo-root" UUID="b7af9fcb-5ccc-4262-ae62-4384bb3f7ec6" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda9: LABEL="gentoo-boot" UUID="ee6cef84-65d8-4bdd-8796-5b11aadc9df9" TYPE="ext2"
/dev/sda7: UUID="26a66a37-fd66-4cb9-8120-8d7401add0b1" SEC_TYPE="ext2" TYPE="ext3"


sda1 appears to be the Recovery partition, and 2 I'm told is the Windows 7 Boot partition, though whenever ntldr isn't in the MBR it's never worked. 3 of course is Windows itself.
sda4 isn't shown as it's the extended partition containing the rest, 6 being, as labeled, my backup storage. 7 is Sabayon (5 is the /boot partition for it), the rest is fairly obvious.
I admit it's probably not the best layout, but I've never been one for being organized with partitions.

I also re-downloaded the latest version of EasyBCD - it can see sda1-9, but still not 10.
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Sat May 28, 2011 10:57 am    Post subject: Reply with quote

Gremnon wrote:
This is what it gives me for the same:
Code:

/dev/sda5: UUID="0a88ec3e-5b1f-45b0-813c-789b9ce10cc8" TYPE="ext2"
/dev/sda9: LABEL="gentoo-boot" UUID="ee6cef84-65d8-4bdd-8796-5b11aadc9df9" TYPE="ext2"

(5 is the /boot partition for it), the rest is fairly obvious...

I think you don't need two seperate /boot partition. Use the sda5 for both gentoo and sabayon. Since easybcd sees sda5 you will be able to boot both gentoo and sabayon from it.
So, boot into gentoo. Change /boot partition to sda5 in fstab. Copy gentoo kernel images (also initrd since you use genkernel) to /boot from old sda9 partition to sda5. Then just install grub2 to sda5 within gentoo.
Code:

mount /boot
grub-mkconfig -o /boot/grub/grub.cfg
grub-install --force /dev/sda5

Then before booting, control the generated /boot/grub/grub.cfg, since you may have to edit. In menu entries change the following lines:
you need something like this for gentoo:
Code:

set root='(hd0,msdos5)'
linux   /kernel-x86_64-2.6.39-gentoo root=/dev/sda10 ro

and something like this for sabayon:
Code:

set root='(hd0,msdos5)'
linux   /kernel-x86_64-2.6.39-sabayon root=/dev/sda7 ro

and something like this for win7
Code:

menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
   insmod part_msdos
   insmod ntfs
   set root='(hd0,msdos2)'
   search --no-floppy --fs-uuid --set=root 6448CC3548CC082E
   chainloader +1
}

_________________
Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1"
Back to top
View user's profile Send private message
Gremnon
n00b
n00b


Joined: 28 Jan 2010
Posts: 50
Location: UK

PostPosted: Sat May 28, 2011 3:07 pm    Post subject: Reply with quote

And at last we've got it. All three systems neatly working side by side finally.
All that's left now is to figure out how to make modules load in a specific order when booting so I can get networking to work again, and I'll finally be on the way to getting the gentoo desktop I've been after for ages.
Thanks for your help.
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Sat May 28, 2011 4:26 pm    Post subject: Reply with quote

Nice to hear you got your system booting. For your network problem it is better to open a new topic. So people will notice and help.
_________________
Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1"
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