help! GRUB error 17 when booting opensuse 11 from USB HDD

I’m a linux newbie, and wanted to install Opensuse 11 on an external usb HDD. The details of the external HDD are as follows:
total size of hard disk: 93.1 GB
dev/sdb1: NTFS partition to use with windows.(58.5 GB)

dev/sdb2: Extended partition to use for opensuse. (34.5 GB)
dev/sdb5: Linux swap (2GB)
dev/sdb6: Linux root partition (13.2 GB)
dev/sdb7: Home partition. (19.3)

In order to boot directly from the USB hdd, i placed the GRUB boot loader on the root partition(dev/sdb6), and set the BIOS boot priority order to (1)USB HDD,(2)Disk Drive, and then (3)internal hard disk.
However, now when i try to boot from the USB HDD, i get the error : “GRUB loading… Error 17”
Please Help!

When you installed Suse, was the BIOS set to boot from sdb or from sda?

PS just noticed you are post #1 – so HHHIIII there and welcome here

Hey! thanks a lot for welcoming me in!:slight_smile:

Ok, earlier i had installed mandriva spring 2008 on the USB hard disk (but i had formatted it properly via windows vista later on as i didn’t like mandriva linux. It was booting fine from the USB HDD), so the BIOS was already set to boot from USB HDD (first choice). Just for information, i used the Gnome live disk…

Error 17 occures when: “This error is returned if the partition requested exists, but the filesystem type cannot be recognized by GRUB”

So Grub must be pointig at the wrong partition, perhaps the mandriva code is still in the Master Boot Sector. Whatever, leave the bios pointing to the usb drive. Boot from the Gnome disk and install Grub again. You do that this way: open a console (Gnome terminal). Enter su to become root.
enter grub
enter find /boot/grub/menu.lst
you should get a return like this: (hd1,5) if not then stop and tell us.
enter root (hd1,5)
enter setup (hd1)

Then reboot and you should get to Suse. But if it’s not response (hd1,5) don’t proceed

ok, I did as you said, typed in root (hd1,5) after grub>.
I got the following response:
“Filesystem type is ext2fs, partition type 0x83”
then i typed: setup (hd1)
I got the following response:
“Checking if “/boot/grub/stage1” exists…yes
Checking if “/boot/grub/stage2” exists…yes
Checking if “/boot/grub/e2fs_stage1_5” exits…yes
Running “embed /boot/grub/e2fs_stage1_5 (hd1)”…15 sectors are embedded.
succeeded
Running “install /boot/grub/stage1 (hd1) (hd1)1+15 p (hd1,5) /boot/grub/stage2/ boot/grub/menu.lst”… succeeded.
Done.”
Now when i boot, it goes like this:
Booting ‘openSUSE 11.0’
root (hd1,5)
Error 22: No such partiton
Press any key to continue…
After pressing any key, it goes back to the GRUB menu listing various options to boot, ie Opensuse 11, windows 1 and opensuse failsafe.

These things are so complicated – too many possibilities from each of which diverges three more possibilities. It should be fairly simple: when you want to boot windows you switch with the BIOS bootloader key (like F12 on my Dell) and boot to drive 0 – sda. When you want Suse you stay with boot to drive 1 – sdb. But something’s wrong in the minutiae!!

Anyway – still with booting from sdb: When you get the new green Suse screen with “various options to boot, ie Opensuse 11, windows 1 and opensuse failsafe”, press Escape key and it will goto a “Text mode interface”. Then press the c key to get Grub’s command line interface. Then enter this:
find /boot/grub/stage1
It should return (hd1,5). Report here if it returns something else.
Then enter this: root (hd1,5) → get Filesystem type is etc etc
Then enter this: kernel /boot/vmlinuz → get [Linux-bz image etc etc]
Then enter this: initrd /boot/initrd → get [Linux-initrd etc etc]
Then enter this: boot → should boot into Suse.

There’s more if and when you get into Suse, but let’s see if you get that far?

Well i gave it a thought…i had complicated things a bit by partitioning my external hard disk for windows…
So i decided to format it entirely, so that the entire 93.1 GB was ‘unallocated’, and not mounted as an NTFS disk in Windows.
Now i started installing opensuse again. Here’s what it did:

/dev/sdb1: Swap (2 GB)
/dev/sdb2: Root (20 GB)
/dev/sdb3: Home (16 GB ->I Manually reduced from 71GB)

So now i installed GRUB on the Root Partition. Opensuse Installation was successful.
In order to ensure that GRUB pointed towards the correct partition (now it should be (hd1,1)), i did as you said earlier. Logged in as root in terminal, typed grub, find /boot/grub/menu.lst.

return: (hd1,1)
i typed: root (hd1,1)
i typed: setup (hd1)
return: filesystem is this this…
/grub/stage1…yes
/grub/stage2…yes
/grub/e2fs_stage1_5 etc
succeeded.

Now i booted again. This is what i got:

Booting ‘Opensuse 11.0’
root (hd1,1)

