You are on page 1of 6

OpenSolaris 2009.06 domU on opensuse 11.

2 dom0 Posted by Martin Bach on February 5, 2010 I was curious to get started with opensolaris and quite eager to install it as a dom on a !inu" dom0# $here would ha%e been little problem to do it the other way around# &ctually, I could ha%e installed opensolaris on my $oshiba '(00 too) $hen I tried out a number o* current linu" distributions, but e"cept *or open+u+, none had a dom0 -ernel out o* the bo" which really is a shame# +eems I need to loo- more closely into ./M with %irtio support# Preparations 0reate a networ- bridge br1 as a host only inter*ace without bridging to any eth" inter*ace# I assigned IP 112#1(2#11#10 to it, statically3 dom0:~ # cat /etc/sysconfig/network/ifcfg-br1 BOOTPROTO= static BR!"#$= yes BR!"#$%&OR'(R""$)(*= 0 BR!"#$%PORT+= BR!"#$%+TP= off BRO(",(+T= $T-TOO)%OPT!O.+= !P(""R= 1/011231//110/04 5T6= .(5$= .$T'OR7= R$5OT$%!P(""R= +T(RT5O"$= a8to 6+$R,O.TRO)= no dom0:~ # ifconfig br1 br1 )ink enca9:$t:ernet -'addr &$:&&:&&:&&:&&:&& inet addr:1/011231//110 Bcast:1/011231//10;; 5ask:0;;10;;10;;10 inet2 addr: fe30::ac22:0ff:fe3e:c2</24 +co9e:)ink 6P BRO(",(+T R6..!.# 56)T!,(+T 5T6:1;00 5etric:1 R= 9ackets:1223 errors:0 dro99ed:0 o>err8ns:0 frame:0 T= 9ackets:1132 errors:0 dro99ed:0 o>err8ns:0 carrier:0 co??isions:0 t@A8e8e?en:0 R= bytes:1<;042/ B110 5bC T= bytes:3/1;D B3D10 7bC 4ow prepare the open +olaris install media 5which you can download *or *ree *rom +un6s website7# I chose the *ollowing directory structure3 8m8osol 9 mount the open solaris image %ia the loopbac- dri%er 8m8"en8-ernels 9 to store the -ernels *or the initial installation 8m8"en8vmname 9 to store *iles pertaining to a %m

