Top
Bottom
Top

Scott's Column
Apple TV Should Be Free, Crashed Hard Drive, Oracle 8i to 10g, Virtualization

June 1, 2007
By Scott Lewis

It's time to write more compelling introductions. This month I will talk about why Apple TV should be FREE. I will cover virtualization software and how to build VMware virtual machines for FREE. I will also cover repairing my sister-in-law's computer... and hey I did it for FREE. Did I grab your attention. Good! Then why not read about my Oracle 8i to 10g migration, which was free as far as not having to buy anything to to the switch itself.

Introductory paragraph goes here.

Current Topics:

Apple TV - Why It Should Be Free

I both like and hate the Apple TV. It sounds like a great little device. Apple has done its usually job of stripping down the features to the essentials and then making them work so smooth anyone can do it. I really applaud this. So, why do I hate it? And why should the Apple TV be free?

I hate it because it is only good for watching iTunes content. Granted, with three iPods in my household there is a lot of iTunes content, but none of it video content. Also, the vast majority of that content is music that was ripped to MP3 format before iTunes came along. I don't need Apple TV to play music on my TV. The only video content purchased on iTunes was the pilot of Aquaman, a "spin off" series from Smallville. It never made it and iTunes was the first place I learned you could see the video. I paid the $1.99 for it and watched it. So did my sons. My sons liked the fact that the actor that played Aquaman in the pilot was not the actor that played Aquaman (A.C.) in the episode of Smallville. In fact, the actor that played Aquaman in the pilot plays Green Arrow on Smallville. Clearly I am rambling here.

So I hate Apple TV because I can't watch anything on it. Can I watch TV shows? Only if I buy them from the iTunes Store. Can I watch movies? Again, only if I buy them from the iTunes Store. iTunes RIPs songs from CDs to load into iTunes. I can play those songs on the Apple TV. iTunes does not RIP movies from DVDs that I own to play in iTunes... and in turn play on Apple TV. And that is why I hate it.

This also leads to why it should be free. Cell phone companies will give you a phone for free, because they get you with the money you spend for the service. Since I have to buy movies and TV shows from the iTunes Store just to watch them on Apple TV then Apple TV should be free. They will get their money back from Movie and TV show sales. Right!

Apple has the best chance of making movie ripping an acceptable thing to the movie industry. Let's see how we should rip movies. First, a little background. I am a Netflix subscriber. Some of the movies I get from Netflix are labeled as NetFlix DVDs. They do not look like the DVDs in the store that I buy. Why? Are they really different? How many copies of a movie does Netflix and Blockbuster buy? Hundreds? Thousands? Why not put some secret bit on the rental versions of DVDs that say they can't be copied. DVDs you buy would not have this special bit. iTunes would look at this bit and allow you to rip the purchased DVD, but not the rental DVD. This would be a huge leap for the MPAA's piracy fear. To stop you from passing the RIPPED version of the movie around, iTunes could imbed the same copy protection that the songs from iTunes have... with one exception. The exception would be that you could watch the video on as many devices as you want as long as you provide your iTunes account information. I can't imaging people passing out their account information with copies of movies they RIP. This will minimize piracy.

So why doesn't Apple RIP movies to iTunes? Because they only want you to buy movies from the iTunes Store... therefore the device to play those movies should be free.

Top

Recovering From a Crashed Hard Drive

My sister-in-law came to me when her laptop would not boot. It gave an error message that a file was missing. The message read something like "The following file could not be found. Please replace the file or repair the installation." Then it listed a folder and not a file. Ouch!

I tried booting off of a Ubuntu 6.06 Live CD. I figured I would be able to look at the hard drive and see what was missing. (Oh, the repair did not work when using her Windows XP Home CD.) Ubuntu was scrolling a lot of errors on the hard drive when booting. It took about 20 minutes to boot from the CD. When I tried to look at the hard drive I got errors about it not being mounted. I did a little digging on the Internet and found this article: How To Recover Files from a Non-Bootable Windows PC using Ubuntu Live. The instructions required you to enter a few commands to mount the local disc, and then instructions for getting Samba downloaded, installed and working to access a network drive.

I was digging through a draw cleaning out old copies of Vista Beta on disc. After all, the beta version of Vista expired at the end of May. I came across a Freespire CD. I booted from that and I could browse my sister-in-law's hard drive easily. I don't know what tools Freespire comes with out of the box, but it was easier than Ubuntu Live CD. A post in the Ubuntu article mentioned Knoppix. I decided to download and burn Knoppix Linux to a CD and boot my sister-in-law's laptop from that. Knoppix is well known for being used as a recovery tool.

