Moving to Linux from Solaris?

This content is 15 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Oracle’s acquisition of Sun Microsystems has probably caused a few concerns for Sun customers and, today, Oracle message to Sun customersOracle reaffirmed their commitment to Sun’s Solaris operating system and SPARC-based hardware with a statement from Oracle CEO, Larry Ellison, that tells customers they plan to invest in the Solaris and SPARC platforms, including tighter integration with Oracle software.

Nevertheless, as one of my colleagues pointed out to me today, it costs billions to create new microprocessors and more and more customers are starting to consider running Unix workloads on industry standard x64 servers. With significant differences between the x64 and SPARC versions of Solaris, it’s not surprising that, faced with an uncertain future for Sun, organisations may consider Linux as an alternative and, a few weeks back, I attended a webcast given by Red Hat and HP that looked at some of the issues.

I’m no Linux or Unix expert but I made a few notes during that webcast, and thought they might be useful to others so I’m sharing them here:

  • Reasons to migrate to Linux (from Unix):
    • Tactical business drivers: reduce support costs (on end of life server hardware); increase capability with upgraded enterprise applications; improve performance and reduce cost by porting custom applications.
    • Strategic business drivers: simplify and consolidate; accelerate service development; reduce infrastructure costs.
  • HP has some tools to assist with the transition, including:
    • Solaris to Linux software transition kit (STK)– which , although aimed at migrating to HP-UX, this joint presentation between HP and Red Hat suggested using it to plan and estimate the effort in migrating to Linux with C and C++ source code, shell scripts and makefiles for tools that can scan applications for transition impacts.
    • Solaris to Linux porting kit (SLPK)which includes compiler tools, libraries, header files and source scanners to recompile Solaris applications for either Red Hat or SUSE Linux running on HP ProLiant servers.
  • The top 5 issues likely to affect a transition are:
    1. Complier issues – differing development environments.
    2. ANSI C/C++ compliance – depending on the conformance to standards of the source code and compiler, there may be interface changes, namespace changes, library differences, and warnings may become errors.
    3. Endianness – SPARC uses a big-endian system, Linux is little-endian.  This is most likely to affect data exchange/communications between platforms with access to shared memory and to binary data structures in files.
    4. Differences in commands, system calls and tools – whether they are user level commands (e.g. a Solaris ping will return a message that a host is alive whereas a Linux ping will continue until interrupted), systems management commands, system API calls, software management (for package management) or operating system layered products (e.g. performance management, high availability or systems management).
    5. ISV product migration with issues around the availability of Linux versions of software; upgrades; and data migration.
  • When planning a migration, the strategic activities are:
    • Solaris vs. Linux ecosystem analysis.
    • Functional application analysis.
    • Organisational readiness and risk analysis.
    • Strategic migration roadmap creation.
    • Migration implementation.
  • Because of the differences between operating systems, it may be that some built-in functions need to be replaced by infrastructure applications (or vice versa). Indeed, there are four main scenarios to consider:
    • Solaris built-in function to Linux built-in function (and although many functions may map directly others, e.g. virtualisation approaches, may differ).
    • Solaris infrastructure application to Linux built-in function.
    • Solaris infrastructure application to Linux infrastructure application.
    • Solaris built-in function to Linux infrastructure application.
  • Finally, when it comes to deployment there are also a number of scenarios to consider:
    • Consolidation: Many Sun servers (e.g. Enterprise 420R) to fewer industry standard servers (e.g. HP ProLiant).
    • Aggregation: Sun Fire V890/V490 servers to Itanium-based servers (e.g. HP Integrity).
    • Dispersion: Sun Fire E25K server(s) to several industry standard servers (e.g. HP ProLiant).
    • Cloud migration: Sun servers to Linux-based cloud offerings, such as those offered by Amazon, RackSpace, etc.

Many of these notes would be equally applicable when migrating between Unix variants – and at least there are tools available to assist. But, now I come to think of it, I guess the same approach can be applied to migrating from Unix/Linux to Windows Server… oh, look out, is that flaming torches and pitchforks I see being brandished in my direction?

Patching systems shouldn’t be this difficult

This content is 19 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

With tools like the automatic updates client and Microsoft Update, keeping a modern Windows system up-to-date is pretty straightforward.

For those who have a network of computers to manage there are additional tools, like the Microsoft baseline security analyzer (which helps to identify if any patches are missing) and Windows software update services (which keeps a local copy of Microsoft update on one or more servers on a network).

It’s just taken me over two hours to patch a single computer running Sun Solaris 10 x86. Like Microsoft, Sun provides tools that assist enormously in the process, but honestly – two hours! First I had to install the Sun update connection software, then once I’d launched Update Manager, there were 53 updates to download and install (and that was just security patches and driver updates – Sun restricts access to certain patches to organisations with a service plan). After a very long reboot (whilst some of these patches were applied), there were still 15 more updates (probably a subset of the original 53). Then a further reboot (shorter this time), and I was up and running again.

In fairness, Windows updates often require restarts and it can take several visits to Microsoft Update before a system is fully patched but this was ridiculous.

Next time someone tells me that patching Windows is too difficult, my response is unlikely to be empathetic.

Selecting a UK keyboard in Solaris 10

This content is 19 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Since I installed Solaris, I’ve been getting more and more annoyed with my keyboard pretending to be American (mostly with ” and @ being mixed up). Today, I needed to write a post which included a lot of UK currency symbols (£ – pounds sterling) and rather than switching to a Windows PC, I spent a considerable amount of my weekend researching the solution.

It seems that setting a UK keyboard within the Java Desktop System doesn’t make a blind bit of difference, and the answer is to use the kdmconfig utility. After running this and switching the Window system server from Xorg to Xsun (I haven’t a clue what the difference is), I was able to define my keyboard type (Generic UK-English) as well as selecting the correct display and pointing device settings. After restarting the graphical interface (logoff/logon), I was back in action with all the keys in the right place.

Incidentally, there is another setting which, although not related to the keyboard layout, will affect the display language – at logon, ensure that the language option is set to en_GB.ISO8559-15 – Great Britain (Euro) for an English language interface with European currency symbol (€€) support.

Configuring a Solaris 10 client to print to a network printer

This content is 19 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

For weeks now, I’ve been trying to configure my Solaris client to print to a network-attached HP LaserJet 2200dn printer and I finally got it working today. It’s probably really easy for an experienced systems administrator but there were a few gotchas that caught me out – hopefully my experiences will help someone else out.

In many ways the Solaris Print Manager makes setting up a printer easy, but there were some important settings I needed to use (I found some of this on an HP support document, but there was also a lot of trial and error involved as I don’t think the advice in HP’s document applies to Solaris 10 x86):

  1. For an HP LaserJet 2200, the recommended printer driver was Foomatic/Postscript – I didn’t use this but selected Foomatic/hpijs instead.
  2. The destination is more than just the IP address or hostname of the print server (i.e. the LPD service on the printer’s JetDirect card) – I needed to append :RAW (LPD queues can be configured through the printer’s own web administration console).
  3. The protocol is BSD (not TCP as I expected).

One really handy feature is the ability to show the command line console, on which all the commands issued by the print manager will be displayed. Using this, I was able to determine that the commands to configure my printer (now saved as a shell script) were:

lpadmin -p hplj2200dn -v /dev/null -A write -n /usr/lib/lp/model/ppd/system/foomatic/HP/HP-LaserJet_2200-hpijs.ppd.gz -i /usr/lib/lp/model/netstandard_foomatic -o dest=printer1:RAW -o protocol=bsd -I postscript -u allow:all
lpadmin -p hplj2200dn -D "Laser printer in Mark's Den (duplex/network)"
lpadmin -d hplj2200dn
enable hplj2200dn
accept hplj2200dn

