Step 3: Install Ubuntu

April 29, 2007

Finally it was time to install Ubuntu to the newly created partitions. I booted to the Ubuntu CD and …

wait … what’s going on? Why am I in 640×480 mode? It’s always been fine before.

Did I accidentally choose safe graphics mode? Sure – that’s what I must have done.

So I rebooted and made doubly sure I selected the proper startup option. This is looking much better … wait … the screen just flashed. I’m in 640×480 again. Perhaps it’s just a configuration problem. System -> Preferences -> Screen Resolution … yup … 640×480 – so I’ll just select the drop-down l…

There are no other options.

Why do I care so much? Because the Ubuntu installer does not run properly in 640×480 because the control buttons (forward, back, etc) are not visible – the windows are too large and they do not have the option to scroll.

I went through this dance twice before actually choosing to start in the graphics safe mode.

Well in safe graphics mode it worked as expected! 1280×1024 resolution. I have no idea what happened. I’m going to call it an anomaly and not worry about it. I don’t know enough about Ubuntu to assume it was anything other than user error.

Since I was in a decent resolution I ran the installer by using the “Install” link on the desktop.

Installing was a breeze. I had to pick my timezone, keyboard info, create an account for myself, and manually configure the partitions I created earlier. Then about 20 minutes later the installation was complete.

I rebooted and was greeted by a new boot loader that let me choose between a few Ubuntu options and Windows XP. Exactly what I hoped for.

I booted to Ubuntu, logged in using the account I created, opened a terminal window and created a symbolic link from a directory under /media/sda5 (the shared drive – it took me a little while to find the proper location) into my home directory. Now I can easily share data between the two systems.

Oh – and my NTFS drive is mounted too so I guess that was unnecessary but I’m glad to have done it since it was a good learning experience.

Now that it’s working – its time to move on to the next pet project.

My work attitude towards reformatting is that it should be done as often as necessary – and that is quite often. Every 3-4 weeks or so. IT should provide boot installation services to make this trivial. Network document storage makes this easy. Checking in your code to a private branch makes this easy. Your machine might bork out tomorrow. You shouldn’t fear losing weeks of data.

But at home it’s not quite that easy. My wife and kids rely on the machine for their personal projects and school work. I can’t reformat the system and start from scratch and I wanted to avoid buying a second drive if I could (Circuit City has new laptops for under $400 – why would I want to spend half of that just to get Linux running?).

My current configuration is a 140GB drive that is in a single NTFS partition. It is about 30% full.

The goal was to move everything to the front of the disk, boot to Ubuntu Live CD and figure out how to resize the partition.

I started by running the XP disk cleanup wizard. I’m not a huge fan of this but it consolidates several things I knew I wanted to do into a single action so I could spend my time outside grilling. I also cleaned out my non-system temp directory and uninstalled a few programs that weren’t wanted. This freed up another few gigs and increased the odds of good defragmenting.

I loaded up the XP defrag tool and let it run. Unfortunately it let a few unmovable files in bad places (last quarter of the partition). The size of the unmovable block looked to be at least a gig – it had to be the pagefile (I already have hibernation and restore disks disabled). So I disabled the pagefile and rebooted. After booting I was able to defrag everything except for one thin red line (fragmented file) – it just would not move from the last quarter of the partition. It occurred to me that the file was probably also unmovable but the UI had to pick one color to render. The only thing I could think of was the virus scanner. So I pulled the network cable and disabled the virus scanner and – not surprisingly – the next defrag pass worked like a charm.

I quickly shutdown and booted to Ubuntu.

I did some reading and found several sites that suggested I use qtparted to resize the NTFS partition. Since the live cd does not include qtparted I figured out how to install it –

> sudo apt-get install qtparted

That worked great. I was able to run it and resize the partition (I did not create the new partitions yet). I trimmed off 42 GB from the backend for Linux and shared FAT32 space.

Experienced readers and now laughing and saying “poor newbie didn’t know that a better version of qtparted, called GNOME Partition Editor (gparted) is already installed on the live CD”. Yeah – I found it later. I used it to create the partitions (qtparted was not able to create the extended partition – I have 5 partitions so they couldn’t all be primary).

I rebooted to XP to ensure that everything was still good there – it went through a CHKDSK cycle which went fine and then it needed to reboot once right after starting (I suspect it recognized the drive as a new drive and had to update the hardware configuration). No problems.

Oh – I did backup all of our critical data to DVD before doing any of this.

Finally I was ready to create the new partitions in the newly allocated space. I had 42GB and used this allocation:

/dev/sda2 30GB (ext3)

/dev/sda3 2GB (linux-swap)

/dev/sda5 9+ GB (FAT32)

/dev/sda4 is the root of the extended partition so it does not show up in the list – it is the parent of sda5.

I hope that these were good sizes – they seemed reasonable to me. Only time will tell.

Next step … install Ubuntu.