[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grub-help
Subject:    Re: grub2 can't find kernel with dual boot
From:       Michael Evans <mjevans1983 () gmail ! com>
Date:       2009-08-13 21:09:33
Message-ID: 4877c76c0908131409m5ca28447u1c9623067b64625 () mail ! gmail ! com
[Download RAW message or body]

As Isaac was noting you should check that the names you are using are exact
and what exists there.

It also seems that the way grub2 now works is to specify a default partition
to work from with root, and search for files with that path -inside- of the
partition.  It would operate similarly to this:

Mount sda7 somewhere
load the kernel somewhere/boot/vmlinuz-2.6.31-2-generic with the kernel
command line ...
and the appended initrd from somewhere/boot/initrd.img-2.6.31-2-generic

Often distros and even admins building from scratch will create a symlink to
. inside of boot, so that mounting /boot anywhere and looking for a file by
boot/file/path seems to ignore the boot part of the filename.

You or your distro may also symlink the current initrd and kernel to an
easier name, such as just initrd for the image and vmlinuz for the kernel.

On Thu, Aug 13, 2009 at 1:42 PM, Foxy <foxy@on-the-hill.me.uk> wrote:

> No, both vmlinuz and initrd are on /dev/sda7 in the boot partition...
>
>
> Isaac Dupree wrote:
>
>> Michael Evans wrote:
>>
>>> I am purely guessing here, but grub2 may use the same notation as grub.
>>>
>>> sda7 would be hd(0,6)
>>> sda8 would be hd(0,7)
>>>
>>
>> no, GRUB 2 uses linux-like numbering.
>>
>>  In this context, the 'root' would probably be the same as in grub, it
>>> specifies the root device for -grub-'s data (usually /boot).
>>>
>>
>> What it specifies is where the paths are interpreted from.  It's the
>> equivalent of saying
>>
>> menuentry "Ubuntu karmic (development branch), kernel 2.6.31-2-generic (on
>> /dev/sda6)" {
>>     linux (hd0,7)/boot/vmlinuz-2.6.31-2-generic
>> root=UUID=6ad1f928-50b9-4aea-9495-95df46d08d58 ro quiet splash
>>     initrd (hd0,7)/boot/initrd.img-2.6.31-2-generic
>>  }
>>
>> Are your vmlinuz and initrd in fact on that partition and with those exact
>> names (not, say, with any of the version numbers increased, or, on
>> /dev/sda6...)
>>
>> -Isaac
>>
>>  On Wed, Aug 12, 2009 at 2:57 PM, Foxy <foxy@on-the-hill.me.uk> wrote:
>>>
>>>   I have Ubuntu 9.04 Jaunty as my main OS, where I have upgraded GRUB to
>>>> GRUB2. I have also installed Ubuntu 9.10 Karmic on separate partitions.
>>>> I am
>>>> trying to boot Kramic, I have a message that I need to load kernel
>>>> first. It
>>>> looks like GRUB2 cannot find kernel. Probably the problem is that I have
>>>> /boot on a separate partition.
>>>>
>>>> This is my config:
>>>>
>>>> /boot/grub/grub.cfg (Karmic entry):
>>>>
>>>> menuentry "Ubuntu karmic (development branch), kernel 2.6.31-2-generic
>>>> (on
>>>> /dev/sda6)" {
>>>>    set root=(hd0,7)
>>>>    linux /boot/vmlinuz-2.6.31-2-generic
>>>> root=UUID=6ad1f928-50b9-4aea-9495-95df46d08d58 ro quiet splash
>>>>    initrd /boot/initrd.img-2.6.31-2-generic
>>>> }
>>>>
>>>> /etc/fstab:
>>>>
>>>> # / was on /dev/sda9 during installation
>>>> UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 /               ext3
>>>>  relatime,errors=remount-ro 0       1
>>>>
>>>> # /boot was on /dev/sda8 during installation
>>>> UUID=c3eb67b1-7f8f-419b-a462-c79a6c76e5de /boot           ext2
>>>>  relatime        0       2
>>>>
>>>> # /home was on /dev/sda5 during installation
>>>> UUID=4802e809-ecaa-4932-bd01-4a816c0bbd4f /home           ext3
>>>>  relatime        0       2
>>>>
>>>> # /media/test_boot was on /dev/sda7 during installation
>>>> UUID=0c98fbe4-ed7c-4134-994a-07d49074e137 /media/test_boot ext2
>>>>  relatime        0       2
>>>>
>>>> # /test was on /dev/sda6 during installation
>>>> UUID=6ad1f928-50b9-4aea-9495-95df46d08d58 /test           ext3
>>>>  relatime        0       2
>>>>
>>>>
>>>>
>>>> blkid -c /dev/null:
>>>>
>>>> /dev/sda2: UUID="4d5250be-75cf-4ce4-9295-ae5e2cabd441" TYPE="swap"
>>>> /dev/sda5: UUID="4802e809-ecaa-4932-bd01-4a816c0bbd4f" TYPE="ext3" - *my
>>>> /home partition*
>>>> /dev/sda6: UUID="6ad1f928-50b9-4aea-9495-95df46d08d58" TYPE="ext3" -
>>>> *Karmic / partition*
>>>> /dev/sda7: UUID="0c98fbe4-ed7c-4134-994a-07d49074e137" TYPE="ext2" -
>>>> *Karmic /boot partition*
>>>> /dev/sda8: UUID="c3eb67b1-7f8f-419b-a462-c79a6c76e5de" TYPE="ext2" -
>>>> *Jaunty /boot partition*
>>>> /dev/sda9: UUID="9018bfe2-9de3-4692-9883-fc2f875e6455" TYPE="ext3" -
>>>> *Jaunty / partition*
>>>>
>>>

