Friday, December 12, 2008

Turning a Linux-Only Laptop into a Linux-Vista Dual Boot

Princeton University bought me a shiny new Dell Latitude D630 laptop back at the beginning of the school year, complete with Windows Vista Home Edition. I immediately overwrote the default windows install with XUbuntu 8.04 Hardy Heron. This was a very interesting process, but I was busy with school and didn't have time to write about it on here.

Running a Linux-only computer has definitely taught me a lot more about Linux than I would otherwise have learned, but there are still some things that are just easier and faster for me to do on Windows. For that reason, I decided to turn my XUbuntu-only laptop into an XUbuntu-Vista dual boot. A straightforward way to do this would be to use the Vista restore CD that came with my computer, clobber my XUbuntu system while installing Vista, leave an open partition for XUbuntu, and then reinstall XUbuntu into that partition. But I'd already invested a lot of time into my existing XUbuntu install, so I looked for a way to add a partition and install Vista to it, all without ruining my current XUbuntu install.

An internet search revealed a page that clearly describes the process. I attempted to follow these directions but ran into problems almost immediately, during the disk repartitioning using the XUbuntu LiveCD. For some reason, the LiveCD's disk partition utility threw an error when trying to shrink the existing XUbuntu partition to make room for a new Vista partition. A quick Google search seemed to suggest that this is a common problem with Ubuntu LiveCDs, so I tried the following alternate approach.

I downloaded the GParted LiveCD, which is basically a small Linux distro that includes the same graphical partition editor used in the XUbuntu LiveCD and not much else. When I booted from this CD and followed the instructions on the above site, I was able to successfully decrease the size of the XUbuntu partition.

Now it was time to install Vista. Here again, I had to deviate slightly from the instructions on the web page. In my version of the Windows install CD, when I get to the "Where do you want to install Windows?" dialog, the correct course of action was not to hit Shift-F10, but to select "New" to create a new partition. I didn't change the default partition size; it automatically filled up the allocated space created earlier. I then selected "Format" to format the new partition, then followed the steps starting with the Shift-F10 command from the article. Finally, and this doesn't really make sense, I had to click the back arrow to leave the "Where do you want to install Windows?" dialog, then enter that dialog once again, before finally selecting the new partition as Windows' install location. Until I did this, Windows would say it was unable to install to that partition.

Many minutes later, I had what looked like a working instance of Vista. Now it was time for the final step: restoring my original, clobbered Grub bootloader so that I could choose with OS to load. This was the second of the two options provided by the above website; the other was to configure the Vista bootloader to boot from either XUbuntu or Linux. I followed the instructions to reinstall Grub and was relieved to successfully boot into my original, unharmed XUbuntu install. As per the instructions, I then edited the Grub configuration file to include Vista as a boot option. Aside from general configuration of Vista and installation of Windows drivers, I had successfully turned my XUbuntu-only computer into an XUbuntu-Vista dual boot without having to reinstall XUbuntu!

Saturday, August 30, 2008

CD Drives, Widescreen Movies, and VLC Media Player

Last night I decided to test out my new widescreen monitor by watching a movie on it. I inserted the DVD, only to find that my CD player made strange clicking noises without ever actually reading the CD. Apparently, my CD drive can't read DVDs. Luckily, my old HP computer has a DVD drive, so I swapped that one into my main Dell computer. This is pretty simple; a CD/DVD drive has only two ports that need to be connected: one big gray cable, and a small plug with 4 wires coming out of it. Once this was done, I booted up my Dell computer, inserted the DVD, and this time the computer could read it.

However, I still couldn't watch the movie, because my computer doesn't have a DVD decoder installed. This is apparently a necessary piece of software to watch DVDs -- without it, Windows Media player can't play them. So I installed VLC Media player, a freeware player with its own DVD decoder.

One thing to note about VLC is that it takes a pretty long time -- maybe a minute or so -- to read the DVD before it starts playing. At first I thought it was freezing, but after waiting a little longer, the movie finally started playing. I right clicked on the movie and selected fullscreen mode from the pop-up menu. However, I was confused about one thing. Despite the fact that my screen resolution is set to a 9:16 ratio, the widescreen movie still had black bands at the top and bottom. Apparently, the aspect ratio of widescreen movies is more like 5:19. I found this mildly annoying, because I was expecting to see my entire screen filled up by the movie.

