# Booting from USB issue (grub)

## Chamo

Hi, 

not sure I'm in the right category here, but let's try...

I have installed Gentoo on an external hard disk (usb) because touching the internal hard disk is a no-go in this special case. Anyway, the usb disk is /dev/sdb, and the system itself works, but...

When I try to boot directly from the usb disk, I get 

```
GRUB loading, please wait...
```

no splash screen, and after the timeout

```
booting 'Gentoo'

Filesystem type unknown, (...)

Error 1§: Cannot mount selected partition

Press any key to continue...
```

The "§" sign isn't really there at the error number, but instead I have some scrambled characters, and this is one of them. So I actually don't know the error number. I guess it's the unfamous error 17.

When I press any key, I get a scrambled version of the splash screen, but I can choose which system to boot. Still, I get the same error even for the chainloader that should boot into windows on the internal hard disk. 

The strangest thing about this is...

When I put a rescue disk in my cdrom, use only its boot menu and choose to boot from the second hard disk... everything works fine! I get the splash screen from my grub on the usb disk, I can choose a system, it boots just fine... 

What's happening here? I guess it's somewhat related to having grub on a usb device, but that's not too unordenary, is it?

Thanks for your help!

Chamo

----------

## NeddySeagoon

Your USB drive is probably /dev/sda when you boot from it.

This may need some jiggery pokery with the system.map file before you can install grub.

From the unknown filesystem, it looks like grub is pointed to the wrong drive.

----------

## Chamo

Er, when I put in the rescue linux cdrom, then my usb drive shows up as second hard disk, and the internal drive is the first hard disk. So I can jump from the rescue linux boot screen to either disk and get the behaviour that I like to see: Booting windows from the internal disk or booting via grub on the usb drive. 

So, at least when going via the rescue linux boot screen, my usb drive is /dev/sdb.

What can I do to boot directly from the usb drive? Jiggery pokery with the system.map file is not my core competency.  :Confused: 

----------

## NeddySeagoon

Chamo,

You need to define a .map file to tell grub that yoiour usb drive is sda, as it will be when you boot from it.

Normally, grub genrates this file during install to the MBR to tell whatit dis.

You can also tell it to read it and follow it diring MBR install.

I don't have access to a gentoo install until at least Sunday as I'm in a hotel avout 4000 miles from home.

Its weel documented in the grub info pages.

Do info grub

----------

## Chamo

Hi NeddySeagoon,

thank you so much for your support!  :Smile: 

Now I can boot from my external drive and things work fine. 

Actually, I think you meant device.map, not system.map, but the relevant piece of information was indeed that my usb drive is the primary drive in GRUB's way of thinking. Not sda, but hd(0,x). After loading the kernel, my usb disk becomes sdb - er, most of the times. Doesn't seem to be deterministic.   :Rolling Eyes: 

Anyway, the GRUB issue is solved.  :Smile: 

Thanks again!

Chamo

----------

