grub 2: "error: You need to load the kernel first"

View: New views
6 Messages — Rating Filter:   Alert me  

grub 2: "error: You need to load the kernel first"

by Colin Brace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I've just installed 9.10 along side F11 on a laptop.

When I boot, both the Ubuntu and Fedora installations are shown in grub.

However, when I try to boot the latter, I get an error message: "error: You need to load the kernel first"

Here is the relevant section in grub.cfg:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Fedora (2.6.30.9-90.fc11.i586) (on /dev/sda2)" {
        insmod ext2
        set root=(hd0,2)
        search --no-floppy --fs-uuid --set 5a8b0f33-5369-4a45-a501-455ed10f4fa7
        linux /boot/vmlinuz-2.6.30.9-90.fc11.i586 ro root=UUID=5a8b0f33-5369-4a45-a501-455ed10f4fa7 rhgb resume=/dev/sda3
        initrd /boot/initrd-2.6.30.9-90.fc11.i586.img
}
menuentry "Fedora (2.6.29.4-167.fc11.i586) (on /dev/sda2)" {
        insmod ext2
        set root=(hd0,2)
        search --no-floppy --fs-uuid --set 5a8b0f33-5369-4a45-a501-455ed10f4fa7
        linux /boot/vmlinuz-2.6.29.4-167.fc11.i586 ro root=UUID=5a8b0f33-5369-4a45-a501-455ed10f4fa7 resume=/dev/sda3 rhgb
        initrd /boot/initrd-2.6.29.4-167.fc11.i586.img
}
### END /etc/grub.d/30_os-prober ###

The above entries were generated automatically. The Fedora boot is on sda1, root is sd2.

Any ideas about what is going on here?

Thanks.
  Colin Brace
  Amsterdam
  http://lim.nl

Re: grub 2: "error: You need to load the kernel first"

by Goh Lip-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Colin Brace wrote:

> Hi all,
>
> I've just installed 9.10 along side F11 on a laptop.
>
> When I boot, both the Ubuntu and Fedora installations are shown in grub.
>
> However, when I try to boot the latter, I get an error message: "error: You
> need to load the kernel first"
>
> Here is the relevant section in grub.cfg:
>
> ### BEGIN /etc/grub.d/30_os-prober ###
> menuentry "Fedora (2.6.30.9-90.fc11.i586) (on /dev/sda2)" {
>         insmod ext2
>         set root=(hd0,2)
>         search --no-floppy --fs-uuid --set
> 5a8b0f33-5369-4a45-a501-455ed10f4fa7
>         linux /boot/vmlinuz-2.6.30.9-90.fc11.i586 ro
> root=UUID=5a8b0f33-5369-4a45-a501-455ed10f4fa7 rhgb resume=/dev/sda3
>         initrd /boot/initrd-2.6.30.9-90.fc11.i586.img
> }
> menuentry "Fedora (2.6.29.4-167.fc11.i586) (on /dev/sda2)" {
>         insmod ext2
>         set root=(hd0,2)
>         search --no-floppy --fs-uuid --set
> 5a8b0f33-5369-4a45-a501-455ed10f4fa7
>         linux /boot/vmlinuz-2.6.29.4-167.fc11.i586 ro
> root=UUID=5a8b0f33-5369-4a45-a501-455ed10f4fa7 resume=/dev/sda3 rhgb
>         initrd /boot/initrd-2.6.29.4-167.fc11.i586.img
> }
> ### END /etc/grub.d/30_os-prober ###
>
> The above entries were generated automatically. The Fedora boot is on sda1,
> root is sd2.
>
> Any ideas about what is going on here?
>
> Thanks.
>
> -----
>   Colin Brace
>   Amsterdam
>   http://lim.nl

Try changing
set root=(hd0,2)

to
set root=(hd0,1)

Regards,
Goh Lip


--
ubuntu-users mailing list
ubuntu-users@...
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Re: grub 2: "error: You need to load the kernel first"

by Goh Lip-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Goh Lip wrote:

