Search Tillamook Rage
Google Custom Search

1.04.2008

The Case of the Disappearing CD/CD-R/DVD Drive in Ubuntu (Xubutnu)

You might be interested in this post if you have a Feisty (7.04) version of Ubuntu or one of its derivatives and your CD/CD-R/DVD drive has disappeared. This problem manifests itself in different ways for different reasons and is kind of a pain to stamp out. This procedure has not tested on motherboards with SATA drives, but should solve the problem. In case you're interested, the problem stems from an issue with the libata driver that's built into the kernels used in the 7.04 (Feisty) versions. The libata library has been reverted in the later kernels that versions 7.10 and later have, so the problem has gone away.

This procedure was developed using Xubuntu 7.04 Feisty Fawn, but should work equally well for any Ubuntu derivative provided you know the locations of the applications (or their alternative applications) that I mention.

As always, please be careful following procedures from this or any site as they can leave you with a system that's damaged and a pain to fix if a mistake is made.

Intro
If you're like me, you appreciate a good mystery or magic trick, but not if it involves a vanishing piece of hardware that you use frequently. I've had problems with this for awhile and have just now gotten around to getting a good solution figured out. In this post I'm going to give you 3 different ways to solve the problem, ranging from a simple (but temporary) band-aid that should work, to installing a brand new kernel that fixes the problem permanently. If you're interested in a quick fix without much pain, read the first two sections, and if you're interested in the more involved but clean fix, read the last section.

Method 1: The Band-Aid
This method consists of leaving a CD in the drive every time that you shut your computer down. It's not a guaranteed fix, but it's easy to try. The CD you leave in the drive can be a music CD or a data CD, but I wouldn't use a bootable CD because you'll have to exit the boot menu every time. When the kernel checks the drive and sees a CD, it will recognize the drive and you'll be good to go once your Ubuntu system boots up. Just make sure that the CD is in the drive everytime you start the computer.

Method 2: The System Upgrade
Method 2 requires you to upgrade from Ubuntu (Xubuntu) 7.04 to 7.10. To do this go to Applications > System > Update Manager (in Xubuntu). Once the Update Manager window comes up, you will see an Upgrade button next to the text New distribution release '7.10' is available. Click this button and follow the instructions.

Method 3: The Kernel Upgrade
This method is not for the easiest one here, but is a good option if you have the fortitude. We're going to cheat and borrow the kernel from the Gutsy repository to get Feisty working correctly. Open the Software Sources dialog (Applications > System > Software Sources) entering your administrator password if prompted. Click the Third-Party Software tab and then click the Add... button. Type or copy deb http://archive.ubuntu.com/ubuntu/ gutsy main restricted into the window that comes up (Figure 1) and click the Add Source button.

Figure 1

Now click the Close button on the Software Sources dialog and click the Reload button on the dialog box that pops (the one that says your software sources are out of date). Once the Software Sources dialog closes, you're ready for the next step. Open a terminal window (Applications > Accessories > Terminal) and type or copy the following commands (you can right click on the terminal window to get the paste option), hitting the Enter key after each line. And yes, the second command starting with sudo is all one command. I would suggest copying and pasting that one.

sudo apt-get update

sudo apt-get install linux-backports-modules-2.6.22-14-generic linux-headers-
2.6.22-14 linux-headers-2.6.22-14-generic linux-image-2.6.22-14-generic linux-restricted-modules-2.6.22-14-generic linux-ubuntu-modules-2.6.22-14-generic

If you're reading this quite a while after I've written it, you may want to check which kernel is currently available in the repository by opening a web browser and navigating to http://archive.ubuntu.com/ubuntu/dists/gutsy/main/binary-i386/Packages.gz and searching for linux-backports-modules - checking the version number. The format that you're looking for should be something similar to the one above (2.6.22-14). Just substitute the version number that you find for the one in the second command above.

The last thing you need to do is to remove the Gutsy repository from your Third-Party Sources. This prevents any Gutsy updates that will break your system from creeping in later. Open the Software Sources dialog (Applications > System > Software Sources) entering your administrator password if prompted. Click the Third-Party Software tab and then click on the Gutsy deb entry (Figure 2) and click the Remove button.

Figure 2

Now click the Close button on the Software Sources dialog and click the Reload button on the dialog box that pops up (the one that says your software sources are out of date). Once the Software Sources dialog closes, you're finished.

You should now be all set. By upgrading the kernel you'll fix your disappearing CDROM/CD-R/DVD drive problem and you'll also get some really nice features like network hotplug too. Reboot your computer and enjoy!

No comments: