grub problem - suse and ubuntu 8

I had Ubuntu Jaunty Jackalope on my sda1. I created a new partition with 265GB and installed opensuse to it, so I thought. Now suse is on 20GB on sda2 and the GRUB is messed up because I cannot boot into Ubuntu at all. How do I fix the GRUB so I can boot back into Ubuntu? It boots into suse fine. Also, I want the Suse to use all the free area, not just 20GB. Thanks!

I see now what happened with the 20GB thing, I dont need help with that now. I just need helping with GRUB.

Load SUSE, and get to a root console, then run;


fdisk -l
cat /boot/grub/menu.lst

Paste the results here.

linux-p7di:/home/marjerOS # fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000168d7

Device Boot Start End Blocks Id System
/dev/sda1 1 27167 218218896 83 Linux
/dev/sda2 * 27168 29778 20972857+ 83 Linux
/dev/sda3 60641 60801 1293232+ 5 Extended
/dev/sda4 29779 60640 247899015 83 Linux
/dev/sda5 60641 60801 1293201 82 Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000499e3

Device Boot Start End Blocks Id System
/dev/sdb1 1 2611 20972826 83 Linux
/dev/sdb2 2612 14593 96245415 83 Linux
linux-p7di:/home/marjerOS # cat /boot/grub/menu.lst

Modified by YaST2. Last modification on Fri Oct 30 16:52:50 CDT 2009

default 0
timeout 8
##YaST - generic_mbr
##YaST - activate

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0 - 2.6.25.5-1.1
kernel (hd0,1)/boot/vmlinuz-2.6.25.5-1.1-pae root=/dev/disk/by-id/scsi-SATA_ST3500320AS_9QMA7E3D-part2 resume=/dev/sda5 splash=silent showopts vga=0x31a
initrd (hd0,1)/boot/initrd-2.6.25.5-1.1-pae

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.0 - 2.6.25.5-1.1
kernel (hd0,1)/boot/vmlinuz-2.6.25.5-1.1-pae root=/dev/disk/by-id/scsi-SATA_ST3500320AS_9QMA7E3D-part2 showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off x11failsafe vga=0x31a
initrd (hd0,1)/boot/initrd-2.6.25.5-1.1-pae

###Don’t change this comment - YaST2 identifier: Original name: Ubuntu 9.10, kernel 2.6.31-14-generic (/dev/sda1)###
title Ubuntu 9.10, kernel 2.6.31-14-generic (/dev/sda1)
root (hd0,0)
configfile /boot/grub/menu.lst

###Don’t change this comment - YaST2 identifier: Original name: openSUSE 11.0 - 2.6.25.20-0.5 (/dev/sdb1)###
title openSUSE 11.0 - 2.6.25.20-0.5 (/dev/sdb1)
root (hd1,0)
configfile /boot/grub/menu.lst

Try using your preferred text editor to change the last two lines of this bit to


    rootnoverify (hd0,0)
    chainloader +1

You might be advised to make a backup of the file first, just in case…

Thanks! I made a backup first. When I edited those lines, I got this message on choosing Ubuntu from GRUB:

        Error 13: invalid or unsupported executable format

Hmm…

Is Ubuntu using EXT4?

Do you by any chance have the Ubuntu live CD you installed it from? Ubuntu have patched their grub to deal with EXT4. That might well not be the problem, but nevertheless it might be easier to fix the Ubuntu boot using that, then chainload SUSE from there.

No the Ubuntu is ext3. I do have live CDs of ubuntu 7 and 8. I have 8 on my computer & last night did dist-upgrade to the new Ubuntu 9. It’s still ext 3 when I look on partition manager GParted on live CD for ubuntu. I could try repair system on the Suse live DVD which I have for 11.0, but don’t know how to proceed with that.

Can you post your ubuntu /boot/grub/menu.lst
Also ubuntu /boot/grub/vmlinuz.bla.blah
And if it has the initrd

If it’s EXT3 it shouldn’t matter which version of grub you use.

Personally, I’d just reinstall Ubuntu’s grub to the MBR, then chainload the SUSE grub from there.

I can’t guarantee you this will work, so you might be better off waiting for someone with more experience to come along with a suggestion. However, moving bootloaders around is in theory essentially harmless, and easy to undo - even if the system ends up unbootable, you can fix it all with a live CD.

What I’d do is boot SUSE, get to a root prompt, and type


grub
root (hd0,0)
setup (hd0)
quit

That should put a bootloader using Ubuntu’s menu on the MBR. Reboot, and hopefully load Ubuntu. Get to another root prompt, edit /boot/grub/menu.lst and add the following section where the other similar sections are;


title openSUSE 11.1
rootnoverify (hd0,1)
chainloader +1

Then you should hopefully be able to load the SUSE grub from the Ubuntu one.

