For When You Can't Have The Real Thing
[ start | index | login ]
start > Linux > Grub Dance Of Starting

Grub Dance Of Starting

Created by dave. Last edited by dave, 12 years and 239 days ago. Viewed 2,735 times. #2
[diff] [history] [edit] [rdf]
labels
attachments
# grub
> device (hd0) /dev/sda
> root (hd0,0)
> setup (hd0)
(blah blah blah)
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2
/boot/grub/grub.conf"… succeeded
Done.
> quit

Be aware that (hd0,0) in this case is sda1.

If you want to apply the boot sector to sdb instead, the only thing you change is the name of the device. You still refer to it as (hd0):

# grub
> device (hd0) /dev/sdb
> root (hd0,0)
> setup (hd0)
(blah blah blah)
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2
/boot/grub/grub.conf"… succeeded
Done.
> quit

If you want to tell grub that the root partition isn't the first one, you address it as so. This example tells grub that partition 2 on sdb is where grub is installed:

grub> device (hd0) /dev/sdb

grub> root (hd0,1) Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0) (blah blah blah) Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,1)/boot/grub/stage2 /boot/grub/grub.conf"… succeeded Done.

grub> quit

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt