[OpenIndiana-discuss] Moving an OI install to a new hard drive?

Dan Swartzendruber dswartz at druber.com
Mon May 16 15:59:02 UTC 2011


Being fairly new to OpenSolaris, I wanted to run by my planned migration 
to a new box (using a new disk).  Here is what I was thinking (I did a 
mock migration last night and it *seemed* to work.)

1. Backup the root pool like this: "zfs send -Rv rpool at migrate > 
/tank/backups/oi-migrate" (after taking the snapshot first, LOL).

2. Boot the live-dvd of OI on the new box, get to a shell, and create a 
root pool by going into the format subsystem, creating a 100% solaris2 
partition.  Go into the partitioner to create a slice zero occupying 
cylinders 1 to N.  Label the disk.

3.  On the old box, nfs-share /tank/backups.

4. On the new box, mount /tank/backups on /mnt/foo.

5. Create the root pool with 'zfs create rpool DISKNAME'.

6. Restore the rpool with: "zfs receive -Fd rpool < /mnt/foo/oi-migrate".

7. Install grub with 'installgrub -m /boot/grub/stage1 /boot/grub/stage2 
/dev/rdsk/DISKNAMEs0" - I've also read (but can't confirm) that 'beadm 
activate xxx', where 'xxx' is the live BE on the old box will work.

I'm sure there are things in the above that are not quite right (or if 
they are okay, are not the recommended way of doing this).  This was 
kinda frustrating, I must say, since google showed me numerous 
incomplete and/or contradictory ways to do this whole exercise.  My 
favorite way (using clonezilla) is not possible, since it doesn't grok 
ZFS, so it will try to do a sector by sector copy, which is slow and 
even worse, will not work if the new disk is smaller...





More information about the OpenIndiana-discuss mailing list