When I had the time to work on the laptop I booted the Knoppix CD. It was able to detect the wired network card, and was able to see the hard drive. I could not find where to map a network drive. I was having trouble getting the answer on the Internet, so I just started poking around. The file manager program had a menu option to "Go To Location..." When I clicked on that I just typed in the server and share name to my fileserver. It prompted me for my user ID and password and it just worked. I could now see both a share on the network and the local hard drive. Time to start copying files.

Nothing. When I navigated to the Document and Settings folder and then to my sister-in-law's user name it was empty. I can only assume that this is were the hard drive had crashed and all her data was lost. Since there was no data to find I informed my sister-in-law and told her all I could do was reformat the hard drive. The formatting process should mark the bad parts of the drive and then data would not be written there.

It took at least 6 hours to format the hard drive. The Windows install CD saw the drive as 38.1 GB. When I finally got Windows installed it said the drive was 37.2 GB. I can only assume this laptop had an advertised size of 40 GB. Anyway, I was able to install Windows XP. It took a long time. The machine has a 2.80 GHz Celeron, but only 256 MB of memory. Windows shows 192 MB, so the rest must be part of the video.

With the operating system fully installed the machine takes about 30 - 40 minutes to boot. I assume this is time checking the hard drive. But the laptop is running. I told my sister-in-law that it would not be worth the cost to replace the drive. She would be better off with another laptop.

Top

Migrating Oracle 8i to 10g

During May we migrating all the data from the Oracle 8i server I am (was) responsible for to an Oracle 10g RAC system. RAC means Real Application Cluster, which basically means we have multiple servers/nodes running against a single database. Cool!

We migrated all of the schemas I could identify as actually used. A schema is a user with database objects, in this case tables, triggers, etc. We got a lot of errors doing a direct export of 8i to 10g. I have always known that Oracle is very bad about letting you skip major versions when doing conversions like this. We ended up exporting from 8i into an install of Oracle 9i running on a Virtual Machine. Then we exported from 9i and imported into our 10g server. We manually brought over the grants based on scripting from the DBA_TAB_PRIVS table. Since we didn't want all the schemas the import would fail on the grants and not finish them. Running a script to get all the privileges for the schemas we were exporting made the operation a lot smoother.

We did drop one table from the schema. This was a history table. It was originally going to work like the history on our HP mainframe. It was never implemented, but it grew to a very large size. I don't know exactly how large it was, but dropping this one table from Oracle 9i produced an export file from 9i that was 1/3 the size of the 8i export file. Wow!

Even running a script to get all the privileges did not get them all. We ended up bringing up the 8i database and needed to look for a couple of roles that had some more privileges. Once the privileges and roles were all set correctly everything worked.

We had already added entries to the tnsnames.ora files on all the client workstations. The tnsnames.ora files contain information about the database the client software can connect to. Then we editing the connection string for the applications stored in INI files. Even old clients running the Oracle 8i client had no trouble connecting to the Oracle 10g server.

A couple of weeks after the data migration we took one final backup of the Oracle 8i server and shut it down. The rack space they were taking up is going to be used for a new UPS system in our server room.

Top

Virtual Machine Software

I have mentioned in past that I would like to try Linux. I even thought about loading Linux on my laptop (my primary machine at home). However, I need some Windows software, so a total emersion in Linux is not possible. I should state that I hate dual booting. I have done that in the past and it works, but it is inconvenient.

The above foray into using virtualization software to solve our Oracle migration reminded me that I could try and run Linux as my primary operating system and run Windows XP in a virtual machine. Virtualization software is an application that will create a virtual environment, a PC within a PC if you will. Hmm. This would allow me to run Linux with maximum performance as the host, while still having access to my Windows applications running as the guest.

Microsoft has Virtual PC 2007. I have used this in the past, and actually use this at work to maintain test environments and special virtual machines for compiling special programs. It is very handy. Virtual PC does some things very well, while some things not so well. I really like the variable sized hard drive in Virtual PC. When you build a virtual machine you can tell it what size hard drive to use for that instance, yet it will grow as needed. VPC seems to work best with Windows Virtual Machines. Image that! However, it can be used to run most flavors of Linux as well.

VMware is another very popular virtual machine vendor. They have a number of products, including a free application called VMware Player. VMware Player does just that... it plays a virtual machine. You cannot create a virtual machine with VMware Player. You need the VMware Workstation application, which is expensive ($189), to create the virtual machines that VMware Player can use. However, there are tricks around this that allow you to easily build empty virtual machines (see below) that can be run with VMware Player.

I have tried running Linux in a Virtual Machine in the past using Microsoft's Virtual PC. However, some Linux distributions don't work well in Virtual PC. Mardriva 2007.1 for instance will not work. Something about the video. I used to have this problem with Ubuntu, but that seems to not be an issue anymore.

