Tuesday, February 22, 2011

Oracle Enterprise Linux 6 in VMWare Workstation

First off, let me say this... UGGHHHH!

Tonight I set out to learn a little about Oracle Enterprise Linux. Download the latest version from Oracle, toss it in VMWare workstation, and give it a whirl! Sounds easy enough... Wrong.

Granted, if you're a linux administrator, you will probably read this and say, "That would have taken me 5 minutes to set up! Newb!"  And you will probably be right.  But I figure there is probably at least one other windows admin out there that will appreciate this information.  Enjoy!

Installing OEL6 in VMWare workstation was fairly straight forward.... until I wanted to install a network card.

Installing VMWare Tools pre-requisites (Setting up local YUM repositories)
Usually the virtual devices can't be seen by the guest operating system (OEL) because the VMWare tools are not installed.  But before we can install VMWare tools, we need to install the pre-requisites...

First we need to tell OEL where to find yum repositories. You won't be able to use the online ones since your network card isnt working. Luck for us, we have the DVD downloaded in ISO format.

1. In VMWare, mount your downloaded ISO to your OEL VM.

2. Create a directory to use as your cdrom mount point.
mkdir /mnt/cdrom

3. Mount the virtual cdrom to the mount point you just created
mount /dev/cdrom /mnt/cdrom

4. Move to the yum repository directory and create a new file. (This tells the yum installer to use local media)
cd /etc/yum.repos.d

vi OEL6.repo

5. Add the following information to the file and save it:

name=Oracle Enterprise Linux 6 DVD

6. Now tell yum to clean the database
yum clean all

7. Verify you see the local repository
yum list available

You should see lots of packages that are on the OEL6 DVD.  You're all set!

Installing VMWare Tools pre-requisites (Installing kernel, gcc, etc.)

1. Now we need to install a few things for the VMWare tools to install correctly.  Type the following from a command prompt:
yum install kernel-devel kernel-headers gcc mkinitrd

(*HINT* This actually installs headers and development components for the wrong kernel... we fix this in the next section)

Booting a different kernel
It seems OEL6 runs a kernel version that is newer than the headers available on the source media.  I googled a little bit and couldn't find downloadable header files so I had to move to a different kernel.  Luckily, OEL6 includes a RedHat kernel already installed.

1. Modify the bootloader so it uses the alternate RH kernel
vi /etc/grub.conf

2. Change the default setting from 0 to 1

3. Save the file and reboot
shutdown -r -t 0 now

congrats, you are now running the RH kernel.  You can verify this by typing the following command:
uname -r

VMWare Tools

1. Unmount the OEL disc you previously mounted
umount /mnt/cdrom

2. Tell VMWare you are ready to install tools:
In VMWare workstation, click VM and choose "Install VMWAre Tools"
(*Hint* with a windows guest, this usually launches the installer automagically. In linux, this doesn't happen.  clicking this option in VMWare does the virtual equivalent of "putting a CD in the cdrom")

3. Mount the virtual cdrom to the mount point you previously created
mount /dev/cdrom /mnt/cdrom

4. Create a place for your vmware file to unpack
mkdir /home/temp

5. Move to the location you mounted your cdrom and unpack the files
cd /mnt/cdrom/
tar xvfz VMWareTools-8.4.5-324285.tar.gz /home/temp

6. Run the vmware installer
cd /home/temp/vmware-tools-distrib

the VMware tools "should" install with all default options.  When it is complete, it will kick off the configuration script (/usr/bin/vmware-config-tools.pl) If all of the above steps were completed, it will find all of the necessary kernel headers, gcc, etc.

Installing your network card

1. Edit your network script to bring up your vmware ethernet adapter automagically.
cd /etc/sysconfig/network-scripts
vi ifcfg-etho

2. Add the following:


3. Save the file and exit.

4. Modify the other network script

cd /etc/sysconfig/
vi network

5. Make the following additions:

6. Save your changes and exit.

Are we there yet?

1. Move the network scripts folder and "Up" the device.
cd /etc/sysconfig/network-scripts
ifup eth0

If everything worked... you should now have a functioning network adapter.  You can verify by typing the following:

You should see eth0 has a 192.168.xxx.xxx address. Grats!


Holy crap that's a ton of work to get an IP address...


Tuesday, February 15, 2011

USB, SDHC, and other Solid State Storage

I've been playing around with USB thumb drives, SD cards, and SSD hard disks lately. Mostly because I've been interested in the read/write performances of the devices when implemented to do atypical tasks. (aka: boot an operating system, stream some media, etc.)

A few fun facts

USB 2.0 = Specification says around 480Mb/s. (~55MB/s) In reality, most drives are hovering around 30MB/s read and 20MB/s write.

SD Cards = This was interesting... I wasn't aware of this but SD cards have different "classes" that determine their speed. The classes are numberd (0,2,4,6,10) The rating system only shows the minimum required to be in that class.  So a class 10 card has to be at least 10MB/s. Right now it looks like these devices top out around 20MB/s for high end class 10 cards.

SSD Hard drives = This gets really complicated since read/write performance directly relates to block size, sequential/non-sequential operations, etc. But... generally speaking, SSDs today are averaging around 200 MB/s write and 250MB/s read.