These will, of course, vary by model. Note that the first (very long) line will wrap on this web page – each of the first three commands should begin with lpadmin.

Don’t be put off by error messages after the enable and accept commands:

UX:enable: ERROR: Can’t establish contact with the LP print service. TO FIX: Either the LP print service has stopped, or all message channels are busy. If the problem continues, get help from your system administrator.
UX:accept: ERROR: Can’t establish contact with the LP print service. TO FIX: Either the LP print service has stopped, or all message channels are busy. If the problem continues, get help from your system administrator.

These fooled me for a while but I think the problem was just that the printer had not yet been established when I tried to enable it. By waiting a few seconds and re-issuing the last two commands, everything jumped into life.

I don’t know why there is a postscript reference in there – as far as I know this is a PCL printer, but it seems to work.

Finally, the commands to remove the printer (also now saved as a shell script) are:

reject hplj2200dn
lpadmin -x _default
lpadmin -x hplj2200dn

Configuring a Solaris 10 DHCP client to register with a Windows Server 2003 DNS server

This content is 19 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Last week, I wrote about configuring a hostname for a Solaris 10 DHCP client. Alan Thompson very kindly left a comment on that post about using DHCP to set the hostname on the network (i.e. in the DNS) and I’m pleased to say that it works a treat on my Windows network.

I have a Windows Server 2003 server which acts as my domain controller, DNS server and DHCP server. DHCP is configured to update DNS (always dynamically update DNS A and PTR records, discard them on lease deletion, and to do this for clients that do not request updates) and this was working well for my Windows clients but although my Solaris client (laptop3) had been retrieving IP information from the DHCP server, the DHCP console showed no name for the lease (and so couldn’t update DNS).

By following Sun’s instructions for enabling a Solaris client to request a specific hostname, DHCP was able to register the client’s name in DNS, using the fully qualified domain name as set in the DHCP scope options (option 015 DNS Domain Name).

I tested this using the nslookup laptop3 command, which returned:

Server: dnsserveripaddress
Address:
dnsserveripaddress#53

Name: laptop3.domainname
Address:
laptop3ipaddress

It’s worth pointing out that Sun’s instructions are not quite correct for Solaris 10 x86, as step 1 is not necessary (the comments in the /etc/default/dhcpagent file explain that, by default, the DHCP agent will try to request the hostname currently associated with the interface performing DHCP); however the other steps were spot on (add inet hostname to /etc/hostname/interface, flush cached DHCP data using pkill dhcpagent and rm /etc/dhcp/ interface.dhc, then reboot), meaning that my Solaris client now participates in my Windows network name resolution.

Sun’s university challenge

This content is 19 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Last week I blogged about Microsoft’s contest for the New Year and here’s Sun’s – a university challenge to encourage programming students to create a new application or port an existing application to the Solaris platform. The winner gets $5,000 and their university gets $100,000 to spend on Sun equipment.

There’s even a list of ideas for projects – and after just a few weeks of using the platform I agree with many of these (like a QuickTime player – Apple should have come up with one for Linux/Unix by now – after all, isn’t OS X based on Unix?).

Of course, some of the ideas are just plain laziness on the part of Sun – they should really be writing their own bug fixes and creating new device drivers, but then again, now that Solaris has become open source, maybe that’s the whole idea…

Unknown hostname for Solaris 10 DHCP client

This content is 19 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

When I installed Solaris 10 x86, my computer thought its hostname was unknown. Aside from being annoying, this seemed to be causing a few issues, so I set about trying to set it to a name of my choice.

Using the uname -S hostname command set the hostname for me but this information didn’t persist on reboot. A bit of googling turned up various references to editing /etc/init.d/network so that it read /etc/nodename and set the hostname accordingly (as well as a script to set the hostname), but my system didn’t have an /etc/nodename file.

