Solaris Express on a laptop

Posted by Dick on August 06, 2007

The latest Ubuntu was a bit of a disappointment if I’m honest.

Luckily, the hard disk died horribly last month, so I took the hint and installed
Solaris Express on the replacement.

software

If you want a supported OS, look at Solaris ExpressDeveloper Edition (SXDE)
free download or order a DVD .

I just want shiny toys, so I’m happy with the Community Edition
(SXCE) – b68 was the latest build, so I took that (SXDE is really just SXCE b64a neatly packaged anyway).

hardware

It’s not much to look at, but it’ll do.

  • Bog standard ASUS Centrino laptop
  • 512Mb of RAM
  • 1.4Ghz Speedstep CPU
  • 40 Gb IDE disk

I use it because a) it’s nice and lightweight and b) it’s a work laptop, so it was free.

potential problems

First: that’s not a lot of RAM. The SXDE GUI install needs 768Mb to run.
That’s fine with me, I like text installs.
Post-install, I’ll avoid the JDS (GNOME) desktop in favour of CDE (until I can persuade wmii to build). Turning off unwanted services etc should
give me plenty of room.

Second: I’ve got a WPA WLAN.
At the time of writing, SXCE only does WPA on Atheros chipsets. I picked up a Netgear on ebay for a tenner.

Third: I’ll be dual-booting with Ubuntu (in case SXCE lacks something I can’t live without).

Ubuntu’s GRUB can chainload the Solaris loader, so that’s no problem. You just need an entry like:

title Solaris Express
root (hd0,1)
chainloader +1
makeactive
boot

Lastly: linux swap partitions have the same partition id as solaris partitions. To avoid confusing the installer, I’ve put the Solaris fdisk partition before your linux swap slice.

disk layout

My 4 fdisk partitions are:

  1. a 250Mb ext3 partition (/boot in Ubuntu, with a GRUB menu entry for Solaris)
  2. a 12Gb Solaris partition
  3. a 20Gb ZFS zpool
  4. an 8Gb extended partition for Ubuntu various filesystems

The zpool has its own fdisk partition (rather than living inside the Solaris partition).
I’ll be replacing Ubuntu with FreeBSD 7 (with ZFS support ) shortly, and this’ll make it a little easier to see the zpool.
For now, it’ll hold things like /export/home and other ‘user data’.

run the install

As I said, I don’t have enough RAM to choose the ‘Solaris Express Developer Edition’ menu
option, so I’ll install the compilers later -
it works out pretty well, since I can install them to my zpool and keep the size of my
root fs down.

I chose ‘Networked: no’ (see later) and then the ‘Everything’ cluster.
This says it needs a 5Gb root filesystem (it only uses 3Gb to install, so I’m guessing that includes
some room for growth).

Linux partitions are essentially DOS partitions (primary or logical).
Solaris (like BSD) takes a primary partition and subdivide it into ‘slices’ ( / , /var, /usr, swap etc. )

In my case, I chopped up my 12Gb to get:

  • 600MB of swap (for crashdumps – it needs to be more than your system RAM)
  • 5 1/2 Gb for a root filesystem
  • 5 1/2 Gb for an alternate root (for Live Upgrade )

It’s a straightforward install – choose root password, timezone, etc. – mainly because I don’t have to
go through the pain of trying to customize my package list.

postinstall

There are a few things that still need doing, so after the reboot, login as root
(to CDE if you are short of RAM like me).

networkardium leviosa

I skipped the network setup because the NetWork Auto-Magic (NWAM) project handles all that.

Unfortunately, it will try to do use my internal card first, and since I don’t have a WEP
network (which is the ‘best’ ipw can do), it hangs and never gets to my (WPA-aware) Atheros card.
The simplest fix is just to pull out the driver and reboot.

  1. rem_drv ipw
  2. init 6
  3. #….after the reboot
  4. svcadm enable nwam
  5. # … tell it your passphrase

cool and the gang

