entire
SUNWcsd
SUNWcs
Try it if you've problems with graphics on old laptops and you can't run GUI installer.
You can find osinstaller script in MilaX mercurial repository on OpenSolaris.org.
entire
SUNWcsd
SUNWcs
~$ uname -a
SunOS sysadm 5.11 snv_110 i86pc i386 i86pc
~$ ./busybox
BusyBox v1.2.0 (2009.04.20-10:06+0000) multi-call binary
Usage: busybox [function] [arguments]...
or: [function] [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as!
Currently defined functions:
[, [[, awk, bunzip2, busybox, bzcat, cat, chgrp, chmod, chown, chroot, clear, cp, cpio, cut, date, dd, df, du, echo, ed, egrep, env, false,
fgrep, find, grep, gunzip, gzip, halt, head, hostid, hostname, hush, id, init, kill, less, ls, md5sum, mkdir, mknod, mount, mv, nc, nslookup,
poweroff, printf, ps, pwd, reboot, rm, sed, sh, sleep, sort, tar, tee, telnet, test, touch, tr, true, tty, umount, uname, unzip, vi, wc, whoami,
xargs, yes, zcat
cpu 8 0 141 313 230 0 0
#include <kstat.h>
#include <sys/sysinfo.h>
#include <stdio.h>
#include <string.h>
static kstat_ctl_t *kc;
static kstat_t *ksp;
static unsigned int cpu_user, cpu_system, cpu_nice, cpu_idle, cpu_iowait;
int main(int argc, char **argv) {
cpu_stat_t *cpu_stat;
kc = kstat_open();
if (kc != NULL) {
ksp = kstat_lookup(kc, "cpu_stat", 0, "cpu_stat0");
if (ksp != NULL && ksp->ks_type == KSTAT_TYPE_RAW)
{
if (kstat_read(kc, ksp, NULL) != -1 &&
ksp->ks_data_size == sizeof(cpu_stat_t))
{
cpu_stat = (cpu_stat_t *)ksp->ks_data;
cpu_user=cpu_stat->cpu_sysinfo.cpu[CPU_USER];
cpu_nice=cpu_stat->cpu_sysinfo.cpu[CPU_WAIT];
cpu_system = cpu_stat->cpu_sysinfo.cpu[CPU_KERNEL] ;
cpu_iowait=cpu_stat->cpu_syswait.iowait;
cpu_idle=cpu_stat->cpu_sysinfo.cpu[CPU_IDLE];
printf("cpu %d %d %d %d %d 0 0\n",
cpu_user,cpu_nice,cpu_system,cpu_idle,cpu_iowait);
}
}
}
}
STATE STIME FMRI online 19:49:10 svc:/system/svc/restarter:default online 19:49:13 svc:/network/datalink-management:default online 19:49:14 svc:/system/filesystem/usr:default online 19:49:14 svc:/system/filesystem/root:default online 19:49:14 svc:/system/utmp:default online 19:49:21 svc:/system/device/local:default online 19:49:21 svc:/milestone/devices:default online 19:49:22 svc:/system/filesystem/minimal:default online 19:49:22 svc:/system/manifest-import:default online 19:49:23 svc:/system/rmtmpfiles:default online 19:49:23 svc:/system/filesystem/local:default online 19:49:23 svc:/application/xserver:default online 19:49:24 svc:/system/console-login:default online 19:49:49 svc:/network/initial:default online 19:49:57 svc:/network/loopback:default online 19:49:58 svc:/system/system-log:default online 19:50:01 svc:/system/cryptosvc:default online 19:50:04 svc:/system/dbus:default online 19:50:04 svc:/network/physical:default online 19:50:06 svc:/system/identity:node online 19:50:14 svc:/network/rpc/bind:default online 19:50:18 svc:/system/hal:default online 19:50:20 svc:/network/inetd:default online 19:50:25 svc:/network/rpc/gss:default
...
# Turn on I/O tracing if requested and possible
trace=`prtconf -v /devices|sed -n '/trace/{;n;p;}'|cut -f 2 -d\'`
if [ "$trace" = "on" ]; then
if [ -n "$mntpt" ]; then
outputfile="${mntpt}/traceout"
echo "Enabling I/O Tracing ..." > /dev/console
/opt/DTT/Bin/iosnoop -Deg > "$outputfile" 2> /dev/console &
# Wait for iosnoop to actually initialize
sleep 10
else
echo "Unable to enable I/O Tracing" > /dev/console
echo "Must have a mountable Solaris root slice on harddisk" > /dev/console
echo "to hold trace output" > /dev/console
fi
fi
...
mount -F tmpfs -o size=32m swap /var/log
/opt/DTT/Bin/opensnoop -eg > /var/log/opensnoop.log &
svcadm milestone all
#!/usr/sbin/dtrace -Cs
#pragma D option quiet
/* I need process pid, his forks and life time */
proc:::create
{
printf("<fork ppid=%d cpid=%d execname=%s time=%d />\n",
pid,args[0]->pr_pid,execname,`lbolt*10/ `hz);
}
proc:::exec-success
{
printf("<process pid=%d execname=%s time=%d />\n",
pid,execname,`lbolt*10/ `hz);
}
proc:::exit
{
printf("<end pid=%d execname=%s time=%d />\n",
pid, execname,`lbolt*10/ `hz);
}
dtrace -AFs /boot/boot.d
reboot
dtrace -ae -o bootlog
dtrace -A
CPU FUNCTION
0 | exec_common:exec-success <process pid=1 execname=init time=63 />
0 | cfork:create <fork ppid=1 cpid=4 execname=init time=66 />
0 | exec_common:exec-success <process pid=4 execname=ksh93 time=67 />
0 | exec_common:exec-success <process pid=4 execname=autopush time=87 />
0 | proc_exit:exit <end pid=4 execname=autopush time=92 />
0 | cfork:create <fork ppid=1 cpid=5 execname=init time=92 />
0 | exec_common:exec-success <process pid=5 execname=ksh93 time=92 />
0 | exec_common:exec-success <process pid=5 execname=soconfig time=94 />
...
bootchart.py bootlog
#include <sys/times.h>
#include <limits.h>
#include <dat/dat_platform_specific.h>
main {
struct tms ts;
clock_t t = times(&ts);
//we need jiffies from uptime value for bootchart
printf("%u\n",(unsigned long) ((DAT_UINT64) t*100 /CLK_TCK));
}
#!/usr/bin/bash
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/gnu/bin:$PATH"
# mounting dir for logging
mount -F tmpfs -o size=32m swap /var/log/bootchart
# start time hack for java parser
echo "001" > /var/log/bootchart/ps.log
echo " PID PPID S %CPU COMMAND" >> /var/log/bootchart/ps.log
echo " 1 0 S 0.0 kernel" >> /var/log/bootchart/ps.log
echo >> /var/log/bootchart/ps.log
while true; do
# uptime jiffies
uptime=`/sbin/upt`
echo $uptime
# Log the command output and removing pid 0 for preventing "No processes found" error
eval "ps -e -o pid,ppid,s,pcpu,comm"|grep -v sched
echo
/usr/gnu/bin/sleep 0.2
done >> /var/log/bootchart/ps.log
mkdir /var/log/bootchart
mv /sbin/init /bin
cat /sbin/init
#!/bin/sh
/boot/bootchartd &
exec /bin/init
echo "title = Boot chart for $( hostname | sed q ) ($( date ))" > /var/log/bootchart/header
echo "system.uname = $( uname -srvm | sed q )" >> /var/log/bootchart/header
if [ -f /etc/release ]; then
echo "system.release = $( sed q /etc/release )" >> /var/log/bootchart/header
else
echo "system.release = $( sed 's/\\.//g;q' /etc/issue )" >> /var/log/bootchart/header
fi
java -jar bootchart.jar
Parsing /var/log/bootchart
Wrote image: ./bootchart.png

# getpkg inst_dir manifest_url getpkg.rb /opt/ipkg http://pkg.opensolaris.org/release/manifest/0/SUNWipkg%400.5.11%2C5.11-0.101%3A20081104T032047Z
SUNWcsd SUNWcs SUNWcakr SUNWcar SUNWckr SUNWcnetr SUNWcsl SUNWesu SUNWgss SUNWgssc SUNWkey SUNWkvm SUNWlibms SUNWlibsasl SUNWloc SUNWlxml SUNWnfsc SUNWnfsckr SUNWopenssl SUNWos86r SUNWpr SUNWpsdcr SUNWpsdir SUNWrmodr SUNWbip SUNWsmapi SUNWssh SUNWsshcu SUNWsshd SUNWtecla SUNWtls SUNWtoo SUNWusb SUNWusbs SUNWzfs SUNWzfskr SUNWzlib SUNWzone SUNWbash SUNWrtls
# working dir
export ROOTDIR=/opt/test
# create the packaging db (pkg already installed on Nevada)
/usr/bin/pkg image-create -F -a opensolaris.org=http://pkg.opensolaris.org ${ROOTDIR}
cd ${ROOTDIR}
for pkg in `cat ../pkg.list`; do
/usr/bin/pkg install ${pkg}
done
SUNWaudd SUNWgccruntime SUNWinstall-libs SUNWmd SUNWpicl SUNWpool SUNWwbsup
for pkg in `cat ../rm.txt`; do
pkg contents -m $pkg|grep file|sed -e 's/.*path=//; s/pkg.csize.*//'|\
awk '{print "./"$1}';
pkg contents -m $pkg|grep link|sed -e 's/.*path=//; s/target.*//'|\
awk '{print "./"$1}';
done > files.tmp
cat files.tmp|sed 's/.*libmeta.*//g' > files.list
for file in `cat ../files.list `; do rm -rf $file; done
cd ${ROOTDIR}
# Copy usr/sfw/lib/libwrap.so.1 to usr/lib
cp ${ROOTDIR}/lib/svc/seed/global.db ${ROOTDIR}/etc/svc/repository.db
rm ${ROOTDIR}/usr/lib/libcrypto.so*
cp ${ROOTDIR}/usr/sfw/lib/libcrypto.so.0.9.8 ${ROOTDIR}/usr/lib
# Fix etc/vfstab
echo "/devices/ramdisk:a - / ufs - no nologging" >> ${ROOTDIR}/etc/vfstab
# Set the timezone
echo "TZ=US/Eastern" > ${ROOTDIR}/etc/TIMEZONE
# Set hostname
echo "small" > ${ROOTDIR}/etc/nodename
# Create /etc/inet/hosts and /etc/inet/ipnodes file
echo "127.0.0.1 localhost loghost" > ${ROOTDIR}/etc/inet/hosts
echo "192.168.1.1 small" >> ${ROOTDIR}/etc/inet/hosts
echo "::1 localhost loghost" > ${ROOTDIR}/etc/inet/ipnodes
echo "127.0.0.1 localhost loghost" >> ${ROOTDIR}/etc/inet/ipnodes
echo "192.168.1.1 small" >> ${ROOTDIR}/etc/inet/ipnodes
# Set nsswitch.conf
cp ${ROOTDIR}/etc/nsswitch.files ${ROOTDIR}/etc/nsswitch.conf
# Set IP Address
echo "small" > ${ROOTDIR}/etc/hostname.rtls0
# Set up default route
echo "192.168.1.200" > ${ROOTDIR}/etc/defaultrouter
# Set the environment variables for svccfg.
SVCCFG_DTD=${ROOTDIR}/usr/share/lib/xml/dtd/service_bundle.dtd.1
SVCCFG_REPOSITORY=${ROOTDIR}/etc/svc/repository.db
SVCCFG=/usr/sbin/svccfg
export SVCCFG_DTD SVCCFG_REPOSITORY SVCCFG
${SVCCFG} import ${ROOTDIR}/var/svc/manifest/milestone/sysconfig.xml
# turnoff boot-archive, manifest-import
${SVCCFG} -s system/boot-archive setprop start/exec=:true
${SVCCFG} -s system/manifest-import setprop start/exec=:true
${SVCCFG} -s network/rpc/bind delpg sysidtool
${SVCCFG} -s system/metainit:default setprop general/enabled=false
# Here's what needed to add ssh
${SVCCFG} import ${ROOTDIR}/var/svc/manifest/system/cryptosvc.xml
${SVCCFG} -s system/cryptosvc:default setprop general/enabled=true
${SVCCFG} import ${ROOTDIR}/var/svc/manifest/network/inetd.xml
${SVCCFG} -s network/inetd:default setprop general/enabled=true
${SVCCFG} import ${ROOTDIR}/var/svc/manifest/network/rpc/gss.xml
${SVCCFG} -s network/rpc/gss:default setprop general/enabled=true
${SVCCFG} import ${ROOTDIR}/var/svc/manifest/network/ssh.xml
${SVCCFG} -s network/ssh:default setprop general/enabled=true
# Creating RSA/DSA keys for ssh
/usr/bin/ssh-keygen -q -f ${ROOTDIR}/etc/ssh/ssh_host_rsa_key -t rsa -N ''
/usr/bin/ssh-keygen -q -f ${ROOTDIR}/etc/ssh/ssh_host_dsa_key -t dsa -N ''
# Edit etc/ssh/sshd_config to allow ssh to root account
ex -s ${ROOTDIR}/etc/ssh/sshd_config > /dev/null <<> /dev/null
# Remove packaging, xpg4, sfw - you can remove more but be carefully
rm -rf var/sadm/* var/pkg/*
rm -rf usr/xpg4 usr/sfw
# we need freespace ~10mb
size=`/usr/bin/du -ks ${ROOTDIR}|/usr/bin/nawk '{print $1+10240}'`
/usr/sbin/mkfile ${size}k /opt/miniroot
lofidev=`/usr/sbin/lofiadm -a /opt/miniroot`
# get the miniroot raw device and create a filesystem on it
rlofidev=`echo $lofidev |sed s/lofi/rlofi/`
/usr/sbin/newfs -m 0 $rlofidev
# mount ufs filesystem
/usr/sbin/mount -o nologging $lofidev /mnt
/usr/bin/find . /usr/bin/cpio -pdum /mnt
/usr/sbin/umount /mnt
/usr/sbin/lofiadm -d /opt/miniroot
/usr/bin/7za a -tgzip -mx=9 /opt/miniroot.gz /opt/miniroot
# hg clone ssh://anon@hg.opensolaris.org/hg/caiman/distro_constructor
# ./build_dist.bash small.conf
pkg install SUNWzfs-auto-snapshot
pkg install SUNWxorg-server pkg install SUNWxorg-xsvc pkg install SUNWxorg-agp pkg install SUNWxorg-graphics-ddx pkg install SUNWxorg-client-programs pkg install SUNWxwfsw pkg install SUNWxwopt pkg install FSWxorg-fonts
pkg install SUNWwget wget http://code.suckless.org/dl/dwm/dwm-5.3.1.tar.gz
pkg install SUNWxorg-headers pkg install SUNWgmake pkg install SUNWbinutils pkg install SUNWgcc
pkg install SUNWvim pkg install SUNWgzip
pkg install sunstudioexpress

mkdir /home useradd -d /home/me -m -s /bin/ksh -c "System Developer" me passwd me
In illumos, if you need to determine the interface which was used for booting via PXE then it's possible to use "boot-mac" pro...