Saturday, 27 November 2010

Gentoo DVD drive setup problems

This is not meant as a guide that will fix everybodies DVD/CD problems, it was the solution that worked for me, if you still have issues then I recommend consulting the Gentoo Forums.

After gaining some recent bad advice from a 'well meaning' helper on a forum I recently managed to totally render the portage setup useless to the point where I couldn't install anything. After hours and hours of consulting with others on line and attempting a variety of fixes, the conclusion was reached that I would probably be just as quick rebuilding Gentoo from scratch.

Having completed this task already in November 2009 and with a years experience under my belt and a lot of extra libraries etc on my machine I figured that a fresh install would have my Gentoo system running even faster.

The first time I compiled my first Gentoo OS I made a lot of written notes, these were very useful and I would highly recommend anybody starting Gentoo for the first time to do this as these were invaluable the second time around. These can save time and help avoid falling into the same pitfalls twice.

Upon launching into my new Gentoo system complete with Gnome graphical environment I thought that everything was just about back to normal. One major problem though: both of my DVD drives were listed as Unnamed Drive. Neither were behaving like a DVD drive, any time I tried to eject they simply shut again immediately and I couldn't use any programs that made use of the drives eg Brasero, mplayer etc.

To compile the kernel I took the chickens way out and used Genkernel so I assumed that a lot of the default settings would be right and that the Gentoo Handbook would guide me. At this point can I please state that the Gentoo Handbook is an invaluable, well written guide when installing Gentoo. However there is one point that needs updating:

When using Genkernel with IDE drives the default setting selects:
Device Drivers ---> <*> ATA/ATAPI/MFM/RLL support (DEPRECATED) --->

This is obsolete and causes problems with udev which is designed to make your life easier. For udev to function properly we need to move to libdata. As I had already created the kernel I had to edit it by typing the command:
genkernel --menuconfig all

To rectify this I removed the * by highlighting it and pressing N.
Secondly I moved the cursor down to highlight
SCSI device support --->

and setup as follows by pressing Y to select (* will appear) or N to deselect

│ │ < > RAID Transport Class
│ │ -*- SCSI device support
│ │ < > SCSI target support

│ │ [*] legacy /proc/scsi/ support

│ │ *** SCSI support type (disk, tape, CD-ROM) ***
│ │ <*> SCSI disk support

│ │ < > SCSI tape support
│ │ < > SCSI OnStream SC-x0 tape support
│ │ <*> SCSI CDROM support
│ │ [ ] Enable vendor-specific extensions (for SCSI CDROM)
│ │ <*> SCSI generic support
│ │ < > SCSI media changer support
│ │ [*] Probe all LUNs on each SCSI device
│ │ [ ] Verbose SCSI error reporting (kernel size +=12K)
│ │ [ ] SCSI logging facility
│ │ [ ] Asynchronous SCSI scanning
│ │ SCSI Transports --->
│ │ [ ] SCSI low-level drivers --->
│ │ < > SCSI Device Handlers --->
│ │ < > OSD-Initiator library

I know that your thinking, wait a minute, my drives are IDE/PATA not SCSI. The IDE command set was evolved from SCSI and is now being merged back with it.

now exit genkernel and wait for a few minutes for it to complete. Then I entered the command:
nano -w /etc/fstab

Now comment out anything that includes the DVD/CD drives by placing a # at the start of the line. Then change all of the drives labelled hda, hdb, hdc... etc to sda, sdb.sdc.... etc. If you have a combination of IDE and SATA then the IDE will be labelled first and the SATA drives second. So if you previously had 2 IDE and 2 SATA drives then previously they may have been labelled hda, hdb, sda, sdb. However this will now be changed to sda, sdb, sdc, sdd with your IDE drives being labelled sda & sdb and your SATA drives now getting labelled sdc & sdd. Exit and save.

Finally the last step is to modify your GRUB menu entry if you've set a separate partition for /boot.

If you are using Grub Legacy then type:
nano /boot/grub/menu.lst

On the line it will have the command The (real_)root=/dev/hda... this will need to be changed to /dev/sd...

Restart your system and all of your DVD/CD drives should now be functioning as expected. This problem caused me three days of grief. Hopefully it may provide the answer that some of the other users may be looking for.

No comments:

Post a Comment