Without some sort of CPU throttling, the laptop (and therefore your lap) gets too hot.
Speedstep is supported as of b70 , but as that hasn’t been released yet I installed powernow
using frkit , which seems to do the trick.

no diving, no bombing, no petting

Next, I make the ZFS zpool. Since I only have the one disk, I tell ZFS to make 2 copies of
all data by default to get at least some level of redundancy. Since this is done at the top-level
it will be ‘inherited’ by all child filesystems, so I have to remember to ‘set copies=1’ for non-essential
data or I will run out of space in short order.

zpool create tank c0d0p3
zfs set mountpoint=none tank
zfs set copies=2 tank
zfs create -o mountpoint=/export/home tank/home

the user-al suspects

I create a user account and home directory:

zfs create tank/home/dick
useradd -c 'Dick Davies' -d /export/home/dick -s /usr/bin/zsh dick
chown -R dick /export/home/dick
passwd dick

I like to make myself a project, just so it’s easy to see my own processes
with ‘prstat -J’:

projadd -c "Dicks project" user.dick

Next, I attach a rights profile to my user.

The ‘right way’ to use RBAC is to assign
a rights profile to a role and switch to that role when needed, but
since this is just a laptop, I’ll give my user the ‘all privileges’ profile directly.

The ‘users and accounts’ applet in JDS can do this, or you can just use usermod:

usermod -P 'Primary Administrator' dick

now I can run any privilege-aware commands (e.g. svcadm) with rootly powers.
For everything else, there’s ‘pfexec’ (effectively, passwordless sudo).

From now on, there’s no need to be root, so I logout and then log in as ‘dick’.

when in Rome

Last, I’ll install Suns compilers I would’ve got with the ‘Developer Edition’ menu option.
/opt itself is copied during a live upgrade – by putting them in a subdirectory, we’ll
avoid that step (I’ll upgrade the compilers myself).

for i in SUNWspro netbeans-5.5.1 SUNWappserver netbeans-5.5
do
   pfexec zfs create tank/$i
   pfexec zfs set mountpoint=/opt/$i tank/$i
   pfexec zfs set copies=1 tank/$i
   pfexec zfs set compression=on tank/$i
done
pfexec  /cdrom/sol_11_x86/DeveloperTools/install_devtools.sh

As of b68 there’s no need to add /usr/ccs/bin to your PATH. Sun wised up and put the tools where users might actually find them.

so far, so good

plus points

  1. despite a wart or two, NWAM is great; as simple as NetworkManager but as desktop-independant as a manual wpa_supplicant setup
  2. removable media Just Works much better than Linux (and again, doesn’t rely on a GUI)
  3. the bundled realplayer bits work with bbc.co.uk ‘listen again’ – that’s never happened with any other *NIX
  4. you get zfs and dtrace (which have already paid for themselves)
  5. most my software is here – gcc, svn, hg and zsh are in the base, irssi and mplayer are in blastwave .

downers

  1. dvorak support is a hack (xmodmap)
  2. lots of ZFS I/O can slow down the system a fair bit (probably because of the ‘copies=2’ thing).
  3. I haven’t got wmii to build yet (I’m making do with fluxbox, which is less RSI-friendly)

speculate wilder

Posted by Dick on October 17, 2006

Mr Schwartz has been banging on about datacenters . It usually means something is coming.

I just got wind of ’Project Blackbox’:

It’s a datacenter in a container (no, not that sort of container).
Presumably with a network port at the back, and a power connector.

It could be photoshopped, but I’ll put money on it being true.
To be honest, I’m having trouble trying to speculate some mad feature that I don’t expect to turn out to be true later today .

The Sun asylum has been taken over by some of the most brilliant lunatics I’ve ever come across.

UPDATE: I forgot to mention the hosepipe to cool it.

See what I mean?

UPDATE 2: confirmed on his blogben has some photos of the inside too.

i am kurious appl

Posted by Dick on September 13, 2006

Like me, I’m sure your dearest wish is that karaoke catalogues included everything in the ‘new wave’ shelf of Toggsys’ record shop in Haverfordwest Riverside Market.

