[plug] grub.?

Jim Householder nofixed at westnet.com.au
Sun Dec 30 15:37:31 WST 2007

James Elliott - WA Rural Computers wrote:
> I have two hard disks, one running under Windows XP
> and the other Ubuntu Linux.
> I want to replace my Windows XP HDD with a bigger one.
> For this purpose I temporarily replaced my Linux HDD with a new 250MB
> HDD, with a view to cloning my old Windows HDD onto the new HDD.

My 2 cents worth:

Assuming you have XP on hda and Ubuntu on hdb, and a spare hdc
(disconnect one of your optical drives if needed):
- move the XP disk to hdc - make sure the master/slave jumpers are OK
- install new disk as hda
- install XP on new drive
- migrate data
- use a live CD or DVD to re-install grub.  For this you need to note
the partition /boot is on before getting started.

Start grub from a live CD prompt as root
# grub
grub> root (hd1,0)          # assumes /boot is separate hdb1, or
grub> root (hd1,0)/boot     # if it is directory in root partition hdb1
grub> setup (hd0)           # installs grub in MBR of hda

There is apparently a single-command way to do it but I could not get it
to work.

In grub-speak hda is (hd0) and hda1 is (hd0,0).  The () are required.
Have a look at http://www.troubleshooters.com/linux/grub/grub.htm


More information about the plug mailing list