Hey List what gives Where are you all?

Collins erichey2
Mon May 17 11:57:06 PDT 2004


On Saturday 20 December 2003 11:49, dep wrote:

>
> now. anybody know the grub command needed to get it to write to a drive
> that's hdb such that it will boot when it becomes hda?

There are other ways, but I always use a grub boot floppy when changing hard 
drives:

1. Format a floppy (dos or ext2) and mount it
2. Create /boot and /boot/grub on the floppy
3. Copy all files from your disk /boot/grub to the floppy /boot/grub
4. Edit the menu.lst (must be if using dos floppy) or grub.conf and add an 
entry to allow you boot from the new drive (if the drive is now /dev/hdb3 
(hd1,2) and it will become /dev/hda3, the new boot stanza should refer to 
(hd0,2).  Also update the menu.list/grub.conf on your new disk /boot/grub 
with the same stanza.
5. unmount the floppy
6. grub
    root (fd0)
    setup (fd0)
7. test the boot floppy to boot your current partition.
8. Now you can do the hardware swap.
9. boot from floppy and select your new partition
10. grub
      root (hd0,2)
      setup (hd0)
11. Now you can boot from the new drive
12. Keep the floppy for emergency use

Enjoy,

-- 
Collins



More information about the Linux-users mailing list