FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 07-19-2010, 03:25 PM
Goh Lip
 
Default Grub Grief aGain

On Mon, 19 Jul 2010 16:05:58 +0100
Dave Howorth <dhoworth@mrc-lmb.cam.ac.uk> wrote:

> Hi, I'm having a bit more trouble with grub again. I've a box with
> both Ubuntu and openSUSE on various disks, using Ubuntu's grub2 to
> control booting. It was working fine but now grub is giving me 'you
> need to load the kernel first' errors when I try to boot openSUSE.
>
> I can still boot into Ubuntu (karmic) and I can see the partition that
> contains openSUSE. I've rerun update-grub but that didn't solve the
> problem. I'm stuck for ideas as to what might be wrong (perhaps
> because it's Monday?), so I'd be grateful for any ideas what to try
> next.

It would really help if you can explain what changed from "It was
working fine" to "but now grub is giving me 'you...."; for example...new
kernel update of openSuse? etc..

Also,
o list partitions of /, /boot, if any, of Ubuntu and OpenSuse.
o grub version of opensuse
o kernel numbers of ubuntu and suse
o initrd of suse (have not used suse for a long time)


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-19-2010, 03:35 PM
Goh Lip
 
Default Grub Grief aGain

On Mon, 19 Jul 2010 23:25:26 +0800
Goh Lip <g.lip@gmx.com> wrote:

> On Mon, 19 Jul 2010 16:05:58 +0100
> Dave Howorth <dhoworth@mrc-lmb.cam.ac.uk> wrote:
>
> > Hi, I'm having a bit more trouble with grub again. I've a box with
> > both Ubuntu and openSUSE on various disks, using Ubuntu's grub2 to
> > control booting. It was working fine but now grub is giving me 'you
> > need to load the kernel first' errors when I try to boot openSUSE.
> >
> > I can still boot into Ubuntu (karmic) and I can see the partition
> > that contains openSUSE. I've rerun update-grub but that didn't
> > solve the problem. I'm stuck for ideas as to what might be wrong
> > (perhaps because it's Monday?), so I'd be grateful for any ideas
> > what to try next.
>
> It would really help if you can explain what changed from "It was
> working fine" to "but now grub is giving me 'you...."; for
> example...new kernel update of openSuse? etc..
>
> Also,
> o list partitions of /, /boot, if any, of Ubuntu and OpenSuse.
> o grub version of opensuse
> o kernel numbers of ubuntu and suse
> o initrd of suse (have not used suse for a long time)
>

My message was sent prematurely, do this at ubuntu and see if this woks
sudo grub-install /dev/sda

Regards - Goh Lip

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-19-2010, 04:11 PM
Dave Howorth
 
Default Grub Grief aGain

Goh Lip wrote:
> On Mon, 19 Jul 2010 23:25:26 +0800
> Goh Lip <g.lip@gmx.com> wrote:
>
>> On Mon, 19 Jul 2010 16:05:58 +0100
>> Dave Howorth <dhoworth@mrc-lmb.cam.ac.uk> wrote:
>>
>>> Hi, I'm having a bit more trouble with grub again. I've a box with
>>> both Ubuntu and openSUSE on various disks, using Ubuntu's grub2 to
>>> control booting. It was working fine but now grub is giving me 'you
>>> need to load the kernel first' errors when I try to boot openSUSE.
>>>
>>> I can still boot into Ubuntu (karmic) and I can see the partition
>>> that contains openSUSE. I've rerun update-grub but that didn't
>>> solve the problem. I'm stuck for ideas as to what might be wrong
>>> (perhaps because it's Monday?), so I'd be grateful for any ideas
>>> what to try next.

> My message was sent prematurely, do this at ubuntu and see if this
> woks
> sudo grub-install /dev/sda

Thanks for the suggestion.
I did that but it didn't make any difference.

>> It would really help if you can explain what changed from "It was
>> working fine" to "but now grub is giving me 'you...."; for
>> example...new kernel update of openSuse? etc..

Yes, there have been kernel updates for both Ubuntu and openSUSE. There
was also something that looked like a failed disk /dev/sdb but all those
symptoms have disappeared after unplugging and replugging the disk and
rebooting; that disk now appears perfectly normal.

>> Also,
>> o list partitions of /, /boot, if any, of Ubuntu and OpenSuse.

/dev/mapper/ubuntu-root
448G 2.9G 422G 1% / (this is ubuntu - sda1)
/dev/sda5 228M 57M 159M 27% /boot (this is ubuntu)
/dev/sdb1 9.7G 6.0G 3.2G 66% /suse-11.2 (both root and boot)

>> o grub version of opensuse

not used - booting via ubuntu's grub2

>> o kernel numbers of ubuntu and suse
>> o initrd of suse (have not used suse for a long time)

menuentry "Ubuntu, Linux 2.6.31-22-server" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,5)
linux /vmlinuz-2.6.31-22-server root=/dev/mapper/ubuntu-root
ro quiet splash
initrd /initrd.img-2.6.31-22-server
}


