tricky grub problem - hard disk + usb

Hi, I am running Ubuntu 8.04 on a Dell laptop and installed opensuse11 from a LiveCD to a usb hard disk. No issues I could boot directly from the usb drive but my laptop ended with a boot error21 without the usb disk plugged in.
I found a fix at Grub Error 21 after full install to USB hard drive | USB Pen Drive Linux and re-installed grub on the internal disk.
Now the system won’t boot from the usb hard disk any more.
My target is to be able to boot the usb hard disk from any PC where bios would allow booting from usb and of course be able to choose on my PC which system to boot from.

Can anyone help me out.

nafihsus

Yes, we can. If you finally have your HD Grub working OK and assuming nothing has changed in your USB Grub configuration, you should just add a chainloader stanza to your HD /boot/grub/menu.lst. First, back up the menu.lst of course!
USB may be a bit specific in this, anyway, your new stanza should look roughly like this:


###Don't change this comment - YaST2 identifier: Original name: keyserSuSE###
title keyserSuSE
    rootnoverify (hd1)
    chainloader (hd1)+1

That’s how I’ve configured it for a xD memory card in my USB card reader anyhow. You should change “hd1” to whatever matches your USB drive designation (looking at the /boot/grub/menu.lst stored on your USB drive might be of help, but a little trial and error will be unavoidable, I’m afraid).

Thanks for the hint Josip. After modifying the hd menu.lst file booting does not find any system with the usb plugged in. without I get a nice menu incl. opensuse on the usb but selection fails as the system does not know the disk (even its the one specified in the menu.lst on the usb disk).

The usb menu.lst files contains:

Modified by YaST2. Last modification on Sun Dec 7 17:16:51 HKT 2008

default 0
timeout 8
gfxmenu (hd1,1)/boot/message

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0
root (hd1,1)
kernel /boot/vmlinuz-2.6.25.5-1.1-default root=/dev/disk/by-id/usb-WDC_WD600VE-00HDT0_10000E000B4F97E9-0:0-part2 resume=/dev/sdb1 splash=silent showopts vga=0x314
initrd /boot/initrd-2.6.25.5-1.1-default

and my modified hd menu.lst:
###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0
root (hd1,1)
kernel /boot/vmlinuz-2.6.25.5-1.1-default root=/dev/disk/by-id/usb-WDC_WD600VE-00HDT0_10000E000B4F97E9-0:0-part2 resume=/dev/sdb1 splash=silent showopts vga=0x314
initrd /boot/initrd-2.6.25.5-1.1-default
rootnoverify (hd1)
chainloader (hd1)+1

title Ubuntu 8.04.1, kernel 2.6.24-22-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=c9b9146f-1029-4439-8253-f65356eadaed ro quiet splash
initrd /boot/initrd.img-2.6.24-22-generic
quiet

From there I can select and boot the Ubuntu system but not opensuse.

It’s not a problem, you apparently just forgot to copy a line I gave you. I’ll repeat here exactly how your entire HD menu.lst should look, so you can simply copy and paste if you like (deleting any previous text present):


###Don't change this comment - YaST2 identifier: Original name: linux###
 title openSUSE 11.0
 root (hd0,0)
 kernel /boot/vmlinuz-2.6.25.5-1.1-default root=/dev/disk/by-id/usb-WDC_WD600VE-00HDT0_10000E000B4F97E9-0:0-part2 resume=/dev/sdb1 splash=silent showopts vga=0x314
 initrd /boot/initrd-2.6.25.5-1.1-default

###Don't change this comment - YaST2 identifier: Original name: keyserSuSE###
title keyserSuSE
    rootnoverify (hd1)
    chainloader (hd1)+1
 
 title Ubuntu 8.04.1, kernel 2.6.24-22-generic
 root (hd0,0)
 kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=c9b9146f-1029-4439-8253-f65356eadaed ro quiet splash
 initrd /boot/initrd.img-2.6.24-22-generic
 quiet

