# CD drives not detected at boot

## paulskin

My apologies if I bugger up any of the terminology, I'm no expert.  :Confused: 

I've just done a successful install of 2005.0 from the CD, (stage 3 and genkernel out of cowardice), but now I can't seem to find my CDroms.

There's no sign of them in dmesg, lspci is as follows:

0000:00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 01)

0000:00:01.0 PCI bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE Host-to-AGP Bridge (rev 01)

0000:00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)

0000:00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)

0000:00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)

0000:00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01)

0000:00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 81)

0000:00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 01)

0000:00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 01)

0000:00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01)

0000:00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)

0000:01:00.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4 MX 440] (rev a3)

0000:02:02.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

0000:02:09.0 Communication controller: Conexant HSF 56k HSFi Modem (rev 01)

0000:02:0a.0 Ethernet controller: Linksys NC100 Network Everywhere Fast Ethernet 10/100 (rev 11)

I have the correct entries, I think, in /etc/fstab, I was going for the enable one at a time option to make life less complicated:

/dev/hda1               /boot           ext2            defaults,noatime        1 2

/dev/hda2               none            swap            sw                      0 0

/dev/hda3               /               ext3            noatime                 0 1

none                    /proc           proc            defaults                0 0

none                    /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

/dev/fd0                /mnt/floppy     auto            noauto,user             0 0

/dev/cdroms/cdrom0      /mnt/cdrom      auto            noauto,user             0 0

Also I appear to have the right devices in /dev :

root@PC1 dev # ls -l /dev/cdroms/

total 0

lrwxrwxrwx  1 root root 6 May 24  2005 cdrom0 -> ../hdc

lrwxrwxrwx  1 root root 6 May 24  2005 cdrom1 -> ../hdd

They were both detected OK by the live CD, so I'm fairly sure they both work physically.

The PC is an emachines 570, unfortunately.

Hope someone can help.

Paul

----------

## adaptr

What do you mean by "can't find my cdroms" ?

```
dmesg | grep "hd[a-d]"
```

If you don't have mount points in /mnt then you have to make these first.

----------

## paulskin

I meant "There's no sign of them in dmesg" as I believe I said, although not wanting to clutter the original post with too much info at once.

root@PC1 dev # dmesg | grep "hd[a-d]"

Kernel command line: root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev

    ide0: BM-DMA at 0x1860-0x1867, BIOS settings: hda:DMA, hdb:pio

hda: ST3120022A, ATA DISK drive

hda: max request size: 1024KiB

hda: 234441648 sectors (120034 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)

hda: cache flushes supported

 hda: hda1 hda2 hda3

ReiserFS: hda3: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on hda3

EXT3 FS on hda3, internal journal

Adding 506036k swap on /dev/hda2.  Priority:-1 extents:1

EXT3 FS on hda3, internal journal

As for mount points: 

root@PC1 dev # ls /mnt

cdrom  floppy

Unfortunately the distinguishing of "relevant info", is not so easy if I don't know which info is relevant, hence my request for help.

root@PC1 cdrom # arch

i686

root@PC1 cdrom # emerge info

Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r9 i686)

=================================================================

System uname: 2.6.11-gentoo-r9 i686 Intel(R) Celeron(R) CPU 2.00GHz

Gentoo Base System version 1.4.16

Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May 20 2005, 20:26:02)]

dev-lang/python:     2.3.5

sys-apps/sandbox:    [Not Present]

sys-devel/autoconf:  2.59-r6, 2.13

sys-devel/automake:  1.9.5, 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3

sys-devel/binutils:  2.15.92.0.2-r7

sys-devel/libtool:   1.5.16

virtual/os-headers:  2.6.8.1-r2

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CFLAGS="-O2 -march=i686 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"

GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk ftp://mirrors.blueyonder.co.uk/mirrors/gentoo http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"

USE="x86 X alsa apm arts avi berkdb bitmap-fonts cdr crypt cups curl dvd eds emboss encode esd fam foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal imlib ipv6 jpeg libg++ libwww mad mikmod motif mozilla mp3 mpeg ncurses nls nvidia ogg oggvorbis opengl oss pam pdflib perl png python quicktime readline sdl spell ssl svga tcpd tiff truetype truetype-fonts type1-fonts vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"

Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

Does this help you help me?

----------

## Scarlet Pimpernel

He means have you made dummy subdirectories for each partition inside /mnt ?

like: /mnt/cdrom, /mnt/idedisk2 etc.

----------

## paulskin

Does

 *Quote:*   

> root@PC1 dev # ls /mnt
> 
> cdrom floppy 

 

not cover this?  Or do I need to make /mnt/cdrom/cdrom0 or something?

Will this make any difference if the devices don't show up in dmesg in the first place?

----------

## adaptr

No, it won't.

If the kernel says no cd-roms then that's it.

You've probably left them out of your kernel config:

```
grep -i cd /usr/src/linux/.config
```

I could swear the dmesg bit wasn't in your post before  :Wink: 

----------

## paulskin

 *Quote:*   

> I could swear the dmesg bit wasn't in your post before 

 

It was, but I may have slightly negatively misconstrued the tone of  your first response, sorry.  :Embarassed: 

Thanks for replying.

I just went along with genkernel for the sake of laziness, I thought it said something about replicating the livecd setup, which detected both cdroms perfectly?

root@PC1 cdrom # grep -i cd /usr/src/linux/.config

CONFIG_PARIDE_PCD=m