menu.lst - See: grub(8), info grub, update-grub(8)

grub-install(8), grub-floppy(8),

grub-md5-crypt, /usr/share/doc/grub

and /usr/share/doc/grub-doc/.

default num

Set the default entry to the entry number NUM. Numbering starts from 0, and

the entry number 0 is the default if the command is not used.

You can specify ‘saved’ instead of a number. In this case, the default entry

is the entry saved with the command ‘savedefault’.

WARNING: If you are using dmraid do not use ‘savedefault’ or your

array will desync and will not let you boot your system.

default 0

timeout sec

Set a timeout, in SEC seconds, before automatically booting the default entry

(normally the first entry defined).

timeout 10

hiddenmenu

Hides the menu by default (press ESC to see the menu)

#hiddenmenu

Pretty colours

#color cyan/blue white/blue

password ‘–md5’] passwd

If used in the first section of a menu file, disable all interactive editing

control (menu entry editor and command-line) and entries protected by the

command ‘lock’

e.g. password topsecret

password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/

password topsecret

examples

title Windows 95/98/NT/2000

root (hd0,0)

makeactive

chainloader +1

title Linux

root (hd0,1)

kernel /vmlinuz root=/dev/hda2 ro

Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

BEGIN AUTOMAGIC KERNELS LIST

lines between the AUTOMAGIC KERNELS LIST markers will be modified

by the debian update-grub script except for the default options below

DO NOT UNCOMMENT THEM, Just edit them to your needs

## Start Default Options

default kernel options

default kernel options for automagic boot options

If you want special options for specific kernels use kopt_x_y_z

where x.y.z is kernel version. Minor versions can be omitted.

e.g. kopt=root=/dev/hda1 ro

kopt_2_6_8=root=/dev/hdc1 ro

kopt_2_6_8_2_686=root=/dev/hdc2 ro

kopt=root=UUID=1a07834f-f84d-454c-a75c-c87e411b4fde ro

default grub root device

e.g. groot=(hd0,0)

groot=1a07834f-f84d-454c-a75c-c87e411b4fde

should update-grub create alternative automagic boot options

e.g. alternative=true

alternative=false

alternative=true

should update-grub lock alternative automagic boot options

e.g. lockalternative=true

lockalternative=false

lockalternative=false

additional options to use with the default boot option, but not with the

alternatives

e.g. defoptions=vga=791 resume=/dev/hda5

defoptions=quiet splash

should update-grub lock old automagic boot options

e.g. lockold=false

lockold=true

lockold=false

Xen hypervisor options to use with the default Xen boot option

xenhopt=

Xen Linux kernel options to use with the default Xen boot option

xenkopt=console=tty0

altoption boot targets option

multiple altoptions lines are allowed

e.g. altoptions=(extra menu suffix) extra boot options

altoptions=(recovery) single

altoptions=(recovery mode) single

controls how many kernels should be put into the menu.lst

only counts the first occurence of a kernel, not the

alternative kernel options

e.g. howmany=all

howmany=7

howmany=all

specify if running in Xen domU or have grub detect automatically

update-grub will ignore non-xen kernels when running in domU and vice versa

e.g. indomU=detect

indomU=true

indomU=false

indomU=detect

should update-grub create memtest86 boot option

e.g. memtest86=true

memtest86=false

memtest86=true

should update-grub adjust the value of the default booted system

can be true or false

updatedefaultentry=false

should update-grub add savedefault to the default options

can be true or false

savedefault=false

## End Default Options

title Ubuntu 9.10, kernel 2.6.31-14-generic
uuid 1a07834f-f84d-454c-a75c-c87e411b4fde
kernel /boot/vmlinuz-2.6.31-14-generic root=UUID=1a07834f-f84d-454c-a75c-c87e411b4fde ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
quiet

title Ubuntu 9.10, kernel 2.6.31-14-generic (recovery mode)
uuid 1a07834f-f84d-454c-a75c-c87e411b4fde
kernel /boot/vmlinuz-2.6.31-14-generic root=UUID=1a07834f-f84d-454c-a75c-c87e411b4fde ro single
initrd /boot/initrd.img-2.6.31-14-generic

title Ubuntu 9.10, kernel 2.6.28-16-generic
uuid 1a07834f-f84d-454c-a75c-c87e411b4fde
kernel /boot/vmlinuz-2.6.28-16-generic root=UUID=1a07834f-f84d-454c-a75c-c87e411b4fde ro quiet splash
initrd /boot/initrd.img-2.6.28-16-generic
quiet

title Ubuntu 9.10, kernel 2.6.28-16-generic (recovery mode)
uuid 1a07834f-f84d-454c-a75c-c87e411b4fde
kernel /boot/vmlinuz-2.6.28-16-generic root=UUID=1a07834f-f84d-454c-a75c-c87e411b4fde ro single
initrd /boot/initrd.img-2.6.28-16-generic