When copying and pasting, double-check you don’t leave any previous text in the file, these things must be copied exactly as they are, character by character. Every space and every newline matters.
I’m confident you have a backup menu.lst there, just in case, right?
Now try booting with this new menu.lst in place – you should now see three startup options at boot:

openSUSE
keyserSUSE
Ubuntu

Try selecting them one at a time and then post back which of the options still doesn’t boot and the error it gives you. OK?

I update menu.lst (with copy and paste). Booting with and without usb plugged in ends in Error 15: File not found.
I still get to the Grub menu after key stroke and can boot Ubuntu from there. selecting opensuse results in the same Error 15 as startup. Selecting Keyser end in “no bootable device”.

Here’s my fdisk -l result. Maybe the naming is wrong:
root@cenk1:/home/cenk# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x08000000

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3039 24410736 83 Linux
/dev/sda2 3040 30401 219785265 83 Linux

Disk /dev/sdb: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x12345678

Device Boot Start End Blocks Id System
/dev/sdb1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sdb2 263 2873 20972857+ 83 Linux
/dev/sdb3 2874 7296 35527747+ 83 Linux

Hope I’m causing not too much trouble.
Regards, Nafihsus

You’re causing no trouble at all. Please try changing the lines


rootnoverify (hd1)
chainloader (hd1)+1
 

in the second section to


rootnoverify (hd1,1)
chainloader (hd1,1)+1
 

Also, while you’re at it, could you post back your entire default menu.lst from your HD – the one you backed up before we started troubleshooting? And the contents of your Ubuntu /etc/mtab too, please.

Same situation, error 15 with opensuse on usb, error 13 with keyserSuse.

original menu.lst:

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 3

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=c9b9146f-1029-4439-8253-f65356eadaed ro

Setup crashdump menu entries

e.g. crashdump=1

crashdump=0

default grub root device

e.g. groot=(hd0,0)

groot=(hd0,0)

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

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 8.04.1, kernel 2.6.24-22-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=c9b9146f-1029-4439-8253-f65356eadaed ro quiet splash
initrd /boot/initrd.img-2.6.24-22-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-22-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=c9b9146f-1029-4439-8253-f65356eadaed ro single
initrd /boot/initrd.img-2.6.24-22-generic

title Ubuntu 8.04.1, kernel 2.6.24-21-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=c9b9146f-1029-4439-8253-f65356eadaed ro quiet splash
initrd /boot/initrd.img-2.6.24-21-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-21-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=c9b9146f-1029-4439-8253-f65356eadaed ro single
initrd /boot/initrd.img-2.6.24-21-generic

title Ubuntu 8.04.1, kernel 2.6.24-16-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=c9b9146f-1029-4439-8253-f65356eadaed ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-16-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=c9b9146f-1029-4439-8253-f65356eadaed ro single
initrd /boot/initrd.img-2.6.24-16-generic

title Ubuntu 8.04.1, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

END DEBIAN AUTOMAGIC KERNELS LIST

/etc/mtab:
cenk@cenk1:~$ cat /etc/mtab
/dev/sda1 / ext3 rw,relatime,errors=remount-ro 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
/sys /sys sysfs rw,noexec,nosuid,nodev 0 0
varrun /var/run tmpfs rw,noexec,nosuid,nodev,mode=0755 0 0
varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0
udev /dev tmpfs rw,mode=0755 0 0
devshm /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
lrm /lib/modules/2.6.24-22-generic/volatile tmpfs rw 0 0
/dev/sda2 /home ext3 rw,relatime 0 0
securityfs /sys/kernel/security securityfs rw 0 0
gvfs-fuse-daemon /home/cenk/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=cenk 0 0
/dev/sdb2 /media/disk ext3 rw,nosuid,nodev,uhelper=hal 0 0
/dev/sdb3 /media/disk-1 ext3 rw,nosuid,nodev,uhelper=hal 0 0

