I am currently doing battle with a text-only installation of Solaris 11. I say “doing battle” because, of course, it isn’t quite like Linux. It’s close enough that it’s familiar, but different enough that nothing really works! What you really need is a Linux-to-Solaris phrasebook… and these are the bits I’ve cooked up so far!
Before anyone writes in to say, “This method does it better’ or ‘Why not use this command instead’… this is a quick survival guide, not an elegant, considered dissertation on the best way of doing anything. Getting a result (that’s useful to me) is all that counts!
1. How do you know what your CD/DVD device is called?
You want to mount a CD or DVD manually and the mount command will require that you know the proper device name for that drive. How do you find out what it is?
In Linux, you might do any of these:
cat /etc/fstab ls -l /dev/cdrom cat /proc/sys/dev/cdrom/info -check the "drive name" information
The Solaris 11 equivalent I use is:
That’s the “removable rewriteable media format utility” (so it has more uses than just listing things out!) Its output is potentially confusing: what it refers to as the “Logical Node” is what you’re actually after in a mount command, whereas its display of the “Physical Node” isn’t.
2. How do you see all your file systems?
Obviously, “rmformat” is only going to tell you about file systems on removable media. How do you simply get a listing of all other physical storage devices that exist?
In Linux, you could do worse than check the contents of /etc/fstab, though more detail is usually available by doing an fstab -l.
On Solaris, there are lots of ways of doing it, but maybe the most informative and yet simplest is:
Bear in mind, though, that the default file system for a Solaris 11 installation is ZFS, so maybe something like
…will provide you the information you’re looking for.
3. How do you manually mount a CD/DVD then?
In Linux, you might get away with things such as:
mount -t iso9660 /dev/sr0 /some-mountpoint
The Solaris 11 equivalent is very close:
mount -F hsfs -o ro /dev/rdisk/c3t1d0p0 /some-mountpoint
It’s still essentially “mount <some file type> <some device> <somewhere>, but the specific switches have changed. Specifically, “hsfs” is the ‘High Sierra Rock Ridge and ISO9660 file system’… which makes it ‘the cd file system’. And we use “-F” rather than “-t”, because we’re dealing with “F”ilesystems, not “t”ypes. Sort of!
4. How do you create an ISO file from files?
Let’s pretend you’ve downloaded the two Oracle 11gR2 zip files from OTN, you’ve unzipped both of them and thus created a single “database” directory. How can you turn that directory into the contents of a single new ISO file, suitable for burning to a DVD?
On Linux, I’d perhaps fire up Brasero and do it via a GUI (though K3b is really needed to get that specific job done properly) Using Brasero would also be open to me if I’d installed the Live version of Solaris 11, given the Gnome desktop that ships with. But using the command-line only, I’d do this on Linux:
mkisofs -r -v -J -R -o output.iso /path-to-main-folder
There are a bazillion switches that might be needed to get all the right formats on the resulting ISO (like long file names, etc). The particular mix of Joliet and Rock Ridge options shown here might not always be appropriate.
On Solaris, we have this:
mkisofs -r -v -J -R -o output.iso /path-to-main-folder
Actually, that’s exactly the same command as before. So there’s a win!
If you happen to be trying to create a functional ISO from the unzipped & combined two Oracle 11gR2 zip file downloads as I mentioned originally, though, I think you’ll need to add a few more switches. I find this works on Solaris 11, anyway:
mkisofs -log-file log.txt -r -v -J -R -d -l -N -allow-lowercase -allow-multidot -ldots -allow-leading-dots -o ora11gR2.iso /database
(In case the font lets me down, that’s “Jay Are dee el En’ in the middle bit there and it’s a reference to ‘minus eldots’… there’s no number ’1′ anywhere, in other words. And of course it’s all on one line, though I’ve broken it up here to make it look a bit nicer).
5. How do you map a SAMBA share?
Assume we have a mountpoint called “/network” on both a Linux and a Solaris 11 machine, and we want to connect to a share called NEWTON/Public that is being offered by a Windows 2012 server somewhere (we’re nothing if not up-to-date in these parts!) On Linux, I’d do this: mount -t cifs -o username=Administrator NEWTON/Public /network
I’d love to be able to tell you what that Solaris 11 equivalent is, but I have yet to find one on text-mode Solaris 11. The GUIversion of Solaris 11 will certainly let you browse network shares in Nautilus, but it seems not to like any provided by Windows 2008 R2 and Windows 2012 servers… it simply keeps asking for the username/password for the share without ever seeming to realise it’s been told it multiple times! Browsing an ancient XP box I’d forgotten about, though, was no problem.
Anyway, the long and the short of it is that Solaris 11 of any flavour does not seem to be a nice fit in a mostly-Windows environment. However, that perception might be as a result of the fact that a lot of the available documentation and web-tips etc. appear to be mostly about Solaris 10 -and mostly about setting up a SAMBA server, not using Solaris as a mere SAMBA client. Give me a week or two… hopefully some better news will turn up. (If you know the answer already, feel free to add enlightenment for all in the comments!)
6. How do you check what IP address you’re using
On either Linux or Solaris, you can still use ifconfig, but it’s been deprecated for a while (even in Linux, but especially in Solaris). The command is used slightly differently in the two O/Ses, too: in Linux, the command ifconfig will return you the IP addresses for all interfaces. Try that on Solaris, however, and you’ll get a help/syntax message -because on Solaris, you’re supposed to specify the precise interface you want to know about. You are therefore supposed to use a command like ifconfig net0.
Which of course immediately invites the question: how do I know what my network interfaces are called? To which there is the answer: dladm show-link. There are other variants on that command: dladm show-ether, for example, will list only the Ethernet interfaces, not the wireless ones, bridged, virtual interfaces (or sundry other types).
Anyway… I have plenty of other Linux/Solaris conversion tips like these, but that’s probably enough for today’s efforts. Watch this space…