And one last dump of information.. You can also use
a slight variation of the previous script to build a
domU from the new packaging system too. This will
be pretty cool in the future..
MRJ
: alpha[1]#; cat pkg.sh
#!/bin/ksh
ROOTDIR=/export/pkg-test
BASE="
SUNWcs
SUNWcsd
SUNWckr
SUNWcar
SUNWcarx
SUNWcakr
SUNWcakrx
SUNWos86r
SUNWkvm
SUNWrmodr
SUNWpsdcr
SUNWpsdir
SUNWckr
SUNWcnetr
SUNWcsl
SUNWesu
SUNWkey
SUNWlibms
SUNWusb
SUNWpr
SUNWtls
SUNWlibsasl
SUNWlxml
SUNWopenssl
SUNWusbs
SUNWmd
SUNWtecla
SUNWzlib
SUNWuprl
SUNWsmapi
SUNWkrb
SUNWgss
SUNWbip
SUNWzfskr
SUNWzfs
SUNWbash
SUNWipf
SUNWbash
SUNWfmd
SUNWgrub
SUNWperl584core
SUNWtoo
SUNWbind
SUNWrcmdc
"
# NOTES:
# perl needed for intrd
# packaging system
PKG="
SUNWPython
SUNWPython-extra
SUNWipkg
"
# needed for sys-unconfig, etc.
SYSID="
SUNWadmap
SUNWadmlib-sysid
SUNWadmr
"
SSH="
SUNWsshcu
SUNWsshd
SUNWssh
"
NFSCLIENT="
SUNWnfsckr
SUNWnfsc
"
NFSSERVER="
SUNWnfsskr
SUNWnfss
"
NIS="
SUNWnis
"
AUTOFS="
SUNWatfs
"
MDB="
SUNWmdb
"
DOM0="
SUNWvirtinst
SUNWurlgrabber
SUNWlibvirt
SUNWxvmhvm
SUNWxvmdom
SUNWxvm
SUNWgccruntime
SUNWgnutls
SUNWlibsdl
FSWxwpft
FSWxwrtl
"
# dom0 devices
DEVS="
SUNWbge
SUNWnge
SUNWrge
SUNWxge
SUNWintgige
SUNWahci
SUNWmv88sx
SUNWnvsata
SUNWsi3124
"
# create the packaging db
/usr/bin/pkg image-create -F -a opensolaris.org=http://pkg.opensolaris.org
$ROOTDIR
#pkg image-create -F -a mrj=http://localhost:10000 $ROOTDIR
cd $ROOTDIR
echo "adding packages to `pwd`"
for pkg in $BASE $PKG $SYSID $SSH $MDB $NFSCLIENT $AUTOFS $NIS; do
/usr/bin/pkg install $pkg
done
# dom0 support
#for pkg in $DOM0 $DEVS; do
# /usr/bin/pkg install $pkg
#done
# seed the SMF repository
/usr/bin/cp $ROOTDIR/lib/svc/seed/global.db $ROOTDIR/etc/svc/repository.db
chmod 600 $ROOTDIR/etc/svc/repository.db
cd $ROOTDIR/var/svc/profile/
ln -s generic_limited_net.xml generic.xml
ln -s ns_files.xml name_service.xml
# save away vfstab for domU and ramdisk
/usr/bin/cp $ROOTDIR/etc/vfstab $ROOTDIR/etc/vfstab.disk
/usr/bin/cp $ROOTDIR/etc/vfstab $ROOTDIR/etc/vfstab.ramdisk
echo "/devices/ramdisk:a - / ufs - no nologging" >> $ROOTDIR/etc/vfstab.ramdisk
echo "/dev/dsk/c0d0s0 /dev/rdsk/c0d0s0 / ufs 1 no -" >> $ROOTDIR/etc/vfstab.disk
# build up /dev. This causes some minor problems but will self correct.
# XXX - This would be better if we had a seed tarball.
/usr/sbin/devfsadm -R $ROOTDIR
# make the disk links for domU
cd $ROOTDIR/dev/dsk
rm -f c0d0s0
/usr/bin/ln -s ../../devices/xpvd/[EMAIL PROTECTED]:a c0d0s0
cd $ROOTDIR/dev/rdsk
rm -f c0d0s0
/usr/bin/ln -s ../../devices/xpvd/[EMAIL PROTECTED]:a,raw c0d0s0
/usr/bin/cp $ROOTDIR/etc/vfstab.disk $ROOTDIR/etc/vfstab
# spinkle a little magic sysconfig fairy dust
echo "/lib/svc/method/sshd\n\
/usr/sbin/sysidkbd\n\
/usr/sbin/sysidpm\n\
/lib/svc/method/net-nwam\n\
/usr/lib/cc-ccr/bin/eraseCCRRepository" > $ROOTDIR/etc/.sysidconfig.apps
# setup the image so we need to configure it on first boot
# XXX: if we setup timezone, could we save the reboot??
/usr/sbin/sys-unconfig -R $ROOTDIR
# remove some Indiana iso specific stuff
cat $ROOTDIR/etc/passwd | sed '/^jack/d' > $ROOTDIR/etc/passwd.new;mv -f
$ROOTDIR/etc/passwd.new $ROOTDIR/etc/passwd
cat $ROOTDIR/etc/shadow | sed '/^jack/d' > $ROOTDIR/etc/shadow.new;mv -f
$ROOTDIR/etc/shadow.new $ROOTDIR/etc/shadow
cat $ROOTDIR/etc/user_attr | sed 's/^root::::type=role;/root::::/g' >
$ROOTDIR/etc/user_attr.new;mv -f $ROOTDIR/etc/user_attr.new
$ROOTDIR/etc/user_attr
echo "build boot_archive"
/usr/sbin/bootadm update-archive -R $ROOTDIR
: alpha[1]#;
_______________________________________________
xen-discuss mailing list
[email protected]