Sun Apr 13 22:04:37 EDT 2008

upgrading a harddisk w. grub

to keep it easy, make sure the partitions are the same. might also
keep the filesystem the same to make sure it boots properly. for me
that's hda1 = swap, hda2 = reiserfs.

mount the new filesystem, cd to it and "cp -ax / ."

then, cd to /boot/grub and create a file 'move_map' with an entry:

(hd0)	/dev/hdb

where hdb is the where the new root is currently mounted. this assumes
it will be the first harddrive visible to grub when booting (hd0).

then run grub with:

grub --device-map move_map

root (hd0,1)                    # set root dir
find /boot/grub/stage1          # make sure it's the right one
setup (hd0)                     # install in MBR

to make sure you got the right drive, do "touch BLA" in the mounted
new root, and try "find /BLA" in grub.

that should work, but for me atm it doesnt.. bios prob? EDIT: i tried
to run grub from within the image, but something doesn't want to work