bradubuntu linux

My experience setting up a computer with Ubuntu linux

07 February 2006

Step 2: Configuring X

X is the name of the graphics system that Ubuntu uses. I use an NVIDIA GeForce FX5200 graphics card from EVGA, and I output video to the TV using the s-video hookup. When I booted up linux for the first time, X crashed and left me with a text prompt. So I had to run over to Kelly's computer to look up how to try and start up X again. The command turned out to be startx.

Now I had the familiar ubuntu desktop. Apparently, X turned off 3D mode and was using 2D mode. Before I did anything else, I wanted to run the two commands that everyone should at first boot:
sudo update
sudo upgrade

These commands checks for updates for all software on the computer and then upgrades it if needed. But the way, sudo just means run the command with root (super user) privileges. For example, gedit file (if file is a configuration file) will open the file in a simple text editor in read-only mode, but if you use sudo gedit file, then you can edit it as well.

I knew that NVIDIA released linux drivers for graphics cards, but they also came with their own installer. Part of the beauty of ubuntu is that you can install all programs from a special software repository and it has been tested to work. This webpage tells how to do it the right way. However, X still wouldn't work, and it would keep running in 2D mode, and the TV output was all scrambled. Looking at the log file (/var/log/Xorg.0.log) it appeared that X was using the linux "nv" drivers rather than the official "nvidia" drivers. Now it was time to edit the configuration file (/etc/X11/xorg.conf).

I already had a backup from the previous step, so I did
sudo gedit /etc/X11/xorg.conf

and found the section about "Devices" and changed "nv" to "nvidia". Then I saved and rebooted X (Crtl+Alt+Backspace).

CRASH!

startx wouldn't even work. I had to restore the backup file before I could get X working again
sudo cp /etc/X11/xorg.conf_backup /etc/X11/xorg.conf

After searching for about an hour online, I found this website explaining in more detail how to install the drivers. Long story short, I had to go back to /etc/X11/xorg.conf and fine the "Modules" section. In the long list of modules to load, I had to find
Load "GLcore"
Load "dri"

and comment them out
#Load "GLcore"
#Load "dri"

Then the NVIDIA drivers are loaded and X starts fine. Now to configure TV output...


Step 1: Install!

I just want to start off by saying installing a linux system is a pain for a newbie. I downloaded the install ISO CD from the Ubuntu website, but there was an error during the file transfer. But I didn't figure that out until I was in the middle of the installation. Luckily, when the install program craps out, it gives you an option to check the CD for errors. The second time I downloaded the ISO, everything was correct.

One of the most important steps during the install was partitioning the hard drive. I wanted to be able to boot both linux and Windows XP, because I still do alot of stuff in Windows. But the Windows partition took up the whole hard drive. Luckily, the Ubuntu installer has a partitioning program. So here's how I went about it: First, I ran the WinXP disk cleanup utility on all accounts, and then I defragmented the hard drive. This cleared up a lot of space and compacted everything nicely to the front of the hard drive. Then I rebooted the computer with the Ubuntu install CD. When the partitioning part came up, I selected to edit the partition tables manually, because all the auto options would delete everything on the hard drive. Looking at the partition tables, I wanted to free up space on the drive, known as hda1 so I reduced the partition size from 40 GB to 30 GB. I saved these options and went back to the auto configuration menu. Now there was a choice to format the remaining space on the drive, and I selected that one. It made a 9.5 GB linux partition (hda2 and a 0.5 GB swap partition (virtual memory). I also had to manually tell it to put the root directory (/) on that partition. Then I let it do its work.

After installing the base system and programs, the next big step was the boot loader, the program that tells the computer which operating system to load. Both Windows and linux have boot loaders, but I wanted to use the linux one (GRUB) for now because the partitioning program had selected the linux partition to boot from. All hard drives have a bit of space at the front reserved for booting, called the master boot record (MBR), but I heard bad things about overwriting the MBR once Windows has been installed. So when the boot options have up in the installer, I selected to use GRUB and to put it on hda2 instead of the MBR. My motherboard is relatively new, so I didn't have to worry about having to put the boot loader at the beginning of the hard drive. It works fine for me having it 30 GB into the hard drive.

Most of the install was simple (when the CD was error-free, that is), but, when I tried to boot up linux for the first time, the X system wouldn't work, and I ended up with just a text prompt...

My Ubuntu Linux Experience = MULE

Although I've had a bit of experience with Unix and Linux in the past, and even installed Red Hat 9 on an old computer once, I'm pretty much a complete newbie when it comes to Linux. I just installed Ubuntu linux on my computer at home because it's the first distribution I've heard about that is "supposed" to be geared towards desktop computers (rather than servers). As a reference not only for me but for others as well, I thought I would begin a blog about it.