Hmmm… That’s strange. I think we’ve run out of possible permutations here. Are you sure your USB installation is still working? You should be able to test that by setting your USB drive to boot first, before your internal HD. Try going in the BIOS and changing the boot order so that USB drive is first: can you boot at all? If you can’t, then your SuSE installation got somehow messed up when you repaired your Ubuntu. If you can, please post back your SuSE /etc/mtab. Also, I’d like to know in which USB partition is the /boot/grub folder located.

opensuse on the usb disk does NOT work since I installed grub back to the internal hard disk. The boot sequence is set to usb first.

/boot/grub is on /dev/sdb2 (when booted from the internal hd)
The menu.lst at that dir contains:

Modified by YaST2. Last modification on Sun Dec 7 17:16:51 HKT 2008

default 0
timeout 8
gfxmenu (hd1,1)/boot/message

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0
root (hd1,1)
kernel /boot/vmlinuz-2.6.25.5-1.1-default root=/dev/disk/by-id/usb-WDC_WD600VE-00HDT0_10000E000B4F97E9-0:0-part2 resume=/dev/sdb1 splash=silent showopts vga=0x314
initrd /boot/initrd-2.6.25.5-1.1-default

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

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

/etc/mtab on usb:
/dev/sda2 / ext3 rw,acl,user_xattr 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
debugfs /sys/kernel/debug debugfs rw 0 0
udev /dev tmpfs rw 0 0
devpts /dev/pts devpts rw,mode=0620,gid=5 0 0
securityfs /sys/kernel/security securityfs rw 0 0

Whoops! I think I might have misunderstood you. I thought your hard drive was set to boot first.
Well, no harm done. It just means it will take a little more than just editing a menu.lst.
We will have to try another route, so your next step is to wipe out your HD menu.lst and restore the backup menu.lst as it was originally.
Then go into the BIOS and set the HD to boot first.
Then boot up Ubuntu in single-user (no desktop) mode with the USB drive attached.
Type su and your root password to get root privileges.
Then type fdisk /dev/sdb to launch the partitioning program for your USB drive.
Press p to get the list of the partitions present on the USB drive. There should be three partitions called
/dev/sdb1
/dev/sdb2
/dev/sdb3
The second column (“boot”) should be empty. We must tell the system which of these partitions to boot from when USB drive is selected as boot device. To do that, we shall press the letter a.
Fdisk will now ask us the number of the partition we want booted. We will press 2.
Now we press p again: now there should be an asterisk beside /dev/sdb2.
We will now press w to write this to the disk and exit Fdisk.
We will now type fdisk /dev/sdb again.
We will check that the new boot flag (the asterisk) is really written to the disk, by pressing p. If it’s not present, we’ll repeat the process; if it is present, we’ll just press q to quit fdisk.
We will now reboot, enter the BIOS and set USB drive as first boot device. Then, we will let the computer boot, keeping our fingers crossed.
Then, we’ll post back here.:wink:

Did as said. Now I get an err 16 (missing op system) when booting from usb. Ubuntu boots normal but I don’t get to see the boot menu any more.