menuentry "Desktop -- openSUSE 11.2 - 2.6.31.12-0.2 (on /dev/sdb1)" {
insmod ext2
set root=(hd1,1)
linux /boot/vmlinuz-2.6.31.12-0.2-desktop
root=/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
resume=/dev/disk/by-id/ata-WDC_WD5001AALS-00L3B2_WD-WCASYA878047-part2
splash=silent quiet showopts vga=0x31a
initrd /boot/initrd-2.6.31.12-0.2-desktop
}

Cheers, Dave

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-19-2010, 05:20 PM
Goh Lip
 
Default Grub Grief aGain

On 07/20/2010 12:11 AM, Dave Howorth wrote:
> Goh Lip wrote:
>> On Mon, 19 Jul 2010 23:25:26 +0800
>> Goh Lip<g.lip@gmx.com> wrote:
>>
>>> On Mon, 19 Jul 2010 16:05:58 +0100
>>> Dave Howorth<dhoworth@mrc-lmb.cam.ac.uk> wrote:


Try using chainload;

So when grub menu appears, go to grub prompt (type 'c'), and ...
drivemap -s (hd0) (hd1)
set root=(hd0)
chainloader (hd1,1)+1
boot

Hopefully, you don't really have a disk failure.

Regards - Goh lip



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-19-2010, 08:37 PM
Rashkae
 
Default Grub Grief aGain

Dave Howorth wrote:

>
>
> menuentry "Ubuntu, Linux 2.6.31-22-server" {
> recordfail=1
> if [ -n ${have_grubenv} ]; then save_env recordfail; fi
> set quiet=1
> insmod ext2
> set root=(hd0,5)
> linux /vmlinuz-2.6.31-22-server root=/dev/mapper/ubuntu-root
> ro quiet splash
> initrd /initrd.img-2.6.31-22-server
> }
>
>
> menuentry "Desktop -- openSUSE 11.2 - 2.6.31.12-0.2 (on /dev/sdb1)" {
> insmod ext2
> set root=(hd1,1)
> linux /boot/vmlinuz-2.6.31.12-0.2-desktop
> root=/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
> resume=/dev/disk/by-id/ata-WDC_WD5001AALS-00L3B2_WD-WCASYA878047-part2
> splash=silent quiet showopts vga=0x31a
> initrd /boot/initrd-2.6.31.12-0.2-desktop
> }
>
> Cheers, Dave
>


This is rather strange. You say you ran grub-update, but those entries
do not look like auto-generated entries that I'm familiar with from
grub2. The search directive is missing, for one, and the default kernel
options are completely different.

Have you, by any chance, modified the files in /etc/grub.d to create a
custom boot menu, perhaps following some instructions from someone?

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-20-2010, 04:03 AM
Goh Lip
 
Default Grub Grief aGain

On 07/20/2010 04:37 AM, Rashkae wrote:
> Dave Howorth wrote:
>


>>
>> menuentry "Desktop -- openSUSE 11.2 - 2.6.31.12-0.2 (on /dev/sdb1)" {
>> insmod ext2
>> set root=(hd1,1)
>> linux /boot/vmlinuz-2.6.31.12-0.2-desktop
>> root=/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
>> resume=/dev/disk/by-id/ata-WDC_WD5001AALS-00L3B2_WD-WCASYA878047-part2
>> splash=silent quiet showopts vga=0x31a
>> initrd /boot/initrd-2.6.31.12-0.2-desktop
>> }


>
> This is rather strange. You say you ran grub-update, but those entries
> do not look like auto-generated entries that I'm familiar with from
> grub2. The search directive is missing, for one, and the default kernel
> options are completely different.
>
> Have you, by any chance, modified the files in /etc/grub.d to create a
> custom boot menu, perhaps following some instructions from someone?
>

Ah, looks like Dave has set the no-UUID in the default/grub.d, and
perhaps he needs to do that because suse uses disk-by-id instead. So
he's having trouble because bios may start with different numbering
system each time it boots, so it may not be (hd1,1) and it won't boot.
And chainloading may also 'run'. I mean booting won't run, numbering
runs. (English is sure funny)

Dave, you may want to run this instead....