title Ubuntu 9.10, kernel 2.6.28-15-generic
uuid 1a07834f-f84d-454c-a75c-c87e411b4fde
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=1a07834f-f84d-454c-a75c-c87e411b4fde ro quiet splash
initrd /boot/initrd.img-2.6.28-15-generic
quiet

title Ubuntu 9.10, kernel 2.6.28-15-generic (recovery mode)
uuid 1a07834f-f84d-454c-a75c-c87e411b4fde
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=1a07834f-f84d-454c-a75c-c87e411b4fde ro single
initrd /boot/initrd.img-2.6.28-15-generic

title Ubuntu 9.10, kernel 2.6.28-14-generic
uuid 1a07834f-f84d-454c-a75c-c87e411b4fde
kernel /boot/vmlinuz-2.6.28-14-generic root=UUID=1a07834f-f84d-454c-a75c-c87e411b4fde ro quiet splash
initrd /boot/initrd.img-2.6.28-14-generic
quiet

title Ubuntu 9.10, kernel 2.6.28-14-generic (recovery mode)
uuid 1a07834f-f84d-454c-a75c-c87e411b4fde
kernel /boot/vmlinuz-2.6.28-14-generic root=UUID=1a07834f-f84d-454c-a75c-c87e411b4fde ro single
initrd /boot/initrd.img-2.6.28-14-generic

title Ubuntu 9.10, memtest86+
uuid 1a07834f-f84d-454c-a75c-c87e411b4fde
kernel /boot/memtest86+.bin
quiet

END DEBIAN AUTOMAGIC KERNELS LIST

This is a divider, added to separate the menu items below from the Debian

ones.

title Other operating systems:
root

This entry automatically added by the Debian installer for an existing

linux installation on /dev/sdb1.

title Ubuntu 8.04.2, kernel 2.6.24-23-generic (on /dev/sdb1)
root (hd1,0)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=e345e5fc-717e-4305-a909-cd7b4f0f4c18 ro quiet splash
initrd /boot/initrd.img-2.6.24-23-generic
savedefault
boot

This entry automatically added by the Debian installer for an existing

linux installation on /dev/sdb1.

title Ubuntu 8.04.2, kernel 2.6.24-23-generic (recovery mode) (on /dev/sdb1)
root (hd1,0)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=e345e5fc-717e-4305-a909-cd7b4f0f4c18 ro single
initrd /boot/initrd.img-2.6.24-23-generic
savedefault
boot

This entry automatically added by the Debian installer for an existing

linux installation on /dev/sdb1.

title Ubuntu 8.04.2, kernel 2.6.22-16-generic (on /dev/sdb1)
root (hd1,0)
kernel /boot/vmlinuz-2.6.22-16-generic root=UUID=e345e5fc-717e-4305-a909-cd7b4f0f4c18 ro quiet splash
initrd /boot/initrd.img-2.6.22-16-generic
savedefault
boot

This entry automatically added by the Debian installer for an existing

linux installation on /dev/sdb1.

title Ubuntu 8.04.2, kernel 2.6.22-16-generic (recovery mode) (on /dev/sdb1)
root (hd1,0)
kernel /boot/vmlinuz-2.6.22-16-generic root=UUID=e345e5fc-717e-4305-a909-cd7b4f0f4c18 ro single
initrd /boot/initrd.img-2.6.22-16-generic
savedefault
boot

This entry automatically added by the Debian installer for an existing

linux installation on /dev/sdb1.

title Ubuntu 8.04.2, memtest86+ (on /dev/sdb1)
root (hd1,0)
kernel /boot/memtest86+.bin
savedefault
boot

This entry automatically added by the Debian installer for an existing

linux installation on /dev/sdb9.

title linux (on /dev/sdb9)
root (hd1,8)
kernel /boot/vmlinuz BOOT_IMAGE=linux root=/dev/sda9 acpi=on resume=/dev/sda8 splash=silent vga=788
initrd (hd0,8)/boot/initrd.img
savedefault
boot

This entry automatically added by the Debian installer for an existing

linux installation on /dev/sdb9.

title linux-nonfb (on /dev/sdb9)
root (hd1,8)
kernel /boot/vmlinuz BOOT_IMAGE=linux-nonfb root=/dev/sda9 acpi=on resume=/dev/sda8
initrd (hd0,8)/boot/initrd.img
savedefault
boot

This entry automatically added by the Debian installer for an existing

linux installation on /dev/sdb9.

title failsafe (on /dev/sdb9)
root (hd1,8)
kernel /boot/vmlinuz BOOT_IMAGE=failsafe root=/dev/sda9 failsafe acpi=on resume=/dev/sda8
initrd (hd0,8)/boot/initrd.img
savedefault
boot