4ow let6s mount mount the install image and copy the (:bit -ernel and ramdisto 8m8"en8-ernels dom0:~ dom0:~ dom0:~ dom0:~ # # # # mo8nt -o ?oo9 oso?-0/02-@321iso /m/oso? mkdir /m/@en/kerne?s EE cd /m/@en/kerne?s c9 /m/oso?/boot/amd24/@321microroot c9 /m/oso?/9?atform/i32@9>/kerne?/amd24/8ni@ 1

dom0:~ # mkdir /m/@en/oso? EE /m/@en/oso? $he last step is to create a sparse *ile o* 2 ;B si<e *or the solaris root *ile system dom0:/m/@en/oso? # dd if=/de>/Fero of=system bs=1 co8nt=0 seek=3# dom0:/m/@en/oso? # ?s -?: tota? 111# -rw-r--r-- 1 root root 310# &eb 4 14:<4 system +ince non o* the con*iguration tools -nown to me can boot the li%e image, we need to create a custom con*iguration *ile *or the installation o* opensolaris# 'emember that opensolaris boots into a li%e mode and then you install it to your dis-# dom0:~ # >i /etc/@en/>m/oso? name = Goso?G ma@mem = 1;<2 memory = 1004 >c98s = 0 kerne? = G/m/@en/kerne?s/8ni@G ramdisk = G/m/@en/kerne?s/@321microrootG e@tra = G/9?atform/i32@9>/kerne?/amd24/8ni@ - nowin -B insta??%media=cdromG on%9oweroff = GdestroyG on%reboot = GdestroyG on%cras: = GdestroyG disk = H 9:y:/de>/?oo91I@>dc:cdromIr I Gfi?e:/m/@en/oso?/systemI@>daIwGI J >if = H Gmac=00:12:<e:1b:e3:13Ibridge=br1Iscri9t=>if-bridgeG J replace loop1 with the loop de%ice where your 0= is mounted 9 use the *ollowing i* you are unsure3 dom0:/etc/@en/>m # mo8nt K gre9 ?oo9 /de>/?oo90 on /sr>/www/:tdocs/r:e? ty9e iso/220 BrwC /de>/?oo91 on /m/oso? ty9e iso/220 BrwC &s you can see it6s loop1 in my case# Installation Begin by starting the new dom indicates user input3 dom0:/etc/@en/>m # @m create -c oso? 6sing config fi?e G1/oso?G1 +tarted domain oso? Bid=10C ><1411%1/D13%04-011 c:gset 1/D13 and >ump straight to it6s console# $e"t in red

+8nO+ Re?ease ;111 Lersion sn>%111b 24-bit ,o9yrig:t 1/3<-000/ +8n 5icrosystemsI !nc1 (?? rig:ts reser>ed1 6se is s8bMect to ?icense terms1 -ostname: o9enso?aris Remo8nting root read/write Probing for de>ice nodes 111 Pre9aring ?i>e image for 8se "one mo8nting )i>e image 6+B keyboard 11 (?banian 0<1 )it:8anian 01 Be?ar8sian 041 )at>ian <1 Be?gian 0;1 5acedonian 41 BraFi?ian 021 5a?ta%67 ;1 B8?garian 0D1 5a?ta%6+ 21 ,anadian-Bi?ing8a? 031 .orwegian D1 ,roatian 0/1 Po?is: 31 ,Fec: <01 Port8g8ese /1 "anis: <11 R8ssian 101 "8tc: <01 +erbia-(nd-5ontenegro 111 &innis: <<1 +?o>enian 101 &renc: <41 +?o>akian 1<1 &renc:-,anadian <;1 +9anis: 141 -8ngarian <21 +wedis: 1;1 #erman <D1 +wiss-&renc: 121 #reek <31 +wiss-#erman 1D1 !ce?andic </1 Traditiona?-,:inese 131 !ta?ian 401 T8rkis:N 1/1 Oa9anese-ty9e2 411 T8rkis:& 001 Oa9anese 401 67-$ng?is: 011 7orean 4<1 6+-$ng?is: 001 )atin-(merican To se?ect t:e keyboard ?ayo8tI enter a n8mber Hdefa8?t 4<J: 4< 11 (rabic 01 ,:inese - +im9?ified <1 ,:inese - Traditiona? 41 ,Fec: ;1 "8tc: 21 $ng?is: D1 &renc: 31 #erman /1 #reek 101 -ebrew 111 -8ngarian 101 !ndonesian 1<1 !ta?ian 141 Oa9anese 1;1 7orean 121 Po?is: 1D1 Port8g8ese - BraFi? 131 R8ssian 1/1 +?o>ak 001 +9anis: 011 +wedis: To se?ect deskto9 ?ang8ageI enter a n8mber Hdefa8?t is 2J: 2 6ser se?ected: $ng?is:

,onfig8ring de>ices1 5o8nting cdroms Reading P&+ config: done1 o9enso?aris conso?e ?ogin: Mack Password: +8n 5icrosystems !nc1 +8nO+ ;111 MackQo9enso?aris:~R ?ou can su to root, password is opensolaris# B$@, the con*iguration *ile translates into the *ollowing lib%irt AM! *ile3 dom0:~ # >irs: d8m9@m? 10 Sdomain ty9e= @en id= 10 T SnameToso?S/nameT S88idTe2d1;d3d-0<;2-f/cD-/baf-<;ac0e;1bd<3S/88idT SmemoryT1;D0324S/memoryT Sc8rrent5emoryT1043;D2S/c8rrent5emoryT S>c98T0S/>c98T Sboot?oaderTS/boot?oaderT SosT Sty9eT?in8@S/ty9eT Skerne?T/m/@en/kerne?s/8ni@S/kerne?T SinitrdT/m/@en/kerne?s/@321microrootS/initrdT Scmd?ineT/9?atform/i32@9>/kerne?/amd24/8ni@ - nowin -B insta??%media=cdromS/cmd?ineT S/osT Sc?ock offset= 8tc /T Son%9oweroffTdestroyS/on%9oweroffT Son%rebootTdestroyS/on%rebootT Son%cras:TdestroyS/on%cras:T Sde>icesT Sdisk ty9e= b?ock de>ice= cdrom T Sdri>er name= 9:y /T Sso8rce de>= /de>/?oo91 /T Starget de>= @>dc b8s= @en /T Sreadon?y/T S/diskT Sdisk ty9e= fi?e de>ice= disk T Sdri>er name= fi?e /T Sso8rce fi?e= /m/@en/oso?/system /T Starget de>= @>da b8s= @en /T S/diskT Sinterface ty9e= bridge T Smac address= 00:12:<e:1b:e3:13 /T Sso8rce bridge= br1 /T Sscri9t 9at:= /etc/@en/scri9ts/>if-bridge /T Starget de>= >if1010 /T S/interfaceT Sconso?e ty9e= 9ty tty= /de>/9ts/; T Sso8rce 9at:= /de>/9ts/; /T Starget 9ort= 0 /T S/conso?eT S/de>icesT S/domainT

sn>%111b

.o>ember 0003

0ongratulations, you >ust booted open solaris) !og in using user >ac-, password >ac-#

Bpen+olaris broadcasts *or a =C0P address which isn6t wor-ing yet when para %irtualised# @e ha%e to gi%e it a static IP address3 rootQo9enso?aris:~# ifconfig -a ?o0: f?ags=000100034/S6PI)OOPB(,7IR6..!.#I56)T!,(+TI!P>4IL!RT6()T mt8 30<0 inde@ 1 inet 10D101011 netmask ff000000 @nf0: f?ags=100434<S6PIBRO(",(+TIR6..!.#I56)T!,(+TI"-,PI!P>4T mt8 1;00 inde@ 0 inet 0101010 netmask ff000000 et:er 0:12:<e:1b:e3:13 ?o0: f?ags=000000034/S6PI)OOPB(,7IR6..!.#I56)T!,(+TI!P>2IL!RT6()T mt8 30;0 inde@ 1 inet2 ::1/103 @nf0: f?ags=0004341S6PIR6..!.#I56)T!,(+TI"-,PI!P>2T mt8 1;00 inde@ 0 inet2 fe30::012:<eff:fe1b:e313/10 et:er 0:12:<e:1b:e3:13 rootQo9enso?aris:~# ifconfig @nf0 1/011231//111 netmask 0;;10;;10;;10 rootQo9enso?aris:~# ifconfig @nf0 @nf0: f?ags=100034<S6PIBRO(",(+TIR6..!.#I56)T!,(+TI!P>4T mt8 1;00 inde@ 0 inet 1/011231//111 netmask ffffff00 broadcast 1/011231//10;; et:er 0:12:<e:1b:e3:13 +tart a %ncser%er as root in order to -ic- o** the installation# rootQo9enso?aris:~# >ncser>er *o8 wi?? reA8ire a 9assword to access yo8r deskto9s1 Password: Lerify: @a8t:: creating new a8t:ority fi?e /root/1=a8t:ority .ew o9enso?aris:1 BC deskto9 is o9enso?aris:1

,reating defa8?t start89 scri9t /root/1>nc/@start89 +tarting a99?ications s9ecified in /root/1>nc/@start89 )og fi?e is /root/1>nc/o9enso?aris:11?og Bn your dom0, start a %nc session and connect to 112#1(2#11#1131 5note the D31E )7 root# /8sr/bin/g8i-insta?? E $he installer is %ery user *riendly so I won6t go into detail# =on6t reboot at the end 9 change your dom con*iguration *ile# In the past 5prior to "en F#:#"7 you had to play around with the <pool and e"traG line in the con*iguration *ile which could be a real pain and I wasted quite a bit o* time *inding out what arguments to put into the line# !uc-ily we6re on "en F#:#1 which has <*s support in pygrub# +o the comple" loo-ing con*iguration *iles can be reduced to3 name = Goso?G ma@mem = 1;<2 memory = 1004 >c98s = 0

