
Friday, February 19, 2010
Tuesday, November 24, 2009
Conky 1.7.2 on OpenSolaris
Tuesday, November 10, 2009
Installing OpenSolaris on a Sparc using LiveCD
I've written a sample installation script for Sparc snv125 LiveCD. Taking as basis my "zfsinstall" script for MilaX Sparc LiveCD and improving some hacks for BE, I've now a working OpenSolaris system on my old Ultra 60, with possibility for next upgrading.
Required steps:
1. Boot from LiveCD. (After booting I disabled some services like AI,LDOM which are not necessary on my Ultra).
2. Configure network (plumb interface and enable ssh).
3. Download and run zfsinstall_sparc script (i.e. ./zfsinstall_sparc c4t1d0s0)
4. Reboot.
Sample output:
P.S. Now I've already updated the system to snv126.
Required steps:
1. Boot from LiveCD. (After booting I disabled some services like AI,LDOM which are not necessary on my Ultra).
2. Configure network (plumb interface and enable ssh).
3. Download and run zfsinstall_sparc script (i.e. ./zfsinstall_sparc c4t1d0s0)
4. Reboot.
Sample output:
root@opensolaris:/jack# ./zfsinstall c4t1d0s0
Test TI started in real mode...
Target type specified: BE
BE target prepared successfully
BE target created successfully
Starting to copy data from UFS root to /zfsroot - this may take some time.
Updating vfstab
Updating boot-archive
updating /zfsroot//platform/sun4u/boot_archive
Installing zfs bootblk on /dev/rdsk/c4t1d0s0
###################################################
OpenSolaris now installed.
root@opensolaris:/jack# beadm umount opensolaris
root@opensolaris:/jack# reboot -- disk1
...
Sun Ultra 60 UPA/PCI (UltraSPARC-II 360MHz), Keyboard Present
OpenBoot 3.17, 512 MB memory installed, Serial #
Ethernet address 8:0:20:b8:a3:b9, Host ID: 80b8a3b9
Rebooting with command: boot disk1
Boot device: /pci@1f,4000/scsi@3/disk@1,0 File and args:
SunOS Release 5.11 Version snv_125 64-bit
Copyright 1983-2009 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
WARNING: consconfig: cannot find driver for screen device /SUNW,ffb@1e,0
Can't find driver for console framebuffer
Hostname: opensolaris
Configuring devices.
Loading smf(5) service descriptions: 137/137
Reading ZFS config: done.
Mounting ZFS filesystems: (6/6)
opensolaris console login:
...
# beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ------- ------ -------
opensolaris NR / 580.69M static 2009-11-10 01:45
#
P.S. Now I've already updated the system to snv126.
Thursday, November 5, 2009
OpenSolaris Sparc snv125 LiveCD
Following numerous requests from users I've prepared Sparc LiveCD based on osol-1002-125-ai-sparc.iso (see my previous post). Please remember that this iso is UNOFFICIAL version, I've created it only for my tests. With this iso you can test OpenSolaris on your hardware, AI tools or you can install system from this LiveCD manually, using steps from my old posts (i.e. you need to create zpool, copy all LiveCD contents to rootfs, disable live-media services, change vfstab and etc).
Temporarily iso is here.
Temporarily iso is here.
Wednesday, September 16, 2009
How to make a sparc Live CD from AI
That's what I did to get the LiveCD from last AI iso.
On sparc machine:
I copied all iso's content to s0 and then I've unpacked /opt/livecd/s0/boot/boot_archive with root_archive to /opt/livecd/tmp.
Next:
I've also removed last block about keyboard configuration and gdm in /lib/svc/method/live-fs-root.
Next I've created lofi directory in /opt/livecd/tmp/dev and symlink in this directory to ../../devices/pseudo/lofi@0:1 (this is required for mounting solaris.zlib).
I took hsfs.bootblock from SXCE DVD and put it in boot directory.
Script root_archive required small hack for boot-archive size - I've added line "size=130000" before "/usr/sbin/mkfile ${size}k "$TMR".
Next I've created symlinks for boot_archive in /opt/livecd/s0/platform/sun4v and /opt/livecd/s0/platform/sun4u
Now iso:
Live CD boots on my old Ultra 60 (you can see some warnings and services errors but that's another story):
On sparc machine:
# mkdir -p /opt/livecd/s0.
# mount -F hsfs `lofiadm -a osol-1002-122-ai-sparc.iso` /mnt
I copied all iso's content to s0 and then I've unpacked /opt/livecd/s0/boot/boot_archive with root_archive to /opt/livecd/tmp.
Next:
# cd /opt/livecd/tmp
# echo snv122 > .volumeid
# mv .autoinstall .livecd
I've also removed last block about keyboard configuration and gdm in /lib/svc/method/live-fs-root.
Next I've created lofi directory in /opt/livecd/tmp/dev and symlink in this directory to ../../devices/pseudo/lofi@0:1 (this is required for mounting solaris.zlib).
I took hsfs.bootblock from SXCE DVD and put it in boot directory.
# cd /opt/livecd/s0/boot/
# root_archive pack boot_archive /opt/livecd/tmp
Script root_archive required small hack for boot-archive size - I've added line "size=130000" before "/usr/sbin/mkfile ${size}k "$TMR".
Next I've created symlinks for boot_archive in /opt/livecd/s0/platform/sun4v and /opt/livecd/s0/platform/sun4u
Now iso:
# cd /opt/livecd/
# mkisofs -G s0/boot/hsfs.bootblock -B ... -l -ldots -R -N -D -V snv122 -o /opt/sparc_snv122.iso s0/
Live CD boots on my old Ultra 60 (you can see some warnings and services errors but that's another story):

Tuesday, July 14, 2009
Minimal OpenSolaris SPARC install
Using previous instructions I've successfully installed opensolaris 2009.06 on my TestFarm (thanks, Jim) T2000 from existing Nevada b98.
Steps are identical: my machine have 4 disks, so I've prepared third disk (c0t2d0) for installation (I take 4gb):
Next steps (it's fast):
Here's minimal list of packages for my T2000 (sun4v):
I already have pkg built and installed from sources on my Nevada. Now network installation:
Booting:
This install take only 630 mb. Now I can adjust my network settings and install additional packages.
Steps are identical: my machine have 4 disks, so I've prepared third disk (c0t2d0) for installation (I take 4gb):
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 824 4.00GB (825/0/0) 8395200
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 14086 68.35GB (14087/0/0) 143349312
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
Next steps (it's fast):
zpool create opensolaris c0t2d0s0
zfs create opensolaris/rootfs
zfs set compression=on opensolaris/rootfs
zfs set mountpoint=legacy opensolaris/rootfs
mkdir /zfsroot
mount -f zfs opensolaris/rootfs /zfsroot
Here's minimal list of packages for my T2000 (sun4v):
SUNWcsd
SUNWcs
SUNWcsl
SUNWcakr
SUNWcar
SUNWcfcl
SUNWckr
SUNWcnetr
SUNWcurl
SUNWefc
SUNWerid
SUNWesu
SUNWfctl
SUNWpd
SUNWfchba
SUNWfruid
SUNWgnu-idn
SUNWgss
SUNWgssc
SUNWinstall-libs
SUNWipf
SUNWipkg
SUNWkey
SUNWkvm
SUNWldom
SUNWlexpt
SUNWlibC
SUNWlibms
SUNWlibsasl
SUNWloc
SUNWlxml
SUNWmd
SUNWnfsc
SUNWnfsckr
SUNWopenssl
SUNWperl584core
SUNWpicl
SUNWpool
SUNWpr
SUNWsmapi
SUNWrmodu
SUNWssh
SUNWsshcu
SUNWsshd
SUNWPython
SUNWpython-pyopenssl
SUNWTcl
SUNWTk
SUNWadmap
SUNWadmlib-sysid
SUNWadmr
SUNWbash
SUNWbip
SUNWbzip
SUNWtecla
SUNWtls
SUNWtoo
SUNWwbsup
SUNWxwrtl
SUNWzfs
SUNWzfskr
SUNWzlib
SUNWzone
SUNWintgige
entire
I already have pkg built and installed from sources on my Nevada. Now network installation:
pkg image-create -F -f -a opensolaris.org=http://pkg.opensolaris.org /zfsroot
cd /zfsroot
for pkg in `cat pkg.lst`; do pkg install --no-refresh --no-index $pkg; done
echo "etc/zfs/zpool.cache" >> /zfsroot/boot/solaris/filelist.ramdisk
zpool set bootfs=opensolaris/rootfs opensolaris
echo "opensolaris/rootfs - / zfs - no -" >> /zfsroot/etc/vfstab
mkdir -p /opensolaris/platform/sun4v
cp /zfsroot/platform/sun4v/bootlst /opensolaris/platform/sun4v/
cp /zfsroot/lib/svc/seed/global.db /zfsroot/etc/svc/repository.db
devfsadm -R /zfsroot
bootadm update-archive -R /zfsroot
installboot -F zfs /platform/sun4v/lib/fs/zfs/bootblk /dev/rdsk/c0t2d0s0
Booting:
ok boot disk2
...
Sun Fire T200, No Keyboard
Copyright 2008 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.28.9, 16256 MB memory available
...
Boot device: /pci@780/pci@0/pci@9/scsi@0/disk@2 File and args:
SunOS Release 5.11 Version snv_111b 64-bit
Copyright 1983-2009 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: unknown
Configuring devices.
Loading smf(5) service descriptions: 84/84
Reading ZFS config: done.
Mounting ZFS filesystems: (2/2)
unknown console login: root
Password:
Sun Microsystems Inc. SunOS 5.11 snv_111b November 2008
root@unknown:~# df -h
Filesystem size used avail capacity Mounted on
opensolaris/rootfs 3.9G 630M 3.3G 16% /
/devices 0K 0K 0K 0% /devices
/dev 0K 0K 0K 0% /dev
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 12G 176K 12G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
fd 0K 0K 0K 0% /dev/fd
swap 12G 0K 12G 0% /tmp
swap 12G 16K 12G 1% /var/run
opensolaris 3.9G 60K 3.3G 1% /opensolaris
This install take only 630 mb. Now I can adjust my network settings and install additional packages.
Thursday, July 9, 2009
Get detailed disk info with Caiman libraries
Using Caiman libraries you can write small programs which can be very useful in sysadmin's daily work or can help making your own installer. For example, using libtd (Target Discovery) library you can get info about system disks and partitions very fast. Here's an example of using libtd test program (test_td):
Now verbose output:
# ./test_td -d
Disk discovery
Total number of disks: 3
---------------------------------
num | name| ctype|size [MB]|
---------------------------------
1 | c2t0d0| usb| 976|
2 | c0d0| ata| 76350|
3 | c1d0| ata| 38166|
---------------------------------
# ./test_td -p all
Partition discovery for all disks
-------------------------------------
num | name| active| ID| lswp|
-------------------------------------
1 | c2t0d0p1| Yes| BF| No|
2 | c0d0p1| Yes| BF| No|
3 | c1d0p3| No| 83| No|
4 | c1d0p2| Yes| 83| No|
5 | c1d0p1| No| 82| Yes|
-------------------------------------
Now verbose output:
# ./test_td -d -v
Disk discovery
Total number of disks: 3
-------------------------------------------------------------------------------
num | name| vendor| ctype| mtype| rem| lbl| bsize|#of blocks|size [MB]|
-------------------------------------------------------------------------------
1 | c2t0d0| Multi| usb| FIXED| Yes| VF| 512| 1999872| 976|
2 | c0d0| unknown| ata| FIXED| No| VF| 512| 156364992| 76350|
3 | c1d0| unknown| ata| FIXED| No| VF| 512| 78164352| 38166|
-------------------------------------------------------------------------------
# ./test_td -p all -v
Partition discovery for all disks
---------------------------------------------------------------------
num | name| active| ID| lswp| 1st block|#of blocks|size [MB]|
---------------------------------------------------------------------
1 | c2t0d0p1| Yes| BF| No| 2048| 1996800| 975|
2 | c0d0p1| Yes| BF| No| 16065| 156344580| 76340|
3 | c1d0p3| No| 83| No| 20547135| 57609090| 28129|
4 | c1d0p2| Yes| 83| No| 1012095| 19535040| 9538|
5 | c1d0p1| No| 82| Yes| 63| 1012032| 494|
---------------------------------------------------------------------
Monday, June 22, 2009
LiveUSB for Asus Eee PC
Wednesday, June 10, 2009
Busybox on OpenSolaris ARM
Tuesday, June 9, 2009
First OpenSolaris ARM release
Great news from OpenSolaris ARM Port project: first OS release for ARM platform is now available. This release support NEC Electronics's NaviEngine 1 (NE1) and has some interesting features: genunix, unix and required device drivers are statically linked at building time as vmunix to save the startup time, zfs is modified to save the runtime memory.

So I hope that after some time we'll see OpenSolaris powered PDA.

So I hope that after some time we'll see OpenSolaris powered PDA.
Sunday, June 7, 2009
Minimizing SunStudio
SunStudio Express uses ~900 mb on my Nevada. But for building usual C app I need only small part of SS. For example I used only these files for building imlib2 (I tried various flags):
Of course you also need headers for successful compilation, but referring to cc if space is important factor for you - 19 is not 900, right?
# cd /opt/SUNWspro; find .
.
./lib
./lib/crt1x.o
./lib/crti.o
./lib/sys
./lib/sys/libyabe.so
./lib/sys/lib_I_quad.so
./lib/sys/libsunir.so
./lib/sys/liblni.so.1
./lib/libdwarf.so
./lib/crt1.o
./lib/libmopt.a
./lib/libdwarf.so.1
./lib/lib_I_dbg_gen.so.1
./lib/values-xa.o
./lib/libm.il
./lib/lib_I_dbg_gen.so
./lib/crtn.o
./bin
./bin/iropt
./bin/fbe
./bin/cc
./bin/ir2hf
./bin/ube
./bin/acomp
# du -hs
19M .
Of course you also need headers for successful compilation, but referring to cc if space is important factor for you - 19 is not 900, right?
Subscribe to:
Posts (Atom)
How to determine PXE mac address when booting illumos via PXELinux/iPXE
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...
-
This summer I decided то build something compact and modern for my two SunFire servers using IPS. Meet v9os - minimalist illumos-based ...
-
I've tried to compile the last Conky 1.7.2 version with Lua Cairo bindings on OpenSolaris and should say it impress me. It was necessary...