This entry automatically added by the Debian installer for an existing

linux installation on /dev/sdb9.

title memtest-2.01 (on /dev/sdb9)
root (hd1,8)
kernel /boot/memtest-2.01.bin BOOT_IMAGE=memtest-2.01
savedefault
boot

This entry automatically added by the Debian installer for an existing

linux installation on /dev/sdb9.

title 2.6.26.8.tex3 (on /dev/sdb9)
root (hd1,8)
kernel /boot/vmlinuz-2.6.26.8.tex3 BOOT_IMAGE=2.6.26.8.tex3 root=/dev/sda9 acpi=on resume=/dev/sda8 splash=silent vga=788
initrd (hd0,8)/boot/initrd-2.6.26.8.tex3.img
savedefault
boot

title Windows Vista
root (hd0,1)
makeactive
chainloader +1

----------END OF /boot/grub/menu.lst on UBUNTU---------

I don’t have a vmlinuz or initrd file in the /boot/grub folder.

Also seeing the Error 13 message trying to chainload boot Ubuntu (using openSuse grub); I had also assumed it was a problem with the ext4 fs but same problem with Ubuntu installed using ext3.

However, the new version of Ubuntu uses Grub2 (so doesn’t use the same menu.lst format we’ve got used to). And despite trying an assortment of grub boot arguments including pointing to the vmlinuz & initrd explicitly, it’s still not playing.

But interesting to note wiccanheart was using Ubuntu8 initially , which afaik used grub 0.9x ?

Tempted to wait for the folk in Ubuntuland to figure this one out (9.10 is only out a few days to be fair) & get back to playing with 11.2 RC2 !

IG

Surely this can’t be grub2? It would be a menu.cfg, rather than a menu.lst.

I’m tempted to say just restore the Ubuntu grub to the MBR, then chainload the SUSE one from there…

Let me see if I have a menu.cfg file on the Ubuntu side. I’ve never even heard of a Grub2, I don’t know what that is. I really don’t care about the Ubuntu side of my computer anymore, I just want to transfer all the files off that partition into my OpenSuse partition, and then I can just later on erase that partition with Ubuntu on it and be done with it. BUt I need to be able to boot into it, because oddly enough, when I look in Nautilus on Suse side I cannot see my files on the Ubuntu partition. I wonder why that is??

Sorry, didn’t explain myself well (no surprises there).

Yes I could just let the Ubuntu install use its grub to manage everything but I don’t want to. Quite happy with the simple chainload to anything else (various wins, Solaris, fedora, multiple Suses) from Suse I’ve been using for ages. Except it doesn’t work with this Ubuntu. Chainload is supposed to just throw the boot control to the bootloader installed at the root of whatever other os - not elegant but it works…or it did.

Point I was making is that I think this is an issue with trying to chainload to Ubuntu from Suse (and maybe others) rather than it being a Suse grub issue, i.e. an Ubuntu install/bootload question.

IG

wiccanheart, then you just need to mount Ubuntu’s /home partiton from within suse and grab the files you want before killing it; shouldn’t need to boot into it at all

IG

confuseling, example of reference to this elsewhere

IG

Well, I admit to being completely confused.

Try running ‘gnomesu nautilus’ and seeing if you can find your files. ETA - also, ignz is right, you’d need to mount it first… I’m too sleepy to think.

I would suggest if you want to fix the Ubuntu boot, loading SUSE, and running (as root)


grub
root (hd0,0)
setup (hd0)
quit

Then loading Ubuntu, and changing the Windows section in that menu.lst to say


title openSUSE 11.1
rootnoverify (hd0,1)
chainloader +1

But as I said, I’m completely confused, so you might be best off waiting for someone with a better idea of what’s happening…

Although in fairness, even if this didn’t work, it should be easy to fix with a live CD.

@ignz; it’s a puzzle. I think if he’s upgraded to 9.10, he’ll still be on grub legacy - though I’m not sure. And I’ve happily chainloaded a Debian grub2 from a grub1, without even having to play with it. I imagine there’ll be lots of this to deal with for a while… Will keep us busy. :wink:

I noticed ubuntu is reading the disk by-uuid and suse by-id
Not sure if it has an implication.

Try adding this in your suse menu.lst

###Don’t change this comment - YaST2 identifier: Original name: Ubuntu 9.10
root (hd0,0)
kernel /boot/vmlinuz-2.6.31-14-generic root=/dev/sda1 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic

Once I had a problem booting ubuntu from suse with the initrd so try an option without it.

not sure if it is gonna work please post back.

hmmm, actually just discovered something else but is getting off topic now, is Ubuntu related so probably doesn’t really belong here…so, <whisper> basically, despite telling U??? to leave my primary disk alone it hasn’t :wink:

IG