on%9oweroff = GdestroyG on%reboot = GdestroyG on%cras: = GdestroyG disk = H Gfi?e:/m/@en/oso?/systemI@>daIwGI J >if = H Gmac=00:12:<e:1b:e3:13Ibridge=br1Iscri9t=>if-bridgeG J boot?oader = /8sr/bin/9ygr8b and it boots straight into the installed os3

?ou can then restart the dom

dom0:/etc/@en/>m # @m create -c oso? 6sing config fi?e G1/oso?G1 +tarted domain oso? Bid=04C ><1411%1/D13%04-011 c:gset 1/D13 +8nO+ Re?ease ;111 Lersion sn>%111b 24-bit ,o9yrig:t 1/3<-000/ +8n 5icrosystemsI !nc1 (?? rig:ts reser>ed1 6se is s8bMect to ?icense terms1 -ostname: o9enso?aris ,onfig8ring de>ices1 )oading smfB;C ser>ice descri9tions: 10D/1;0 &eb 4 1D:10:0< s>c1startdHDJ: )ost re9ository e>ent d8e to disconnection1 1;0/1;0 s>ccfg im9ort warnings1 +ee />ar/s>c/?og/system-manifestim9ort:defa8?t1?og 1 Reading P&+ config: done1 5o8nting P&+ fi?esystems: B2/2C ,reating new rsa 98b?ic/9ri>ate :ost key 9air ,reating new dsa 98b?ic/9ri>ate :ost key 9air o9enso?aris conso?e ?ogin: 'emember that you ha%e to use the username and password you de*ined during the installationH>ac- won6t do it anymore# Reference :tt9://bderF:a>ets1b?ogs9ot1com/000//02/set89-o9enso?aris-000/1:tm?

You might also like