Mark Allen Neil photo

Mark Allen

An online résumé, blog, biography and digital sandbox


An Ubuntu Upgrade Nightmare

Posted 2010-01-18 in Technology

I’ve decided to spend a bit more time doing “web stuff” while in a lull waiting for the next version of the Lumilan touchscreen prototype to become available (I’m acting CTO for Lumilan… but basically a code-monkey). So I booted Ubuntu from my external disk last month… was running Ubuntu 9.04 (Jaunty Jackalope) and since Ubuntu 9.10 (Karmic Koala) was available, decided to upgrade everything.

A huge mistake. The upgrade stopped at 80%, would not restart, “killed” my WinXP boot partition, and in the end I never did get a “good” version of Ubuntu installed. I did get to where I could boot WinXP and Ubuntu, but lost all of the apps and customization I’d done in Linux. I found I could not make the nVidia drivers work… so no bells-and-whistles graphics. And I’m pretty sure what I did end up with was booting an obsolete version of the system kernel.

This left a bad taste in my mouth and I set Ubuntu aside for a month. This journal entry is about my second try to get Ubuntu installed this last week.

Ubuntu Upgrade - Take Two

So last week I decided to try again. I actually took a look at other Linux distributions (Debian, openSUSE, Mandriva), but in the end stuck with Ubuntu as it is “what I know”… not to mention remains the clear leader in the Linux space.

In searching the web for solutions to the installation issues, I learned that (1) most folks upgrading to 9.10 encountered serious issues and (2) experienced users generally do a clean install rather than upgrading. Since I’d (apparently) lost my apps and customization, I figured I’d take the clean install route… formatting the disk to leave no doubts (note that my personal data files were on a separate partition and thus unaffected). So I downloaded the 9.10 ISO, burned a CD and started a clean install.

Installing Ubuntu “Clean”

The install seemed to work correctly, nice user interface, allowed me to select my external drive as the target for the install, define my mount partitions and which to format. When it was finished, the system rebooted (nit: what fool decided auto-eject is a good idea for a CD?). I allowed the system to boot into Windows XP first, just to make sure everything was OK… sadly there were issues.

“Grub Loading”

Once again, the Ubuntu installer decided to install GRUB (in this case, GRUB2) on my main boot drives. This is a big issue for a few reasons…

  1. The installer wasn’t given permission to touch my main hard drive. The install was to an external drive for a reason, as I have a “soft” RAID 0 main disk system. The first time I installed Ubuntu two years ago, the installer failed to recognize that I had a single, striped drive… instead reporting that I had SDA and SDB drives. I came a hair’s breadth of installing on SDA, which would have wiped my Windows install. So I decided then-and-there to buy an external drive for my Linux experience.
  2. Ubuntu 9.10 now apparently installs GRUB2 by default, an admittedly beta product. Not going to grab and hold customers very long if you take something which worked and replace it with something which doesn’t. It was GRUB2 which made the decision to write itself to my main disk system.

Luckily I knew how to get out of this situation, as I’d had this problem the previous attempt at upgrading Ubuntu. I booted Ubuntu from the CD, pulled up an e-mail to a friend where I’d described how to get out of this mess, and issued the following commands:

sudo apt-get install syslinux sudo dd
if=/usr/lib/syslinux/mbr.bin of=/dev/sda

The first command did nothing as syslinux was already installed, the second command replaces the MBR with the universal, free one from the Syslinux Project. I booted again and the system correctly booted into Windows (whew!).

“Error Loading Operating System”

So now to test Ubuntu 9.10. I rebooted and used F12 to bring up a boot menu so I could see if booting from the external drive correctly brought up Ubuntu. Again no luck… this time I got the message “Error loading operating system.” It seems that since GRUB did its magic on my main drive, it didn’t feel the need to make the external drive bootable. I booted from the Ubuntu CD again So back to the web, reading and reading to figure out what to do. What I found was that I needed to manually install GRUB to the external drive, in my case SDC… the following command did the trick.

grub-install /dev/sdc

Updating Ubuntu

I booted into Ubuntu from the external drive and noticed that the first boot screen was scrambled… again, not a great “first foot forward” for this release (I’ll address how I fixed this issue in a bit). Logged in just fine and was happy at this point to have a working Linux again. Soon after logging in, the update manager alerted me that updates were available… so I told it to download and install them. Downloaded 181 packages in total (including GRUB - I looked)… installed them… rebooted. Can anyone guess what happened? GRUB had again overwritten my MBR on my RAID array. So I fixed it, again, manually. I expect this may happen every time GRUB updates… did some reading looking for clear instructions on how to make GRUB look to SDC in the future. I found some hints as to how, but I’ve deferred trying to fix things as I’m worried I’ll permanently screw up my RAID.

Fixing the garbled loading screen

Earlier I mentioned that the loading screen was garbled, as if the resolution being requested wasn’t supported at that time in the boot process. So did some more reading on the web… picked a resolution which I was pretty sure would work (1600x1000) and took the steps which follow. Note that I have a 1920x1200 monitor… so I don’t know why I had to dumb down the resolution. But lowering the resolution did indeed ungarble the screen.

sudo gedit /etc/usplash.conf
...edit the xres and yres properties... save the file...
sudo update-initramfs -u

There was one high note (pun intended)

At this point, Ubuntu seemed to be working properly. I’d read that support for my Soundblaster X-Fi card had been integrated into 9.10… this was a royal pain to get working in 9.04. So I fired-up Firefox and went to YouTube and played a video. I was asked to install the Adobe Flash player (which I did) and then I selected a video at random.

Sound worked out of the box.

So in the end the upgrade wasn’t all bad.

Next on the ToDo list

I now have to get my system running AMP again, configure Apache for virtual hosts, and get Symphony and my other websites running locally. So why not document it and share it here?

Stay tuned for more articles.

Website Credits | Symphony | Fluid 960 Grid System