Tuesday Jan 19, 2010

Solaris 10 and OpenSolaris on the same zfs root pool

Sharing more info.. Here are some hints for installing both Solaris 10 and OpenSolaris on the same zfs rpool.

I did this on a VirtualBox guest.. I did a fresh install of s10u8 on a zfs root (you need to use the text installer or do a net based install to install on a zfs root).

I then booted an OpenSolaris iso, and after setting my hostname and hostid, ran the create-be script to create a new OpenSolaris BE on the S10's zfs root.

DISCLAIMER: this is totally unsupported by Sun, could mess up your system, etc. etc.

Write down your hostname, hostid, IP addr, netmask, gateway, and NIS domain.

	bash-3.00# uname -a
	SunOS unknown 5.10 Generic_141445-09 i86pc i386 i86pc
	bash-3.00# hostid
	10fa4034
	bash-3.00# echo "hw_serial,0xa?B" | mdb -k
	hw_serial:
	hw_serial:32 38 34 38 33 35 38 39 32 0
	bash-3.00#
Boot your OpenSolaris iso.. Set your hostname and hostid.
        jack@opensolaris:~$ pfexec su -
	root@opensolaris:~# hostname unknown
	root@unknown:~# hostid
	00041f55
	root@unknown:~# echo "hw_serial/v 32 38 34 38 33 35 38 39 32 0" | mdb -kw
	root@unknown:~# hostid
	10fa4034
	root@unknown:~# 
Get the create-be script...
        root@opensolaris:~# wget http://blogs.sun.com/mrj/resource/create-be
        root@opensolaris:~# chmod a+x create-be
Import your Solaris 10 rpool... Create the OpenSolaris BE (we'll need to manually create the menu.lst entry later since the script doesn't handle s10 menu.lst entries right now.
        root@opensolaris:~# zpool import rpool
        root@opensolaris:~# /root/create-be --build=129 --bename=osol129 
Add your new BE into your menu.lst. e.g. here is my entry.
  title osol129
  findroot (pool_rpool,0,a)
  bootfs rpool/ROOT/snv129
  kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
  module$ /platform/i86pc/$ISADIR/boot_archive
Install a newer version of grub
        root@opensolaris:~# /mnt/sbin/installgrub /mnt/boot/grub/stage1 /mnt/boot/grub/stage2 /dev/rdsk/c0d0s0
Now, reboot into your OpenSolaris BE, configure it, and look around. You can reboot back into s10 at any time...
root@unknown:~# uname -a
SunOS unknown 5.11 snv_129 i86pc i386 i86pc Solaris
root@unknown:~# 

root@unknown:~# zfs list
NAME                        USED  AVAIL  REFER  MOUNTPOINT
rpool                      10.4G  28.8G    40K  /rpool
rpool/ROOT                 8.37G  28.8G    21K  legacy
rpool/ROOT/s10x_u8wos_08a  3.67G  28.8G  3.67G  /
rpool/ROOT/snv129          4.70G  28.8G  4.70G  /mnt
rpool/dump                 1.00G  28.8G  1.00G  -
rpool/export                 44K  28.8G    23K  /export
rpool/export/home            21K  28.8G    21K  /export/home
rpool/swap                    1G  29.8G    16K  -
root@unknown:~# 

root@unknown:~# beadm list
BE             Active Mountpoint Space Policy Created          
--             ------ ---------- ----- ------ -------          
s10x_u8wos_08a R      -          3.67G static 2010-01-13 12:02 
snv129         N      /          4.70G static 2010-01-14 14:24 
root@unknown:~# beadm activate s10x_u8wos_08a
root@unknown:~# reboot

...

bash-3.00# uname -a
SunOS unknown 5.10 Generic_141445-09 i86pc i386 i86pc
bash-3.00# zfs list
NAME                        USED  AVAIL  REFER  MOUNTPOINT
rpool                      10.4G  28.8G    40K  /rpool
rpool/ROOT                 8.37G  28.8G    21K  legacy
rpool/ROOT/s10x_u8wos_08a  3.67G  28.8G  3.67G  /
rpool/ROOT/snv129          4.70G  28.8G  4.70G  /mnt
rpool/dump                 1.00G  28.8G  1.00G  -
rpool/export                 44K  28.8G    23K  /export
rpool/export/home            21K  28.8G    21K  /export/home
rpool/swap                    1G  29.8G    16K  -
bash-3.00#

About

mrj

Search

Categories
Archives
« January 2010
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
16
17
18
21
22
23
24
25
26
27
28
29
30
31
      
Today