We’re getting there, just need some patience. Now you should boot Ubuntu to single-user again with the USB attached, and type grub to get to the grub prompt.
Once in grub, type root (hd1,1). If grub gives you an error, try typing root ( and then press tab: grub will show which root devices are available.
Then type setup (hd1,1).
Grub should now repair your USB installation. If it gives you an error instead, please post back what error it was.
Now try rebooting with USB set as first boot device.

Given your disk and portability goal (booting the USB from any PC), your simple disk configuration (the root is on a primary partition, on both disks), that SuSE and Ubuntu use different methods of managing grub (YaST vs Debian), and the difficulties you are having . . .

Let me suggest you would do much better to simplify the boot process and change how you are using grub: Do not install grub to the MBR of either disk; instead use generic (or even Windows) master boot code. Unlike grub in the MBR which gets installed with an embedded pointer, generic code will simply look for whichever primary partition has its bootable (“active”) flag set, and load that partition’s boot sector. It is there (the PBR) that you would install grub.

To implement this, instruct YaST Boot Loader to install grub to “Boot from Root Partition” (on the Boot Loader Installation tab), and then on the Boot Options screen, check both “Write Generic Code to MBR” and “Set Active Flag in Partition Table for Boot Partition”. Do this with the USB set to boot in the bios.

You also need to make sure that the /boot/grub/device.map shows the USB as first boot disk - This is one of the two basic problems you are having above. The openSUSE device.map on sdb needs to look like this (which is the reverse of what is in Ubuntu’s device.map):

(hd0) (sdb)
(hd1) (sda)

So also change device.map in YaST Boot Loader this way: Click Other (bottom right), click Edit Configuration Files. On the new screen there is an editing window with a file pull-down at top; choose device.map. Edit it there to look like the above. Then click OK. Now click Other again, Edit Configuration Files again, choose menu.lst. In the openSUSE boot stanzas you should now see “root (hd0,1)”, if you don’t, edit the file to show that. Click OK, click Finish. The openSUSE USB will now boot in any machine where the bios is configured to boot from USB.

That leaves setting up Ubuntu’s to boot. Here is your second basic problem - you are using chainloading stanzas without having first installed grub to each disk’s PBR. Above we have done that for booting openSUSE, that needs to also be done for Ubuntu. We also need to get the generic MBR code installed on sda. I can give you the commands to do both these tasks, but to do that (1) you must have already done the YaST work above and (2) I need to know which OS you can now boot into (the commands will be different from each). Post that info back here and we can finish this.

I followed JosipBroz instructions but no change. Still “missing OS” when trying to boot from usb - the system does not seem to find the menu.lst file.

@mingus725: I think I understand your point but that should be independent from why the system won’t boot from the usb at all. I’ll try your suggestions on the weekend as I will need to boot opensuse from a LiveCD in order to get YaST running. YasT would also be available once the usb disk would boot again.

It’s late in Hong Kong. Thanks for your support.

That is not necessarily true at all. For the setup to work as you are doing it, everything must be synchronized - what is in the MBR along with its the pointer, what is in the PBR along with its pointer, the device.map grub/disk alignment, the menu.lst stanzas, and the grub installation commands. Just from reading the posts above, I can see that this is not so.

If you have set the bios to boot from the USB and you get “no operating system”, that means there is no executable code in the MBR. If you get a grub error of some kind, that means grub has been installed and/or configured wrong. The method I suggested is designed to eliminate these problems.

If you would rather set everything up with grub in each MBR instead, that can be done but it requires more/different work and more knowledge. If you want to use this method instead, there are two fundamental things to understand:

First, grub bases everything it does on the bios boot device sequence. When you boot from a different drive first (as with the USB) then all of the grub installation and configuration must be set up that way (in other words, when booting from USB sdb it is hd0 and sda is hd1, but when booting from sda it is hd0 and sdb is hd1, etc.).

Second, booting from USB has certain limitations, depending on the bios. For example, with most bios’s the bootstrap code inside a USB MBR cannot see the internal disks; therefore if grub stage1 is installed to a USB MBR with its pointer looking for the grub stage2 loader on an internal disk, it will fail. There is no standard for how a bios handles USB boot devices. To get USB booting properly, especially if it is desired to move the USB from one machine to another, requires factoring in the mechanics of both the bios and the boot loader.

By the way, if you want to know exactly what is in the USB MBR, you can just take a look at it (as root):

dd if=/dev/sdb of=sdbmbr bs=512 count=1
xxd sdbmbr

You can of course do the same to look at the sda MBR, just using sda instead of sdb in the above command. Be very careful doing this, however - a mistake could break the boot code or even the partition table.

I tried to follow mingus725 recommendation. However, there seems to be something wrong with the partition table on the usb drive. I booted opensuse LiveCD, started Yast -> Boot Loader which resulted in “Error - Because of the partitioning, the boot loader cannot be installed properly”.

The dd command also shows something similar:
I
0000110: 6e76 616c 6964 2070 6172 7469 7469 6f6e nvalid partition
0000120: 2074 6162 6c65 0045 7272 6f72 206c 6f61 table.Error loa
0000130: 6469 6e67 206f 7065 7261 7469 6e67 2073 ding operating s
0000140: 7973 7465 6d00 4d69 7373 696e 6720 6f70 ystem.Missing op
0000150: 6572 6174 696e 6720 7379 7374 656d 0000 erating system…

Can this be repaired or should I just start installing opensuse on the usb from scratch?

What you posted from the dd command is not the entire MBR. We should look at that. I can see enough to tell you it is not grub; it is the Windows boot code, which will work fine if you are using the method I described above. The error messages you see are a piece of that code that is seen when the system first boots and then only if an active partition is not found in the MBR table or the table cannot be read. So seeing that text in the MBR only means that the code is there, not that the error is true. The table follows the section you posted. So post back the entire 512 bytes, and also post the output of this command (requires root) back here:

fdisk -lu /dev/sdb

Take a close look at the output. Is there an asterisk on the sdb2 line? If there is not (or if it is on a different line), do this:

sfdisk -A2 /dev/sdb

That will make the sdb2 partition active. Now to install grub to the boot sector of the sdb2 partition, it would be better to use the grub shell from the command line. But remember, you need to have re-configured grub on the USB for it to be the first boot drive, so before installing grub you need to make sure that /boot/grub/device.map is changed. Do this in a terminal window as root to mount the USB root partition:

mount -t ext3 /dev/sdb2 /mnt

Now run a text editor as root. Press Alt-F2 and if KDE do:


kdesu kwrite /mnt/boot/grub/device.map

Or if gnome, use “gnomesu” instead of “kdesu”. Now change it to look like this and save it:


(hd0) (sdb)
(hd1) (sda)

While still in the text editor, open the file /mnt/boot/grub/menu.lst and change “root (hd1,1)” to “root (hd0,1)” in the SuSE boot stanza; save that. Now go back to the terminal window, as root, and do:

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

That installs grub in the sdb2 partition boot sector. Now reboot with the bios set to boot from USB.

sdbmbr (all 512) after boot from LiveCD:
0000000: 33c0 8ed0 bc00 7cfb 5007 501f fcbe 1b7c 3…|.P.P…|
0000010: bf1b 0650 57b9 e501 f3a4 cbbe be07 b104 …PW…
0000020: 382c 7c09 7515 83c6 10e2 f5cd 188b 148b 8,|.u…
0000030: ee83 c610 4974 1638 2c74 f6be 1007 4eac …It.8,t…N.
0000040: 3c00 74fa bb07 00b4 0ecd 10eb f289 4625 <.t…F%
0000050: 968a 4604 b406 3c0e 7411 b40b 3c0c 7405 …F…<.t…<.t.
0000060: 3ac4 752b 40c6 4625 0675 24bb aa55 50b4 :.u+@.F%.u$…UP.
0000070: 41cd 1358 7216 81fb 55aa 7510 f6c1 0174 A…Xr…U.u…t
0000080: 0b8a e088 5624 c706 a106 eb1e 8866 04bf …V$…f…
0000090: 0a00 b801 028b dc33 c983 ff05 7f03 8b4e …3…N
00000a0: 2503 4e02 cd13 7229 be46 0781 3efe 7d55 %.N…r).F…>.}U
00000b0: aa74 5a83 ef05 7fda 85f6 7583 be27 07eb .tZ…u…’…
00000c0: 8a98 9152 9903 4608 1356 0ae8 1200 5aeb …R…F…V…Z.
00000d0: d54f 74e4 33c0 cd13 ebb8 0000 8038 4608 .Ot.3…8F.
00000e0: 5633 f656 5652 5006 5351 be10 0056 8bf4 V3.VVRP.SQ…V…
00000f0: 5052 b800 428a 5624 cd13 5a58 8d64 1072 PR…B.V$…ZX.d.r
0000100: 0a40 7501 4280 c702 e2f7 f85e c3eb 7449 .@u.B…^…tI
0000110: 6e76 616c 6964 2070 6172 7469 7469 6f6e nvalid partition
0000120: 2074 6162 6c65 0045 7272 6f72 206c 6f61 table.Error loa
0000130: 6469 6e67 206f 7065 7261 7469 6e67 2073 ding operating s
0000140: 7973 7465 6d00 4d69 7373 696e 6720 6f70 ystem.Missing op
0000150: 6572 6174 696e 6720 7379 7374 656d 0000 erating system…
0000160: 0000 0000 0000 0000 0000 0000 0000 0000 …
0000170: 0000 0000 0000 0000 0000 0000 0000 0000 …
0000180: 0000 008b fc1e 578b f5cb 0000 0000 0000 …W…
0000190: 0000 0000 0000 0000 0000 0000 0000 0000 …
00001a0: 0000 0000 0000 0000 0000 0000 0000 0000 …
00001b0: 0000 0000 0000 0000 7856 3412 0000 0001 …xV4…
00001c0: 0100 82fe 7f05 3f00 0000 4739 4000 8000 …?..G9@…
00001d0: 4106 83fe ffff 8639 4000 730a 8002 00fe A…9@.s…
00001e0: ffff 83fe ffff f943 c002 8738 3c04 0000 …C…8<…
00001f0: 0000 0000 0000 0000 0000 0000 0000 55aa …U.