Luckily, VLC media player contains a few options for dealing with this on the menu that appears when you right click on the movie. There are submenus for forcing the aspect ratio to a particular value, such as 4:3, but this will distort the image. Alternatively, you can crop the image to a particular aspect ratio, which avoids distortion, but prevents you from seeing some areas near the edge of the image. I chose to crop the aspect ratio to 10:16, which made me lose a bit of the left and right edges of the movie, but it increased the overall size of the movie on my screen. Finally, I was able to watch Neo and Agent Smith battle it out in a suitable format.

Thursday, August 28, 2008

High Resolution and DPI (Dots per Inch)

Yesterday I upgraded the old CRT on my main Dell computer to an Acer AL2216WBD 22-inch widescreen LCD monitor, which cost $200 with free 3-day shipping on newegg.com. (An identical offer was available on tigerdirect.com, but the monitor is currently out of stock on that site.) I decided to make this upgrade for three main reasons:

1. The LCD monitor takes up much less space on my desk.
2. More screen area means more efficient work and better gaming.
3. The ability to watch widescreen movies and TV shows on DVD, while avoiding the much higher cost of a high-definition TV.

Setting the screen up was pretty straightforward -- I plugged it in to the monitor port of my video card, and it worked. However, the image was distorted, because the resolution was set to the 4:3 ratio of 1024 by 768. A quick trip to the Nvidia control panel (accessible by right clicking on the desktop) allowed me to change the resolution to the maximum possible 16:9 ratio of 1680 by 1050. (This can also be done by right clicking on the desktop, selecting "Properties," and going to the "Settings" tab.)

The image was now properly proportioned, but the text and icons were a little smaller than I preferred. I tried decreasing the resolution to other 16:9 ratios like 1600 by 900, which increased the size of the text and icons, but it also caused the text in certain fonts to appear somewhat distorted -- some vertical lines in letters were wider than others, etc.

So I looked for a way to keep the resolution high but increase the size of Windows text and icons. From the "Settings" tab of the Display Properties window (accessible by right clicking on the desktop and selecting "Properties," you can click the "Advanced" button in the lower right. In the window that pops up, you will see a listbox for "DPI Setting." This stands for "Dots per inch," and it allows you to increase the text size as if the screen were at a lower resolution. I changed my DPI from the default value (96) to the larger preset value (120). (There's also an option to choose your own custom DPI setting.) After a restart, everything looked larger, and the text wasn't distorted like it was when I set a lower screen resolution. Problem solved!

Wednesday, August 27, 2008

Introduction

Hello. I'm a graduate student in computer science at Princeton University. I'm also a video gamer and internet surfer. All in all, I'm around computers a lot, and I spend a lot of time customizing, installing, and getting stuff to work in general. My dad suggested making a blog where I describe my computer experiences, so that people who are having similar computer problems might find some useful hints. This is that blog.

I'll start by describing my computers and what I use them for. My main computer is a Dell Dimension 2400 with a Pentium 4 2.66 GHz processor, 1 Gb RAM, SoundMAX integrated sound card, and Nvidia Quadro FX 5500 video card with 128 Mb RAM. The monitor is an HP mx70 CRT, and the operating system is Windows XP service pack 2. I consider the main use of this computer to be games, specifically simulations such as Microsoft Flight Simulator 2004 and the freeware space simulator Orbiter. I use the computer for schoolwork as well, but I really prefer a Linux environment for work, so I have Cygwin installed to provide a Linux-like environment.

My backup computer isn't plugged in right now, so I can't provide exact specs, but it's an older HP Pavilion with a Celeron 1.8 GHz processor. It ran XP for a long time; I then tried Gentoo Linux but found that I was forced to spend too much time installing programs rather than using them. So it is now running XP again.

I'll soon be getting a new computer from Princeton, a Dell laptop running Windows Vista. I don't know what the specs are, but I'm considering formatting the disk and installing Debian Linux, which I found very useful on my research lab computer in college.

So those are my computing machines. Future blogs will describe all the problems I will surely have as I try to improve their software, hardware, and performance.