linux (hd1,1)/boot/vmlinuz-2.6.31-12-0.2-desktop root=/dev/sdb1 ro
initrd (hd1,1)/boot/initrd-2.6.31.12-0.2-desktop
boot


*BUT* before you do that, please check at grub prompt
search -f /boot/vmlinuz-2.6.31-12-0.2-desktop

If it gives you hd1,1, then proceed, bit if it gives say, hd2,1, then
change above (hd1,1) to (hd2,1) BUT /dev/sdb1 remains unchanged.

Gotta run - Goh Lip


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-20-2010, 11:08 AM
Dave Howorth
 
Default Grub Grief aGain

Goh Lip wrote:
> On 07/20/2010 04:37 AM, Rashkae wrote:
>> Dave Howorth wrote:

Goh Lip, Rashkae, thanks for your help!

>>> menuentry "Desktop -- openSUSE 11.2 - 2.6.31.12-0.2 (on /dev/sdb1)" {
>>> insmod ext2
>>> set root=(hd1,1)
>>> linux /boot/vmlinuz-2.6.31.12-0.2-desktop
>>> root=/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
>>> resume=/dev/disk/by-id/ata-WDC_WD5001AALS-00L3B2_WD-WCASYA878047-part2
>>> splash=silent quiet showopts vga=0x31a
>>> initrd /boot/initrd-2.6.31.12-0.2-desktop
>>> }
>
>> This is rather strange. You say you ran grub-update, but those entries
>> do not look like auto-generated entries that I'm familiar with from
>> grub2. The search directive is missing, for one, and the default kernel
>> options are completely different.

The search directive is missing because I previously edited
grub-mkconfig_lib because I encountered a grub bug as explained here:

<http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:search>

And the system has been working since that change.

The options probably look strange because it's using by-id instead of
UUIDs. I think that's because that's what's in the device.map:

(hd1) /dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828
(hd5) /dev/disk/by-id/ata-ST31500341AS_9VS3BBQ7
(hd0) /dev/disk/by-id/ata-Hitachi_HDS721050CLA362_JP1540HN25EWEP
(hd2) /dev/disk/by-id/ata-ST31500341AS_9VS39AK8
(hd4) /dev/disk/by-id/scsi-3600050e0e812cc005649000090490000
(hd6) /dev/disk/by-id/ata-WDC_WD5001AALS-00L3B2_WD-WCASYA878047
(hd3) /dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310430

That file was generated by openSUSE and I copied it across and use it
(a) because the one Ubuntu grub2 generated was wrong and (b) IMHO, the
device IDs are a more sane technique than UUIDs (but i know that's a
matter of opinion)

In any case the system has been fine with that for a while and it hasn't
changed, so I'm not hugely inclined to think it may be my current problem.

>> Have you, by any chance, modified the files in /etc/grub.d to create a
>> custom boot menu, perhaps following some instructions from someone?

So I confess to changing some things, but my answer to this specific
question is NO SIR They are as when they were installed.

> Ah, looks like Dave has set the no-UUID in the default/grub.d, and
> perhaps he needs to do that because suse uses disk-by-id instead. So
> he's having trouble because bios may start with different numbering
> system each time it boots, so it may not be (hd1,1) and it won't boot.
> And chainloading may also 'run'. I mean booting won't run, numbering
> runs. (English is sure funny)
>
> Dave, you may want to run this instead....
>
> linux (hd1,1)/boot/vmlinuz-2.6.31-12-0.2-desktop root=/dev/sdb1 ro
> initrd (hd1,1)/boot/initrd-2.6.31.12-0.2-desktop
> boot
>
>
> *BUT* before you do that, please check at grub prompt
> search -f /boot/vmlinuz-2.6.31-12-0.2-desktop
>
> If it gives you hd1,1, then proceed, bit if it gives say, hd2,1, then
> change above (hd1,1) to (hd2,1) BUT /dev/sdb1 remains unchanged.

I'd love to do that but there's that bug in search again. It returns no
results

Fortunately, I can use ls to get enough information.

ls (hd1,1) tells me that the partition is labelled pad1 (which is a name
I use for small empty partitions at the front of disks containing LVM
partitions)

ls (hd2,1) tells me that the partition is labelled opensuse-11.2 (you
can guess what that is). It claims (by-id) that the disk is a Seagate.
It also says the UUID is dcfdbc....

So at least I now know why it isn't booting openSUSE. The next question
is how to fix it.

Now I *know* that the opensuse partition is on a WD disk, so it seems to
me that something within grub is significantly broken.

I'm tempted to upgrade Ubuntu from karmic to lucid. Will that upgrade
the grub? And is this the right command sequence for a server:

sudo apt-get install update-manager-core
sudo do-release-upgrade