fdisk (sdb):
linux:/home/linux # fdisk -lu /dev/sdb

Disk /dev/sdb: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders, total 117210240 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x12345678

Device Boot Start End Blocks Id System
/dev/sdb1 63 4209029 2104483+ 82 Linux swap / Solaris
/dev/sdb2 * 4209030 46154744 20972857+ 83 Linux
/dev/sdb3 46154745 117210239 35527747+ 83 Linux

I edited all files as explained but grub failed to setup hd0,1 due to:
grub> setup (hd0,1) (hd0,1)
setup (hd0,1) (hd0,1)
Checking if “/boot/grub/stage1” exists… no
Checking if “/grub/stage1” exists… no

Error 15: File not found

You are very close. The problem is that when you ran the grub install, grub had the disks reversed. This is always a little tricky, because it can change depending on what you are booted into and the device.map that it is referencing at that time.

Looks like you did the above from the LiveCD, is that right? Let’s get you booting into openSUSE from Ubuntu, and then once you are in openSUSE, this is will much, much easier. I think your USB MBR is OK, and you got the openSUSE root partition marked active, so all we need to do is get grub installed into the openSUSE root partition.

Boot into Ubuntu. IIRC the Ubuntu menu is a text list. Press the ‘c’ key and you will be dropped from the menu into the grub shell with a > prompt. There do this:

