|
|
发表于 2005-7-29 05:13:46
|
显示全部楼层
Assume you have the following HDD layout during Linux installation:
/dev/sda is your USB HDD
/dev/sda4 is your boot partition /boot
/dev/sda7 is your root partition /
Then, during Linux installation, your /dev/sda is recognized as (hd1) by GRUB.
Steps:
1. Become root
2. Run grub
#grub
Probing devices to guess BIOS drives. This may take a long time.
3. In grub shell, run the following commands:
>root (hd1,3)
>setup (hd1)
>quit
Here, (hd1,3) correspond to your /dev/sda4 which is your /boot, i.e. where the
kernel image and initrd located.
(hd1) is the MBR of your /dev/sda (USB HDD)
That's it. However, you need to edit your menu.lst as well.
If you setup your BIOS to boot your USB HDD, grub will recognize your USB HDD
as the first hard disk to boot, i.e. hd0, not hd1. In this case, your have to write the menu.lst as:
title Gentoo Linux on USB HDD.....
root (hd0,3)
kernel vmlinuz-xxxxx ..... real_root=/dev/sda7 .....
initrd initrd-xxxxx
...
Clear?
Good luck! |
|