I’ve been putting off reinstalling Solaris Express for a while,
but this week I finally went to b61 ( ships with crossbow , duckhorn , cpu caps, direct boot, a pony, wireless drivers, a load of iSCSI/ZFS fixes)

My last solaris install
was a ‘kick the tyres’ thing; now I’m using it for important things
(like my home directory ) I want something I can upgrade.

I’m going for a Live Upgrade
capable setup
(Briefly, it’s an alternate root partition you upgrade and then boot into. I’ll go into details again, but for now it boils down to ‘leave a free partition on one of the disks’).

The machine is a general purpose server, with a ZFS storage pool for building
iSCSI and
zones on.

Anyway, here are the install notes. Hopefully of some use to others.

hardware

It’s the same P4 destkop as before, but I scrounged some addons:

  • 3Ghz P4
  • 1 Gb Ram
  • 2×40Gb IDE disks
  • 1 x PCI 100Mbit NIC
  • 1 X PCI-X Gbit NIC (the back half hangs out of the motherboard PCI slot. Looks stupid, but works.)

software

Get the latest SXCR DVD ISO
(there are CDROMS images if you insist). You need to register (free) with Sun Online to get the file(s).

  • accept the license
  • download the 5 zipped parts of the DVD
    • gotcha: get the right files! x86 is below SPARC.
    • gotcha: Firefox is rubbish at downloading big files. Use something else – konqueror works fine.
  • unzip them, then cat them together to make the DVD image
  • check md5sum of ‘big.iso’, test it boots using qemu, etc.
  • burn it

pick an installer, any installer

I don’t see the point of the GUI install -
if you want one, see Dennis Clarkes walkthrough . You’ll need at least 768Mb of RAM.

To get a text installer:

  • choose ‘Solaris Express’
  • choose ‘4. Solaris Interactive Text (Console session)’
  • let it (try to) DHCP its interfaces
  • ‘Setting up Java. Please wait…’ : wait
  • ‘Beginning system identification’:

NB the text installer doesn’t give you the option to install the compilers, so
install them from the DVD later.

sysidconfig

This should be familiar by now
but:

  • configure keyboard layout : choose ‘uk-english’
  • Select a Language: choose ‘1. English’
  • hit F2 to get through to the ‘Network Connectivity’ screens
    • Networked: Yes
    • configure ‘iprb0’ (my WAN link)
      • DHCP: yes
      • IPv6: no
    • Kerberos Security: no
    • Name service: None (will be set via DHCP)
    • Default NFSv4 domain
  • Time Zone: Europe/Britain(UK)
  • check/edit clock time
  • set root password

pre-install chitchat

  • choose a ‘Standard’ install (as opposed to upgrade or flash archive)
  • choose ‘Manually eject CD/DVD’ and ‘Manual Reboot’
  • choose to install from CD/DVD
  • accept license
  • extra Geographic regions : none
  • Sytem Locale : default (POSIX C)
  • Web Start location : none

tweaking the install

lazy option If this section seems like a pain in the arse, just choose to install everything and skip to the next bit.

I only have 2×40Gb and I want a decent sized zpool, so I want to keep
the root FS reasonably small. I have no need for X so I’m going to choose
‘Core’ (979Mb) and hit F4 to customize it.

Make sure the below have [X] next to them.
Occassionally one part of a component has an insane amount of sub-dependencies,
(dynamic resource pools for example) so I’ve deselected that part.

Solaris packaging is primitive. It can highlight dependencies, but
it expects you to add those dependencies (and their dependencies, ad infinitum).
Choose ‘resolve dependencies after selecting all packages’ or you will be here all fucking day.

My shopping list:

  • ‘Documentation Tools’ ( the ‘man’ command)
  • ‘Fair Share Scheduler’ (zone resource controls)
  • ‘Freeware Other Utilities’ (less)
  • ‘Freeware shells’ (bash + zsh)
  • ‘GNU wget’
  • ‘Live Upgrade Software’
  • ‘On-line Manual Pages’
  • ‘PostgreSQL 8.2’ (all but ‘JDBC 3 driver’)
  • ‘Secure Shell’
  • ‘Solaris Zones’
  • ‘System Accounting’
  • ‘System and Network Administration Framework’ (needed by ‘Live Upgrade’)
  • ‘The XSLT library’ (needed by ‘PostgreSQL 8.2’
  • ‘core software for resource pools’ (all but ‘Dynamic Resource Pools’)
  • ‘gcmn – Common GNU package’ – (needed by ‘GNU wget’)
  • ‘gtar – GNU tar’ (to untar CentOS image for linux branded zones)
  • ‘iSCSI Target’
  • ‘lx Brand’ (for linux branded zones)

I come out of this with a total size of ‘1096Mb’. Hit F2 to continue.

disks

I’m going to make both disks the same size and leave space on the second disk for
a Live Upgrade ABE.

  • ‘select disks’ – choose both
  • preserve data – no
  • choose ‘manual layout’. Select ‘overlap’ and customize it

c0d0

Slice Mount Point Slice (MB)
0 / 3129
1 swap 1027
3 /zfs 35000

c1d0

Slice Mount Point Slice (MB)
0 /alt 3129
1 swap 1027
3 /zfs2 35000

/zfs and /zfs2 will be the halves of my zpool mirror. /alt is the ABE.
None of the 3 are mounted (or should even be formatted) -
I’m just reserving the space here to save time later.

make install go fast now

  • hit F2 to confirm the summary (or go back if you typoed)
  • F2 past ‘mount remote file server’
  • check the summary and hit OK to kick off the install
    • hit Ok if it warns you about boot device – it’s just saying ‘your BIOS is set to boot off CD, but you told me you wanted to boot off your hard disk’.

I hit ok and packed up to go home – it was done by the time I was ready to leave.

first boot

First, set the BIOS to boot off the hard disks. The first boot will take a minute or two,
mainly because Solaris is building its SMF database. It’s about 30 seconds after that.

tweaks

setup firewall

vi /etc/ipf/ipf.conf
svcadm enable ipfilter
ipfstat -io # to ensure it's loaded ok

set up root how I like it

usermod -s /usr/bin/bash root
mkdir /root && chmod 700 /root
vi /etc/passwd # change roots homedir to /root

setup sendmail

vi /etc/mail/sendmail.cf # set 'DSmysmarthost.com'
echo 'root:  me@mydomain.com' >> /etc/mail/aliases
newaliases && svcadm restart sendmail

fix manpage indexes

catman -w

setup a CDROM


   mkdir /cdrom
   echo "/dev/dsk/c1t1d0p0  -  /cdrom  hsfs  -  no  -" >> /etc/vfstab

setup root access via SSH using RSA keys

vera # vi /etc/ssh/sshd_config # set 'PermitRootLogin yes'
vera # svcadm restart ssh
me@desktop $ sftp root@solaris
mkdir .ssh
chmod 700 .ssh
put .ssh/id_dsa.pub /root/.ssh/authorized_keys
exit
me@desktop $ ssh root@vera # this should use the key now
vera # vi /etc/ssh/sshd_config # set 'PermitRootLogin without-password'
vera # svcadm restart ssh

cleanout ‘markers’ from vfstab

vera # umount /zfs
vera # umount /zfs2
vera # umount /alt
vera # rm -r /zfs /zfs2 /alt
vera # vi /etc/vfstab # remove the 3 entries

setup the zpool

vera # zpool create -f tank mirror c0d0s3 c1d0s3
vera # zfs set mountpoint=none tank

(’zpool’ needs reassurance (’-f’) these are the right partitions because the installer built filesystems on them)