Filesystem unknown, partition type 0x7.
Kernel /boot/vmlinuz…default root=/dev/disk…usb-ST…
Error 17: Cannot mount selected partition.

After some seconds, it automatically went into the boot options menu. There’s no green suse screen, only a b/w interface with a box containing the boot options, with instructions like ‘c’ for edit, ‘e’ for something else etc. underneath, and GRUB 0.97 etc. written on top.

I pressed ‘c’, and there was the text mode with ‘grub>’.

i typed: find /boot/grub/stage1
return: (hd0,1)

Here it should be (hd1,1) right? I thought i had told it to use hd1 (in gnome terminal earlier) and it had found the grub stage1,2 etc also… What can be wrong? Is the GRUB working all right? Seems like i’m close to getting it working…

Hi, to add more information…

After:

i typed: find /boot/grub/stage1
return: (hd0,1)

i typed:
root (hd1,1)

return: Filesystem type unknown, partition type 0x7.

I wonder whats wrong…

You have to be consistent with the BIOS and Grub, for Grub you always have the BIOS pointing to boot from the same partition, consistently.
Three questions:
When you installed openSuse did you have the BIOS set to boot from the external disk or from the internal disk?
When you reinstalled grub using the setup (hd1)…etc, which disk did you have the BIOS set to boot from?
In the very last post, which disk did you have the BIOS set to boot from?

ok, here’s the answer to the queries:

  1. When i installed opensuse this time, the bios setup was like this:
    1 USB FDD
    2 USB HDD
    3 DVD drive
    4 Internal HDD

  2. When i reinstalled Grub via terminal, the setup was the same. After that i think i moved the USB FDD to last position after the internal hard disk (but does it matter?). Then i booted the system, went to grub text mode. Then i got the answer (hd0,1) when i typed in find /boot/grub/stage1.

  3. The last post is just to add on to the post above it. I had forgot to mention that i had typed in root(hd1,1).

Please help me boot into opensuse! I want to see the opensuse green boot interface…:frowning:

OK the usb hdd is seen as (hd0) when and because the bios is switched that way. So whenever you want Suse you use the bios boot menu pointing at usb drive. And windows I suppose you point the bios at booting from internal drive.

So when you issued the command setup (hd1), that was possibly the internal drive it was initialising (because the bios is/was switched for hd0 to be the usb).

I suggest this: Get grub up with the bios pointing at usb drive and goto Grub command line by pressing the key “c”. Then enter these commands at the grub prompt:
find /boot/grub/stage1
It should return (hd0,1). Report here if it returns something else.
Then enter this: root (hd0,1) → get Filesystem type is etc etc
Then enter this: kernel /boot/vmlinuz → get [Linux-bz image etc etc]
Then enter this: initrd /boot/initrd → get [Linux-initrd etc etc]
Then enter this: boot → should boot into Suse.

Let’s see if that works.

“Anyway – still with booting from sdb: When you get the new green Suse screen with “various options to boot, ie Opensuse 11, windows 1 and opensuse failsafe”, press Escape key and it will goto a “Text mode interface”. Then press the c key to get Grub’s command line interface. Then enter this:
find /boot/grub/stage1
It should return (hd1,5). Report here if it returns something else.
Then enter this: root (hd1,5) → get Filesystem type is etc etc
Then enter this: kernel /boot/vmlinuz → get [Linux-bz image etc etc]
Then enter this: initrd /boot/initrd → get [Linux-initrd etc etc]
Then enter this: boot → should boot into Suse.”

I am having the same issue with the same error message. However, when I type in the commands above, it boots me into my Desktop. Now, if I reboot, I get the same error message. What steps are needed to finally fix this? Thanks a bunch…

It’s pointing to the wrong partition. Try reconfiguring Grub’s menu.lst by following this procedure: HowTo Repair Your Grub Multiboot

@swerdna -

I didn’t read thru this whole thread real closely, but since this is a USB external . . .

First, is there anything in the external’s MBR master boot code? OP installed to root partition, but if bios boots from external, needs to have that code there. Didn’t see that such was done; if it is a leftover grub MBR, the embedded stage1.5>filesystem> or stage2 pointer may be wrong. Or the bios may be dropping back from the external to the internal disk for want of finding MBR code (some bios’s chain down, some just stop).

Second, sometimes grub has a problem with an external vis-a-vis the bios. The easy alternative:


dd if=/dev/sda of=/dev/sdb bs=446 count=1

Copies the Windows boot code. Looks like grub is already in sdb2 partition boot sector. So:

sfdisk -A2 /dev/sdb2

To make it active. Should boot. This is the setup for my USB external.

@mingus725
lcomars is a new user – one post – the rest of the thread is maybe irrelevant.

Didn’t look like OP had a solution yet. And, yes, I missed the mid-stream switch in user (I’ve taken to asking such to create a new thread, IMO better all the way around). Anyway, fwiw, the solution above has worked nicely in all my USB external tests.