CONFIG_CDROM_PKTCDVD=m

CONFIG_CDROM_PKTCDVD_BUFFERS=8

# CONFIG_CDROM_PKTCDVD_WCACHE is not set

CONFIG_BLK_DEV_IDECD=y

# SCSI support type (disk, tape, CD-ROM)

# Some SCSI devices (e.g. CD jukebox) support multiple LUNs

# Old CD-ROM drivers (not SCSI, not IDE)

# CONFIG_CD_NO_IDESCSI is not set

# CONFIG_BACKLIGHT_LCD_SUPPORT is not set

CONFIG_USB_ARCH_HAS_HCD=y

CONFIG_USB_EHCI_HCD=m

CONFIG_USB_OHCI_HCD=m

CONFIG_USB_UHCI_HCD=m

CONFIG_USB_SL811_HCD=m

CONFIG_USB_CDCETHER=y

# CONFIG_USB_LCD is not set

# CD-ROM/DVD Filesystems

Does this mean a kernel recompile?  Is there a link to a simple but comprehensive guide to doing this?  What do I need to ensure is set?

Sorry about all the questions, I'd like to get this right.

On the positive side I think I've learnt a lot more about the workings of Linux in the last week or so than I have in 5 or 6 years of Debian use, most of the documentation is both informative, and actually works!

----------

## adaptr

There is no hard-and-fast guide for configuring your own kernel - too much depends on your hardware and specific intention of use.

I certainly recommend experimenting - if you follow a few simple rules not a lot can go wrong  :Wink: 

Use the kernel source's own "make install" routine!

I cannot stress this enough - I certainly don't understand why the Handbook doesn't recommend it.

If you use it, automatic backups will be made of any old kernels and it will always name the kernel, config and system.map appropriately for that kernel build (a rebuild will rename the old files to *.old)

And it will automatically update either grub.conf or lilo for you, as well!

If you add a second kernel option in your boot menu pointing to vmlinuz.old instead of vmlinuz you can always boot the previous kernel from the boot menu...

----------

## paulskin

OK, I'm off to try it, what worried me initially is that my knowledge of the exact specification of my hardware is a little sketchy.

Am I right in thinking that I  can just start with my current setup and then add or subtract options as needed, rather than starting from scratch, which is a bit daunting?

I take it that the glaring omissions after  *Quote:*   

> CD-ROM/DVD Filesystems

  means that support wasn't compiled in by genkernel as I expected?

Thanks for the help, when I get it working I'll let you know.

----------

## adaptr

Yes, just start with the current config and prune away  :Wink: 

Take care not to change too much at once, or you won't know what broke it...

 *Quote:*   

> I take it that the glaring omissions

 

No, it's just that none of the CD filesystems have "cd" in the name  :Wink: 

The hardware has, though - that's why I wrote it like that.

----------

## paulskin

I understand if people are too busy for this, but I'd like to get some clarification if I can.  I've been RTFMing all morning and am close to getting sacked I think  :Very Happy: 

There seem to be a lot of different ways of recompiling the kernel, what I would like to do is compile a new kernel (or several) to get my cdroms working, whilst being able to switch back to the current working version if necessary, I've got as far as:

 *Quote:*   

> # cd /usr/src/linux
> 
> # make menuconfig
> 
> # make && make modules_install (which throws up some nvidia related warnings)

 

from the handbook, but I'm concerned that copying the bzimage,system.map and .config over as described will wipe out my existing configuration.

I like the sound of using the kernel sources own make install routine, but don't know what to do.  

I don't need any help with make menuconfig, I can happily bugger up the options for myself, just the best way to proceed with the compilation and installation.

----------

## adaptr

```
mount /boot

cd /usr/src/linux

make install
```

Then, when using GRUB (highly recommended!), add a copy of your current kernel line in grub.conf and modify it to read

```
kernel=/vmlinuz etc.
```

so it points to the newly created symlink.

make install never overwrites any files in /boot.

You can add as many different kernel choices as you like - never throw one away that you might need later!

----------

## paulskin

I'm sorry about this, hopefully my ignorance will help someone else.

This is why I've avoided kernel configuration in the past.  

Once again I'm lost in a sea of code snippets and definitions, few of which I understand.

What I was hoping for was something like:

 *Quote:*   

> 
> 
> Step 1 # cd /usr/src/linux
> 
> Step 2 # make menuconfig
> ...

 

My grub.conf looks similar to the one in the handbook:

 *Quote:*   

> 
> 
> default 0
> 
> timeout 30
> ...

 

vmlinuz??????

I've already done "make menuconfig" and "make && make modules_install ", can I carry on logically from here, or easily scrap it and start again?

Thanks again.

----------

## Rad

No I think you got it. The other guy is just telling you of a bit of a simper sequence, where your "Steps" 3-5 are done by make install. The kernel that's copied by make install is named vmlinuz, which is just a filename. Meaning it's not important how that file name goes, but that grub knows it. Hence the vmlinuz line for grub he also mentioned.

Don't be worried, the way you outlined looks fine, tho I'm not entirely convinced you need initrd so far...  :Smile: 

----------

## adaptr

Step 0: unplug, go down to pub in advance, save 5 hours of frustration.  :Wink: 

Don't mess around with initrd; you don't need it.

----------

## paulskin

OK, thanks to all.  I'll give it a go.

Looks like a piece of cake  :Shocked: 

I might yet bore you with the outcome.

----------

