[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: howto map boot device to hd0 automagically?

From: Franklin PIAT
Subject: Re: howto map boot device to hd0 automagically?
Date: Sun, 17 Feb 2008 11:58:18 +0100


I have no experience setting-up grub on USB device, but under PC BIOS,
the "hard-disk" your're booting from is always numbered 0x80 (AFAIK,
BIOS's 0x80  _is_ Grub hd0).

Therefore, when you boot from IDE disk, you have:
  IDE HD    : 0x80 == hd0 => hda|sda
  USB drive : 0x81 == hd1 => sdb

But when you tell your BIOS to boot from USB disk, it's reordering BIOS
ID, so:
  USB drive : 0x80 == hd0 => sdb*
  IDE HD    : 0x81 == hd1 => hda|sda*

So boot disk should always be "(hd0)".

Reminder: AFAIK, is only useful when you install/update
grub, it's not used at boot time. For instance, your may
look like  "(hd0) /dev/sde"  (YMMV)

* I'm not 100% sure about the linux device name, but I think the linux
block-device names doesn't change when you change the BIOS boot
sequence, since the Linux device names are given by linux it self, when
it's actually enumerating the [PCI] controllers. (not to mention udev's
persistent device naming, but this is offtopic).

Hope this helps

On Sun, 2008-02-17 at 09:04 +0100, Harald Dunkel wrote:
> Hi folks,
> I am trying to setup grub 0.97 on a USB stick (not using an iso image)
> to be used on an arbitrary PC, AFAP. On the PC used to install grub it
> boots without problems (of course). But according to the documentation
> I have to manually change either or menu.lst to make it work
> on another PC.
> Is there some way to tell grub: "Set hd0 to the device you booted from",
> or "Search for a disk with a label 'usbroot' on the first partition,
> and map hd0 accordingly"?
> To be sure, I have verified that mbr(0x40) is set to 0xff. But it doesn't
> affect the device map, AFAICS.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]