find /boot/grub/stage2

grub should reply with this:


(hd0,0)
(hd1,1)

then do this:

root (hd1,1)
kernel /boot/vmlinuz root=/dev/sdb2
initrd /boot/initrd
boot

openSUSE should boot. You won’t get the splash screen and the scrolling text will be large, but that doesn’t matter at this moment. Login to openSUSE, open a terminal window, switch to root, and do:

cat /boot/grub/device.map

If you did the edits in my previous post, it should be:

(hd0) /dev/sdb
(hd1) /dev/sda

If it isn’t, use a text editor to change it to that. Once that is done, we try again the grub installation:

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

If that was successful, now use a text editor as root to edit /boot/grub/menu.lst. Change the gfxmenu line near the top, and the root lines in the openSUSE boot stanzas, to be (hd0,1) instead of (hd1,1). Save the file and exit.

Reboot. Enter bios, switch to USB boot, save. Machine reboots and you see openSUSE boot menu. Once you get this far (hopefully), in the next step we can add to both Ubuntu and openSUSE’s in menu.lst what is required to boot the other one.

ok to the point until we try to boot from the usb disk. The system seems to boot (I could not follow all the messages) but after a while ends with “could not find /dev/sdb2” => offers a fallback to the same location which I confirmed with “Y” but same result. Finally exit to /bin/sh.