I understood that /etc/nodename should contain my computer’s name, but didn’t know if any other settings were required (I later found Jeff Hunter’s TCP/IP quick configuration guide, which confirmed that the file just contains the computer’s name – in my case laptop3).

It turns out that these hacks are for Solaris 8/9 – Solaris 10 is quite happy to set the hostname based on the contents of /etc/nodename. Once I had created /etc/nodename and rebooted, /etc/hosts read:

#
# Internet host table
#
127.0.0.1 localhost
192.168.7.106 laptop3 # Added by DHCP

and the computer was no longer anonymous!

Resources for Solaris newbies

This content is 19 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

A few weeks back, I blogged that I was trying out Solaris 10 on a spare PC. I haven’t spent a lot of time with the product yet, but so far I’m impressed. I’m sure I’ll be writing more as I get to grips with Unix – an operating system family that I haven’t used in anger for many years.

I also began to gather a collection of Solaris hints and tips, ‘net resources and the like. This is my list so far (some of these are written for SPARC but most should apply to the x86 version too):

Some of these I found myself, others have been recommended by Unix sysadmins and architects, who by and large seem keen to help a Microsoftie learn about Unix (actually, I did a fair amount of Unix system programming at uni’, but that was a long time back). The other comments that I got back were that Linux is also “grown up” contender these days (and I’ve been suitably adminished for suggesting otherwise)!

Indeed, a couple of people have suggested that the best way to learn Solaris would be to start out with one of the main Linux distributions to get the hang of the start-up, configuration and shell. Ubuntu seems to be well recommended, as is Mandriva and SUSE. Apparently the Ubuntu route allows trade up to full Debian (“expert class” when you get there). Knoppix is an even easier way in – basically Debian on a live CD – impossible to mess up! Following that, Solaris is a case of working out what’s different. One sysadmin who had been through this journey commented that he now uses Gentoo at home “100% roll your own, compile everything from scratch”.

I did actually have a play with a couple of the Unix/Linux live CDs last week. One was eLux NG embedded Linux but far more impressive was the Sun Java Desktop live CD that Alex gave me – running Morphix 0.4 (based on Knoppix).

Getting back to Solaris, printed reference manuals (i.e. books) seem thin on the ground (although as can be seen from the list above, there is plenty on of material the ‘net). One which has been recommended to me is Solaris 10: The Complete Reference but I haven’t looked at it myself and the Amazon reviews for this are all very poor, commenting that this is really a Solaris 9 reference with very little new for Solaris 10 and suggesting that some other Solaris 10 books should be considered instead.

Didn’t get far with Linux so trying Solaris 10 now

This content is 19 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Sun SolarisLast year, I blogged about how I was starting to look at Linux… well, I installed SUSE Linux but never really got much further. I didn’t like the interface, I didn’t like that all the tools had weird or mis-spelt names, and it all felt a bit amateur (Linux zealots, please don’t flame me).

Still wanting to have a play with a Unix-based system and rebuild some long-lost skills, I had another go a few nights back and installed the x86 version of Sun Solaris 10 (the idea being that I’ll get used to a real Unix system and then maybe take another look at Linux later). It took an age to install, but I do now have a running system. I’m sure I’ve missed some essential configuration somewhere, but I’ll find my way through! First impressions are good, and I’m very proud of myself for managing to successfully install the Macromedia flash plug-in for Mozilla just by following the readme file (believe me, extracting files from an archive, finding out where Mozilla is installed, and then successfully running the installer is a big deal for a Unix newbie, even if it does sound trivial).

I still need to use Windows on my everyday systems, but maybe I’ll move my e-mail and browsing at home over onto the Solaris box once I feel comfortable with it all (after a couple of weeks’ use I’m not over-impressed with Mozilla Thunderbird on Windows XP so changing e-mail clients again won’t really upset me). In the meantime, if anyone out there has any Solaris hints and tips, good ‘net resources, etc., I’d be pleased to hear from you.