Virtual PC requires that your host operating system be Windows. What I want to try is Linux as the host, so VPC will not be a possible solution. VMware Player is available for Linux. I have been using VMware Player for Windows to build a number of Linux Virtual Machines. The idea here is to get used to Linux and VMware so I can decide which flavor of Linux I want to use for my main machine.

And that is where this will end this month. How do I test a Windows XP virtual machine running in Linux? Stay tuned this is not over yet.

Top

Creating VMware Virtual Machines for Free

So, you are like me and are 1) a cheapskate, and 2) want to use VMware Player to build virtual machines for free. You have come to the right place.

In researching what it would take to build a VMware Virtual Machine I came across easywmx, and it is too easy to pass up. This is a web site that will create the base files for an empty VMware virtual machine for you. You provide a couple of parameters (a name for the virtual machine, the operating system and how much memory and hard drive space you want) and easyvmx provides you a zip file with all the files that make up an empty virtual machine.

There are still a couple of trick you will need. Although you can use easyvmx's Super Simple Virtual Machine Creator to build a virtual machine that will boot off of a Live CD (a CD that can boot and run, many Linux distributions work this way) I found it better to use the easyvmx Virtual Machine Creator and manually point the VM to a Live CD. The Super Simple version does not create a hard drive for your virtual machine, and is not a good way to build a full VM.

Here are the steps to create a new virtual machine from scratch using easyvmx and VMware Player:

Go to easyvmx and click on easyvmx. Enter the name you want to give your virtual machine, the operating system and the memory. There are other options, but this is enough. Scroll down and click on the button Create Virtual Machine. You get a link to a zip file. Just download the zip file and unzip the files into a single folder on your computer. If you run this VM (double click the .vmx file) it will report that no operating system is found.

If you want you can boot from an ISO image. Most operating systems are downloaded as an ISO image file, which is a full copy of a CD or DVD image that you can burn to a disc. But let's save some plastic and boot our virtual machine from an ISO image without burning it to CD.

Edit the your_vm_name.vmx file. Although this is a text file it will not load correctly in Notepad (assuming you are following these instructions on a Windows machine). You need a better text editor such as Notepad++ or else use Wordpad (free with Windows) to edit the file. Look for a set of lines near the bottom of the file that look like this:

# Settings for physical CDROM drive
ide1:0.present = "TRUE"
ide1:0.deviceType = "cdrom-raw"
ide1:0.startConnected = "TRUE"
ide1:0.fileName = "auto detect"
ide1:0.autodetect = "TRUE"

Change cdrom-raw to cdrom-image and change auto detect to the name of a your bootable ISO image. For example, this is what I used to boot the Ubuntu 6.06 Live CD ISO image I downloaded:

# Settings for physical CDROM drive
ide1:0.present = "TRUE"
ide1:0.deviceType = "cdrom-image"
ide1:0.startConnected = "TRUE"
ide1:0.fileName = "ubuntu-6.06.1-desktop-i386.iso"
ide1:0.autodetect = "TRUE"

Make sure the .ISO image is in this same folder as the VM files and run the VM (double click the .vmx file). It will boot the CD (Ubuntu in this case). At this point I clicked on the desktop icon to install Ubuntu. All went flawlessly and it asked me if I wanted to reboot. I did that and it booted into Ubuntu just fine. However, there was one "clitch" for lack of a better word. It booted Ubuntu from the VM's hard drive, but when Ubuntu came up it saw the Live CD. I tried ejecting the CD and rebooting, but it came up the same way. Manually editing the entries above to their original values solved that issue.

What if you don't have an ISO image file? What if you want to boot the virtual machine from a physical CD? That's easy, just modify the .vmx file as follows:

# Settings for physical CDROM drive
ide1:0.present = "true"
ide1:0.deviceType = "atapi-cdrom"
ide1:0.filename = "D:"
ide1:0.startConnected = "TRUE"

Of course, you need to replace D: with the actual drive letter of the physical CD drive you are using. Once you save these setting your virtual machine will boot from the actual CD in your drive and you can install the operating system like normal. Once again, I would re-edit the .vmx file back to the original state after installing the new OS into the VM.

Except for a little editing of a text file it is easy to build and run virtual machines using the free VMware Player. Now I have to experiment with the various flavors of Linux and see which one I like best.

I'll get back to you on that.

Top

Conclusion

That's it for this month. I spent a lot of time with virtual machine software. I have been looking at least 6 Linux versions, and I am looking to see what more I can find. I will report on how the various flavors of Linux stack up for this hard core Windows programmer/user. I will also tell how I setup Windows XP to run in a virtual machine under Linux.

Come back next month (or better yet, subscribe to my newsletter), it looks like we are in for a fun ride.

Upcoming topics:

More On Vitualization
Office/Outlook 2000 on Windows Vista
Switching to a Mac
Dreamweaver vs Expression Web

Bottom