Brothers and sisters, the Rapture is at hand.
Behold The iKaraoke!

Strips the vocals off any of your ipods music, mixes in your best rendition of ‘mr pharmacist’ and squirts it out through through your stereo.

That alone is worth selling your soul to the DRM devil, but it gets better. It’s got an integrated FM transmitter, which I expect is the usual iTrip affair.

These can be tampered with , by which I mean ‘modded to drown out all other stations within a 70 foot radius’.

I predict this years surprise Christmas #1 will be ‘hey, guy at number 35, shut that fucking dog up’ by The Stooges.

golden delicious

Posted by Dick on September 12, 2006

Apple have been busy.

Rumours of a worthy successor to the ipod mini turned out to be true(with an external finish bordering on practical).

Very, very glad I resisted the temptation to try to make a buck on the refurbed nanos that apple were pimping (although the DAB radios did very nicely, thanks for asking. If anyone needs any old 2000ADs, be sure to let me know.)

And it looks like mini/nano itx is toast , unless you have a thing for serial ports. Don’t these have VT-X extensions? If that’s true (and they don’t burn too many houses down) I’ll have to get one.

Coverflow has been assimilated (heard they were taking about going shareware on us, so that’s not a moment too soon).

They seem to have hidden the new shuffles away. Which is a good idea if you want to sell the minis nanos, probably.

Oh and the big ipods have keyboards and videos or something <shrug/>.

Good news all round. Unless you work in iPod city, naturally.

Stinkstation, more like

Posted by Dick on July 03, 2006

DISCLAIMER: As I said , I only run openlink so I can serve NFS (samba and netatalk are too slow for fullscreen video over 100Mbit). If I was running samba and/or appletalk I would probably not have had a problem.

That said: if you setup NFS on your linkstation, NEVER EVER EVER (ever) backup using the web frontend.

I’ve been backing up my other machines to the LS for a few months.
I got a fast/cheap/quiet/lovely Seagate 250Gb disk and thought I’d backup using the UI (openlink is a superset of the official firmware. I stupidly thought this would be ok.).

Plugged in the disk. It took the LS about an hour to build what looked like an ext2 filesystem on it.
I should have started running at that point.

The backup script on the LS is called do-backup.pl (I would upload a copy, but someone might stumble across it and I don’t want that on my conscience).

Whoever wrote it made the decision to allow clients read-only access to shares while they were being archived. Which would be cool, except the way they do that is essentially:

  1. chmod -R 555 $SHAREDIR
  2. cp -R $SHAREDIR /mnt/usbdisk/`date`
  3. chmod -R 777 $SHAREDIR

I’m paraphrasing. But only slightly. Key features are:

  • it makes no attempt to remember/restore the old perms. This does horrible things to an NFS share. I’m (charitably) assuming it doesn’t fuck up samba/appletalk too badly.
  • every file on the share is made executable before it even does anything (’chmod ugo-w -R …’ would have the same effect and be slightly less stupid)
  • every file in the share is world writable when it completes
  • cp??? (Google returns patches that at least use rsync)
  • this is a CGI. The only user feedback is a blinkenlight on the USB disk
    (I’m using 50Gb, it was 45 minutes in before I sshed to see what was going on)
  • Samba and Appletalk support readonly shares (NFS does too, but I forgive that as it’s not part of openlink)

This rant is mainly due to the death of the eMac the next morning1. I was left with a backup of the LS I didn’t trust and a ‘good copy’ of all our digital photos that had been tampered with. It took a lot of work I could really have done without to make sure that the permissions were sane.

What’s really to blame2 is shitty filesystems that force developers to hack around their lack of features (snapshots in this case). I’ll go into more detail when I’ve calmed down :)

The Linkstation is still a great piece of kit as far as it goes.

In my case, it’s gone on amazon marketplace.

1 yes, I’m aware of the repair program . No, my serial number isn’t in the list.

2 no. not the guy who puts important things on firmware written by people who run off with paypal donations . definitely the filesystem. definitely.