Moving x86 Solaris boot disks to another server = hw box (or virtualized environment) - the SVM case
By Dirk Wriedt on Mar 05, 2010
This is just a scratchpad waiting for formatting, please email me if you have any additonal comments.
This was done on Solaris 10 U8.
How would it look like for zfs root? Or for OpenSolaris?
connect disk obtained by ripping out single boot disk or single disk of mirror out of original server..
boot solaris dvd, choose option 6 "shell"
for slices not svm encapsulated, installer will ask you if you would like to have solaris slice mounted, if not, it will tell you it's svm managed and will not do it by itself. you have to do it by hand. no problem.
on the shell:
Locate boot slice
example: c1t0d0s3, replace by actual slice name
mount /dev/dsk/c1t0d0s3 /a
rebuld device tree
mv /a/dev /a/dev.old
mv /a/devices /a/devices.old
tar cpf - dev | ( cd /a; tar xvpf - )
tar cpf - devices | (cd /a;tar xvpf -)
Ajust system file
if root disk was mirrored:
delete line with rootdev:
change entry for / to point to correct slice (the one mounted as /a right now)
if unsure, move swap entries aside
ls -l /dev/rdsk/c1t0d0s3 >>/a/boot/solaris/bootenv.rc
change bootpath to device name appended to this file by ls command, to everything after /devices. use x to delete old path J to join lines and x again to remove surplus ls output.
Adjust grub menu
where hd0=first disk (see bios), 0=first primary partition (see fdisk /dev/rdsk/c1t0d0p0 if necessary)), a=slice0, b=slice1, c=slice2 d=slice3 etc
Update boot archive
bootadm update-archive -R /a
installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t0d0s3
et voila - should work now
maybe you want to interrupt boot at grub menu, e)dit boot script and add " -s" to "multiboot" line for single user startup.
Some more cleanup to be done...
ethernet interface names
would be to create a flar archive and do a network based install from that -- but you would have to recreate system identity, ssh keys etc, see sys-unconfig.