Moving x86 Solaris boot disks to another server = hw box (or virtualized environment) - the SVM case


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?


Go!


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:


export TERM


TERM=at386


Locate boot slice


format


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:


vi /a/etc/system


delete line with rootdev:


Adjust vfstab


vi /etc/vfstab


change entry for / to point to correct slice (the one mounted as /a right now)


if unsure, move swap entries aside


Adjust bootenv.rc


ls -l /dev/rdsk/c1t0d0s3 >>/a/boot/solaris/bootenv.rc


vi  /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


vi /boot/grub/menu.lst


create entry


title active
root (hd0,0,d)
kernel /platform/i86pc/multiboot
module /platform/i86pc/boot_archive


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


Repair grub


installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t0d0s3


Done


reboot



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


zfs imports


other fs


ip address?



Another way


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.



Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Dirk Wriedt

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks
Software for Solaris
Favourite blogs
Dirks Bookmarks

No bookmarks in folder