[Attachment #3 (text/html)]

As Isaac was noting you should check that the names you are using are exact and what \
exists there.<br> <br>
It also seems that the way grub2 now works is to specify a default
partition to work from with root, and search for files with that path
-inside- of the partition.  It would operate similarly to this:<br>
<br>
Mount sda7 somewhere<br>
load the kernel somewhere/boot/vmlinuz-2.6.31-2-generic with the kernel command line \
...<br> and the appended initrd from somewhere/boot/initrd.img-2.6.31-2-generic<br>
<br>
Often distros and even admins building from scratch will create a
symlink to . inside of boot, so that mounting /boot anywhere and
looking for a file by boot/file/path seems to ignore the boot part of
the filename.<br>
<br>
You or your distro may also symlink the current initrd and kernel to an
easier name, such as just initrd for the image and vmlinuz for the
kernel.<br><br><div class="gmail_quote">On Thu, Aug 13, 2009 at 1:42 PM, Foxy <span \
dir="ltr">&lt;<a href="mailto:foxy@on-the-hill.me.uk">foxy@on-the-hill.me.uk</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> No, both vmlinuz and initrd are \
on /dev/sda7 in the boot partition...<div><div class="h5"><br> <br>
<br>
Isaac Dupree wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Michael Evans wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> I am purely guessing here, but grub2 \
may use the same notation as grub.<br> <br>
sda7 would be hd(0,6)<br>
sda8 would be hd(0,7)<br>
</blockquote>
<br>
no, GRUB 2 uses linux-like numbering.<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> In this context, the &#39;root&#39; \
would probably be the same as in grub, it<br> specifies the root device for \
-grub-&#39;s data (usually /boot).<br> </blockquote>
<br>
What it specifies is where the paths are interpreted from.  It&#39;s the equivalent \
of saying<br> <br>
menuentry &quot;Ubuntu karmic (development branch), kernel 2.6.31-2-generic (on \
                /dev/sda6)&quot; {<br>
     linux (hd0,7)/boot/vmlinuz-2.6.31-2-generic \
root=UUID=6ad1f928-50b9-4aea-9495-95df46d08d58 ro quiet splash<br>  initrd \
(hd0,7)/boot/initrd.img-2.6.31-2-generic<br>  }<br>
<br>
Are your vmlinuz and initrd in fact on that partition and with those
exact names (not, say, with any of the version numbers increased, or,
on /dev/sda6...)<br>
<br>
-Isaac<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> On Wed, Aug 12, 2009 at 2:57 PM, Foxy \
&lt;<a href="mailto:foxy@on-the-hill.me.uk" \
target="_blank">foxy@on-the-hill.me.uk</a>&gt; wrote:<br> <br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">  I have Ubuntu 9.04 Jaunty as my main \
OS, where I have upgraded GRUB to<br> GRUB2. I have also installed Ubuntu 9.10 Karmic \
on separate partitions. I am<br> trying to boot Kramic, I have a message that I need \
to load kernel first. It<br> looks like GRUB2 cannot find kernel. Probably the \
problem is that I have<br> /boot on a separate partition.<br>
<br>
This is my config:<br>
<br>
/boot/grub/grub.cfg (Karmic entry):<br>
<br>
menuentry &quot;Ubuntu karmic (development branch), kernel 2.6.31-2-generic (on<br>
/dev/sda6)&quot; {<br>
    set root=(hd0,7)<br>
    linux /boot/vmlinuz-2.6.31-2-generic<br>
root=UUID=6ad1f928-50b9-4aea-9495-95df46d08d58 ro quiet splash<br>
    initrd /boot/initrd.img-2.6.31-2-generic<br>
}<br>
<br>
/etc/fstab:<br>
<br>
# / was on /dev/sda9 during installation<br>
UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 /               ext3    \
relatime,errors=remount-ro 0       1<br> <br>
# /boot was on /dev/sda8 during installation<br>
UUID=c3eb67b1-7f8f-419b-a462-c79a6c76e5de /boot           ext2    relatime        0   \
2<br> <br>
# /home was on /dev/sda5 during installation<br>
UUID=4802e809-ecaa-4932-bd01-4a816c0bbd4f /home           ext3    relatime        0   \
2<br> <br>
# /media/test_boot was on /dev/sda7 during installation<br>
UUID=0c98fbe4-ed7c-4134-994a-07d49074e137 /media/test_boot ext2    relatime        0  \
2<br> <br>
# /test was on /dev/sda6 during installation<br>
UUID=6ad1f928-50b9-4aea-9495-95df46d08d58 /test           ext3    relatime        0   \
2<br> <br>
<br>
<br>
blkid -c /dev/null:<br>
<br>
/dev/sda2: UUID=&quot;4d5250be-75cf-4ce4-9295-ae5e2cabd441&quot; \
                TYPE=&quot;swap&quot;<br>
/dev/sda5: UUID=&quot;4802e809-ecaa-4932-bd01-4a816c0bbd4f&quot; \
                TYPE=&quot;ext3&quot; - *my /home partition*<br>
/dev/sda6: UUID=&quot;6ad1f928-50b9-4aea-9495-95df46d08d58&quot; \
                TYPE=&quot;ext3&quot; - *Karmic / partition*<br>
/dev/sda7: UUID=&quot;0c98fbe4-ed7c-4134-994a-07d49074e137&quot; \
                TYPE=&quot;ext2&quot; - *Karmic /boot partition*<br>
/dev/sda8: UUID=&quot;c3eb67b1-7f8f-419b-a462-c79a6c76e5de&quot; \
                TYPE=&quot;ext2&quot; - *Jaunty /boot partition*<br>
/dev/sda9: UUID=&quot;9018bfe2-9de3-4692-9883-fc2f875e6455&quot; \
TYPE=&quot;ext3&quot; - *Jaunty / \
partition*<br></blockquote></blockquote></blockquote> </div></div></blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic