Showing posts with label Solaris. Show all posts
Showing posts with label Solaris. Show all posts

Saturday, January 31, 2009

Run OpenSolaris 2008.05 In VirtualBox

This article emphasizes on how to load the OpenSolaris 2008.05 VDI image which was distributed as a part of a resource DVD distributed for college students by Sun Microsystems Inc.

The article is broken down into two parts - Installing VirtualBox and Loading the VDI image in VirtualBox.

Installing VirtualBox

VirtualBox is available in two versions on the resource DVD - 1.6 and 2.0. To install version 1.6 follow these steps -

  • For Windows go to virtualbox → 1.6 → win32 → (depending on your processor) amd64/x86
  • For Linux go to virtualbox → 1.6 → linux → (depending on your linux flavor) select the required package
  • For Mac OS X go to virtualbox → 1.6 → macosx → run the file present in the directory

To install version 2.0 follow these steps -

  • For Linux go to virtualbox → 2.0 → linux → (depending on your processor) amd64/x86
  • For OpenSolaris go to virtualbox → 2.0 → OpenSolaris → (depending on your processor) amd64/x86

The installation is simple and is similar to the other software that we generally install.

Configuring OpenSolaris 2008.05 in VirtualBox

Copy the "OpenSolaris_2008.05.vdi.gz" file from the opensolaris directory of the DVD and copy it to your hard-disk (This step isn’t necessary but will reduce the time taken for extraction of the final image).

Extract the contents of the file to a directory of your choice using software like Winzip (or) Winrar (or) IZArc.

You will get an *.vdi image which is nearly 8 GB in size (Caution - make sure your partition isn’t a FAT32 partition, as the extraction will be terminated at around 4GB if it is a FAT32 partition). Start VirtualBox by selecting Start → Programs → Sun xVM VirtualBox → VirtualBox. Select New Icon on the screen, a wizard will open which will guide you through the creation of the virtual Operating System, click on Next.

Type a name for the Operating system; it can be any name, no restrictions. Also select the type of the OS that is being used. In this case OpenSolaris. Specify the memory which you want to provide to the new Operating System. Remember your present Operating System is still running, so split the total available RAM accordingly so that both the Operating systems can work comfortably.

Next you will be prompted for a hard-disk to work with, select existing there. A screen, called the virtual disk manager, will appear where we are supposed to add our OpenSolaris image. Click on "Add", then browse through the folders and select the *.vdi OpenSolaris image (i.e. the extracted image). A new entry will be in the added in the virtual disk manager. Click on that entry and then click on Select.

The screen will come back to the hard-disk point. Now go to the next step. Finally a consolidated sheet of the selected options will appear. Select "Finish" here. Now as you can see there is a new Operating System waiting, under the name of OpenSolaris. Double click on it to get OpenSolaris working.

PPPOE Internet Configuration For OpenSolaris 2008.05

One of the first things I had to learn when I moved from Windows to OpenSolaris was to get my Internet up and running. I had an Airtel broadband connection which followed the PPPOE (Point to Point Protocol Over Ethernet) network protocol. I had to experiment a bit and due time got a proper process established for network configuration. So if you are also planning to setup a broadband connection in OpenSolaris, edit the following files accordingly -

/etc/ppp/pppoe.if

INTERFACE
And reboot.

/etc/ppp/peers/ISP

sppptun (what device to use)
plugin pppoe.so (initialize the connection)
connect "usr/lib/inet/pppoec INTERFACE" (connect string)
persist (if the connection dies, bring it back)
user "USERNAME" (username)
noauth (do not make the other side authenticate itself)
noipdefault (let them give you what IP they want to give you)
noccp (no compression)
novj (no compression)
noaccomp (no compression)
nopcomp (no compression)
defaultroute (add an appropriate default route)
usepeerdns (for dns)

/etc/ppp/chap-secrets

"USERNAME" * "PASSWORD"
Remember these are tabs and not spaces.

/etc/ppp/pap-secrets

"USERNAME" * "PASSWORD"
Remember these are tabs and not spaces.

Check your work by executing the following command at the terminal -

sppptun query

Sample Output

INTERFACE:pppoe
INTERFACE:pppoed

Execute the following set of commands to finalize the procedure -

rm /etc/resolv.conf (remove the resolv.conf file from /etc)
link /etc/ppp/resolv.conf /etc/resolv.conf (instead link the resolv.conf from /etc/ppp to the one in /etc)
vi /etc/nsswitch.conf (make sure "hosts" and "ipnodes" resolve through "files dns")

Start the internet connection by the following commands -

/etc/init.d/pppd start
/usr/bin/pppd call ISP

Remember many of these files require root privileges, so login as super user using the su command.

INTERFACE is found out from ifconfig from the terminal. Eg. e100g0
ISP is the service provider you are connected to. Eg. airtel
USERNAME is the user name with which you login. Eg. 04040142943@touchtel.india

Tuesday, November 18, 2008

Triple Boot A System - Windows, Fedora, OpenSolaris

Install Windows on the system by creating a primary partition (termed C, also known as hda0 for Linux). Then create an extended partition where you can then split it into logical drives (like D, E, F, etc. - the entire extended primary partition is recognized as hda1 in Linux).

Next Install Fedora 9 taking care that the MBR is installed at the first location of its corresponding drive (hda2, as hda2 is the newly created primary partition).

Note - This is a reference image and the name of the drive, sda1 may vary.

  • This is taken care during the installation where we have a choice either to install the MBR at the first location of the hard disk, or at the first location of the Fedora partition; select the later
  • Fedora creates the swap partition also as a primary partition, so avoid swap as Windows can recognize only three primary partitions (Windows C + Fedora hda2 + Fedora swap) and we won’t be left with another primary partition to install OpenSolaris. Else create the swap partition of the Linux as an extended partition
  • Now don’t get panicked if Fedora doesn’t load, just keep on going because we have not allowed Fedora to update the MBR

Install OpenSolaris 2008.05 on the system, and complete the installation without any hassles on another primary partition (hda3).

Boot the Solaris and got to /rpool/boot/grub/menu.lst, this is a privileged file and it requires to be logged in as the root.

Add these lines to the grub of Solaris at the end of the file -

title Fedora root(hd0, 2) chainloader +1