Jim Connors wrote:
> Just starting to play around with IPS to create minimal OpenSolaris 
> configs, been seeing messages (below) when attempting to install the 
> SUNWcakr package.  The messages appear to be of two varieties:
> 
> (1) Failed to create lock file (<filename>): No such file or directory
> (2) driver (<driver name>) install failed with return code 1
> 
> Yet, I think, the package is installed.
> 
> -bash-3.2# uname -a
> SunOS jalopy 5.11 snv_77 i86pc i386 i86pc
> 
> # pkg status SUNWcakr
> FMRI                                               STATE      UFIX
> pkg://opensolaris.org/[EMAIL PROTECTED]         installed  ----
> pkg://opensolaris.org/[EMAIL PROTECTED]         known      u---
> 
> For (1), is this a serious error?  For (2), even though there's an 
> install failed message, the drivers in question look like they were 
> installed just fine.  Is this OK?  Searching the pkg-discuss text 
> archives didn't reveal much.
> 
> Thanks,
> -- Jim C

You can do something similar to what I do to
setup a "minimal" xVM domU using pkg.. I setup a
disk image, newfs it, and mount it. Then run the
script which follows to "install" the domU.

The package dependencies aren't quite right in
the database, so order is important..


e.g.

# zfs create -V 8g tank/guests/pkg
# newfs /dev/zvol/rdsk/tank/guests/pkg
# mount -F ufs /dev/zvol/dsk/tank/guests/pkg /mnt



Here's the py file I use to boot the domU..
--

name = "pkg"
vcpus = 1
memory = "1024"

extra = "-k"

root = "/dev/dsk/c0d0s0"
disk = ['phy:/dev/zvol/dsk/tank/guests/pkg,0,w']
vif = ['']

on_shutdown = "destroy"
on_reboot = "restart"


Here's the script which creates the domU.
--

#!/bin/ksh

ROOTDIR=/mnt

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
#/usr/bin/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


_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to