Thanks, Dave






PS FWIW, my /etc/default/grub looks like this:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=10
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to
Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entrys
#GRUB_DISABLE_LINUX_RECOVERY="true"


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-20-2010, 11:40 AM
Rashkae
 
Default Grub Grief aGain

Dave Howorth wrote:

>
> Fortunately, I can use ls to get enough information.
>
> ls (hd1,1) tells me that the partition is labelled pad1 (which is a name
> I use for small empty partitions at the front of disks containing LVM
> partitions)
>
> ls (hd2,1) tells me that the partition is labelled opensuse-11.2 (you
> can guess what that is). It claims (by-id) that the disk is a Seagate.
> It also says the UUID is dcfdbc....
>
> So at least I now know why it isn't booting openSUSE. The next question
> is how to fix it.
>
> Now I *know* that the opensuse partition is on a WD disk, so it seems to
> me that something within grub is significantly broken.

It makes no such claim. There is no guaranteed that the order of
devices detected by Suse (sda sdb etc) will be the same as detected by
the bios (hd1 hd2, etc. Since you aren't using search to find the
correct hd device, and you have more than 2 hard drives, the only way to
be sure you have the right hd is trial and error. When you are at the
boot menu, you can edit the Open Suse entry, (press 'e' key) I believe,
and try changing the hd1,1 to hd2,1, and see if OpenSuse boots. If that
works, then update your device map so (hd2) entry points to the correct
drive.

Ultimately, however, there are only two ways to be make booting robust
on such a system. The correct way is to find out why search doesn't
work on your system (there might be some device that's causing it to
choke. I know I had issues with 1 specific pci io controller, for
example). The other is to put your boot partitions on the first hard
drive configured to be your boot device that can always be relied upon
to be identified as hd0 by the bios.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-20-2010, 01:18 PM
"Goh Lip"
 
Default Grub Grief aGain

----- Original Message -----
From: Dave Howorth
Sent: 07/20/10 07:08 PM
To: ubuntu-users@lists.ubuntu.com
Subject: Re: Grub Grief aGain

Updating to Lucid at this point won't help. The booting problem is also compounded by the use of LVM and there are some workarounds to handle this, but since I am not familiar with LVM, I cannot proceed further on this. So, I will have to leave you at this stage.

Good luck - Goh Lip

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-20-2010, 05:55 PM
Tom H
 
Default Grub Grief aGain

On Tue, Jul 20, 2010 at 7:08 AM, Dave Howorth
<dhoworth@mrc-lmb.cam.ac.uk> wrote:
> Goh Lip wrote:
>> On 07/20/2010 04:37 AM, Rashkae wrote:
>>> Dave Howorth wrote:
>
>>>> menuentry "Desktop -- openSUSE 11.2 - 2.6.31.12-0.2 (on /dev/sdb1)" {
>>>> * * * * *insmod ext2
>>>> * * * * *set root=(hd1,1)
>>>> * * * * *linux /boot/vmlinuz-2.6.31.12-0.2-desktop
>>>> root=/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
>>>> resume=/dev/disk/by-id/ata-WDC_WD5001AALS-00L3B2_WD-WCASYA878047-part2
>>>> splash=silent quiet showopts vga=0x31a
>>>> * * * * *initrd /boot/initrd-2.6.31.12-0.2-desktop
>>>> }

Assuming that
/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
is the OpenSUSE "/" and that the OpenSUSE "/boot" is a directory on
"/" and not a partition mount point.

Assuming that
vmlinuz-2.6.31.12-0.2-desktop
and
initrd-2.6.31.12-0.2-desktop
are the respective vmlinuz and initrd of the OpenSUSE install.

Assuming that
/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
has an ext2/ext3/ext4 filesystem.

Run
ls -l /dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
to find out to what /dev/sdXY it is a symlink

Run
blkid -c /dev/null /dev/sdXY
(where XY are the values obtained by the "ls -l..." above) to get the uuid of
/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1

Edit
/etc/grub.d/40_custom
to turn it into:
<start 40_custom>
#!/bin/sh
cat << EOF
menuentry "OpenSuse 40_custom" {
insmod ext2
search --fs-uuid --set=root
[uuid_of_/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1]
without "[" and ']"
linux /boot/vmlinuz-2.6.31.12-0.2-desktop
root=/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
ro
initrd /boot/initrd-2.6.31.12-0.2-desktop
}
EOF
<end 40_custom>
without the "<start...>" and "<end...>" lines and without the "without..." line.

Run
update-grub

Reboot and choose the "OpenSuse 40_custom" menu entry and let us know
what happens...

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

Thread Tools




All times are GMT. The time now is 01:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org