Convert Microsoft to LINUX: Latest Oracle Solaris VMWare Install


This section will feature info on the latest Oracle Solaris UNIX Distribution. Solaris is actually open source UNIX not Linux created by Sun Microsystems Inc. which no longer exists. It was bought by Oracle in 2010. However, there are enough similarities that it is worth focusing on. Note, Solaris uses the UFS file system as opposed to Linux which uses the ext4 file system . It does have a GRUB2 program so you can still multiboot. Some Linuxes such as Arklinux will get confused when they see this file system and fail on a file system check fsck on this device because they do not recognize this file system type. The solution is to not multiboot Arklinux with Solaris on the same physical hard drive.

Installing new Oracle Solaris 11 (Dec. 2011) from a USB Stick

As with all the other Linuxes, I could not use the straight:
dd if=oracle-sol.usb of=/dev/sdb bs=4M
that I mentioned on my Ubuntu Debian web page. After much searching I found something that the developer for Oracle had posted on how to do this on Linux. This is the equivalent of the builtin usbcobpy which does not exist on Linux, but only in Oracle Solaris. You have to first pad the head of the USB with an unzipped Data file. Here are the instructions:
wget 'http://devzone.sites.pid0.org/OpenSolaris/opensolaris-liveusb-creator/OsolLiveUSB002.zip?attredirects=0' -O OsolLiveUSB002.zip
Next you want to unzip the file as in:
unzip OsolLiveUSB002.zip
Then gzip it back, that is compress it with the appropriate header for using a 1 , 2, 4 or 8 Gig USB drive:
gzip -dc OsolLiveUSB002/headimg/0.dat > 1gb_headimg.dat
gzip -dc OsolLiveUSB002/headimg/1.dat > 2gb_headimg.dat
gzip -dc OsolLiveUSB002/headimg/2.dat > 4gb_headimg.dat
gzip -dc OsolLiveUSB002/headimg/3.dat > 8gb_headimg.dat
Now you simply put the approrpriate header in front of the normal dd type input with this command:
cat 4gb_headimg.dat Downloads/sol-11-1111-live-x86.usb | dd of=/dev/sdb
I used this because I had a 4 Gigabyte Drive. If I had a 2 Gigabyte USB drive I would use the 2gb_headimg.dat
Unfortunately the latest Oracle Solaris release is only for 64 bit and my machine is 32 bit. So I got the USB stick to boot but after a few steps into the install I got the long mode not supported which means I need a 64 bit processor. The Oracle Solaris 10 is still 32 bit for x86 so I installed that.

Using VMWare to install Oracle Solaris

Note, there is one problem with installing Oracle Solaris, it does not cooperate well with the new Grub2 multiboot installer. It will totally trash the master boot record and you will not be able to find the previously installed partitions where you had your various Linuxes. For this reason, I strongly suggest getting a 64 bit machine with at least two CPU processors on it, preferably four and 2 Gig of Ram. I had tried installing the 32 bit VMWare-player which works in Ubuntu on my one CPU one Gig Ram and it was not enough to work properly. The Oracle Solaris 10 did not make it to the end of the install. Note in addition to downloading the VMWare player you will need to patch the kernel. This is because VMWare talks directly to the kernel and needs the hooks to load various daemons to set up the network card and hardware devices. Here are all the details of how to do this using the 3.15 VMWare Player:
sudo apt-get install build-essential linux-headers-$(uname -r)
gksudo bash ./Downloads/VMware-Player-3.1.5-385536.i386.bundle
Noate gksudo invokes a graphical interface for installation in a shell. You may have to make the VMPlayer executable if it is not already with:
chmod +x VMWare-Player-3.1.5-385536.i386.bundle
Now for messing with your kernel. First to be safe go to the /boot directory and back up the whole thing under your home directory, i.e.:
mkdir ~/save_boot
to create a place to save stuff in your home directory.
sudo rsync -a /boot/ ~/save_boot
The previous command will make the directories match. Notice, I said save_boot instead of boot for the directory for added protection. Now if you mess up and do not have a recovery kernel to boot from, you can just mount the hard disk with a USB live copy of Ubuntu and then copy the whole directory back. Here is the script for patching the kernel for my particular version 3.15. Make it executable as you did the previous one above using the chmod and then run it in background:
patchkernel &
You want to be root when you run this. Thanks to Ved Antani for providing this. You can then immediately run the VMWare-player. This would work similar with the real VMWare module also if you had it. The VMWare-player is a free model of the more expensive regular VMWare. It enables you to try out VMWare. I have used it commercially and found it works very well on a 64 bit machine with four CPU's and the Ram I mentioned earlier along with a fast 2 - 4 Gigaherz processor. The nice thing about the VMWare-player is that you can run another Linux at the same time as you are running Ubuntu in your main window.

Old Sun Solaris 10.0 before bought by Oracle

The installation of Solaris (32 bit version for X86 chip) is pretty straight forward. Pick a device and let it go and format it as UFS. In this case I chose /dev/hda2. I then had to edit the Solaris menu.lst file in the directory of /boot/grub to add back the previous Linuxes I had, excluding Arklinux.

A few notes about the installation:

  1. Select choice 2 Solaris Install Jump Start.
  2. Hit the ESC key to change proposed configuration. It defaults to the wrong monitor and dimensions. Put an X in Video/Monitor and change the monitor to
    Notebook LCD XGA 48 khz (1024 x 768 @ 60 Hz)
    Similarly change the keyboard to
    English-default from English-104.
  3. Type ESC-2 to continue and then type F2 to test the keyboard and mouse.
  4. When it asks for name service select "none" unless you want to do NIS.
  5. Just chose the default standard install , when it asks you for the type of install. This will automatically give you the man pages . They are necessary as Solaris is quite a bit different from Linux.
  6. When done you will get a boot menu with just Windows and Solaris. Boot into Solaris to verify it works then modify the menu.lst appropiately in the /boot/grub directory.
  7. Be aware from that here on you must do everything with the Solaris Grub program when adding new operating systems to this hard drive. Solaris GRUB can see itself, Windows and Linux. However the standard Linux GRUB program can not see the Solaris UFS partition and boot to it. The command to install GRUB in Solaris is installgrub. It is defined in more detail on my commands link. Click here to see the menu.lst file for Solaris.
  8. The Apache Web Server is installed by default. To invoke it in the directory of /etc/apache type:
    cp httpd-example.conf httpd.conf
    Note, the default directory for the start of the index.shtml documents is:
    /var/apache/htdocs
  9. One final annoyance that can be easily solved. The default shell in Solaris 10.0 does not give you tab completion and history ability. Invoke the shell that has this by typing:
    tcsh or bash
    You can put an entry to do this in your profile to make it permanent.
  10. Here is one added bonus I discovered. Since my MAC is multibooted with Ubuntu on it, I can start up Ubuntu click option and choose Logon on to XDMCP Session . This allows me to logon to my Solaris 10.0 Server with my full Java Desktop. I did not even have to type in the IP Address because it was broadcasted to my MAC which is on the same network.

Booting Solaris 8 Sun Sparc Without Knowing Password

Sometimes you may find yourself having to restore an old machine and you do not know the root password. You can edit the /etc/passwd file and force the /etc/shadow file to rebuild itself and then log into the system. This process can be somewhat involved. Here is what worked for me on an old Solaris Sun Sparc 8 system.

  1. boot cdrom -s
    assumimg you have the solaris install disk in there.
  2. It is usually a good idea to fsck.
    fsck -y /dev/rdsk/c0t0d0s0
  3. mount primary boot slice
    mount /dev/dsk/c0t0d0s0 /a
  4. Check the passwd file for correctness.
    That is vi /etc/passwd deleting the encrypted letter string between the two colons so you have no password for root. It will look something like:
    root:Password:6445:::::
    Make it look like:
    root::::::::
    The 6445 type number doesn't matter.
  5. generate new shadow file with pwconv:
    # chroot /a usr/sbin/pwconv
  6. The last step is to type:
    cd /
    umount /a
    Reboot as normal in single-user mode boot -s
    The root account will not have a password. Give it a new one using the passwd command.