> Colin Brace wrote:
>> Hi all,
>>
>> I've just installed 9.10 along side F11 on a laptop.
>>
>> When I boot, both the Ubuntu and Fedora installations are shown in grub.
>>
>> However, when I try to boot the latter, I get an error message: "error: You
>> need to load the kernel first"
>>
>> Here is the relevant section in grub.cfg:
>>
>> ### BEGIN /etc/grub.d/30_os-prober ###
>> menuentry "Fedora (2.6.30.9-90.fc11.i586) (on /dev/sda2)" {
>>         insmod ext2
>>         set root=(hd0,2)
>>         search --no-floppy --fs-uuid --set
>> 5a8b0f33-5369-4a45-a501-455ed10f4fa7
>>         linux /boot/vmlinuz-2.6.30.9-90.fc11.i586 ro
>> root=UUID=5a8b0f33-5369-4a45-a501-455ed10f4fa7 rhgb resume=/dev/sda3
>>         initrd /boot/initrd-2.6.30.9-90.fc11.i586.img
>> }
>> menuentry "Fedora (2.6.29.4-167.fc11.i586) (on /dev/sda2)" {
>>         insmod ext2
>>         set root=(hd0,2)
>>         search --no-floppy --fs-uuid --set
>> 5a8b0f33-5369-4a45-a501-455ed10f4fa7
>>         linux /boot/vmlinuz-2.6.29.4-167.fc11.i586 ro
>> root=UUID=5a8b0f33-5369-4a45-a501-455ed10f4fa7 resume=/dev/sda3 rhgb
>>         initrd /boot/initrd-2.6.29.4-167.fc11.i586.img
>> }
>> ### END /etc/grub.d/30_os-prober ###
>>
>> The above entries were generated automatically. The Fedora boot is on sda1,
>> root is sd2.
>>
>> Any ideas about what is going on here?
>>
>> Thanks.
>>
>> -----
>>   Colin Brace
>>   Amsterdam
>>   http://lim.nl
>
> Try changing
> set root=(hd0,2)
>
> to
> set root=(hd0,1)
>
> Regards,
> Goh Lip

Sorry, need to add ...
change also UUID to sda1 UUID too.

ps> what's on sda3?


--
ubuntu-users mailing list
ubuntu-users@...
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Re: grub 2: "error: You need to load the kernel first"

by Tom H-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've just installed 9.10 along side F11 on a laptop.

When I boot, both the Ubuntu and Fedora installations are shown in grub.

However, when I try to boot the latter, I get an error message: "error: You
need to load the kernel first"

Here is the relevant section in grub.cfg:

menuentry "Fedora (2.6.30.9-90.fc11.i586) (on /dev/sda2)" {
       insmod ext2
       set root=(hd0,2)
       search --no-floppy --fs-uuid --set
5a8b0f33-5369-4a45-a501-455ed10f4fa7
       linux /boot/vmlinuz-2.6.30.9-90.fc11.i586 ro
root=UUID=5a8b0f33-5369-4a45-a501-455ed10f4fa7 rhgb resume=/dev/sda3
       initrd /boot/initrd-2.6.30.9-90.fc11.i586.img
}
menuentry "Fedora (2.6.29.4-167.fc11.i586) (on /dev/sda2)" {
       insmod ext2
       set root=(hd0,2)
       search --no-floppy --fs-uuid --set
5a8b0f33-5369-4a45-a501-455ed10f4fa7
       linux /boot/vmlinuz-2.6.29.4-167.fc11.i586 ro
root=UUID=5a8b0f33-5369-4a45-a501-455ed10f4fa7 resume=/dev/sda3 rhgb
       initrd /boot/initrd-2.6.29.4-167.fc11.i586.img
}

Change
      set root=(hd0,2)
to
      set root=(hd0,1)

Change
      search --no-floppy --fs-uuid --set 5a8b0f33-5369-4a45-a501-455ed10f4fa7
to
      search --no-floppy --fs-uuid --set UUID_of_sda1

Change
      linux /boot/vmlinuz-2.6.30.9-90.fc11.i586 ro
to
      linux /vmlinuz-2.6.30.9-90.fc11.i586 ro

Change
root=UUID=5a8b0f33-5369-4a45-a501-455ed10f4fa7 rhgb resume=/dev/sda3
to
root=UUID=UUID_of_sda2 rhgb resume=/dev/sda3

Change
      initrd /boot/initrd-2.6.30.9-90.fc11.i586.img
to
      initrd /initrd-2.6.30.9-90.fc11.i586.img

(What does "resume=/dev/sda3" do?)

You can either change these lines in /boot/grub/grub.cfg (but keep a
backup because it will be overwritten the next time that grub-mkconfig
is run) or chmod -x /etc/grub.d/30_os-probe and add your Fedora
entries into /etc/grub.d/40_custom.

# cat /etc/grub.d/40_custom
cat << EOF
menuentry "F11 on sda1/sda2 {
...
}
EOF

2nd option

Since Grub 2 allows you to boot from ext4, you could boot into karmic,
mount sda1 and sda2, copy (cp -rp) the contents of sda1 into /boot
(boot's mount point) on sda2, comment out the "/boot" line in
/etc/fstab, and run update-grub to re-create a proper
/boot/grub/grub.cfg.

--
ubuntu-users mailing list
ubuntu-users@...
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Re: grub 2: "error: You need to load the kernel first"

by Goh Lip-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tom H wrote:

> (What does "resume=/dev/sda3" do?)

sda3 should be swap.
resume is for labtops for resuming from swap.

regards,
Goh Lip


--
ubuntu-users mailing list
ubuntu-users@...
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Re: grub 2: "error: You need to load the kernel first"

by Tom H-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> (What does "resume=/dev/sda3" do?)

> sda3 should be swap.
> resume is for labtops for resuming from swap.

Thanks.

--
ubuntu-users mailing list
ubuntu-users@...
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users