# urgent! cdrom-devices gone

## BeaTtheMeaT666

Hi,

I've got a big problem. Last week one of my harddrives (hda) failed. I had the /boot partition on it (which i could backup) , swap and my /home.

the gentoo installation was on hdb.

so, i installed the old hdb as hda, restored backup of my old /boot on this disk, added a swap partition.

then i booted from the gentoo-cd, and edited fstab to mount everything from hda instead of hdb and /home via nfs.

i didn't change hdc and hdd which are cdrom and burner.

now, when i boot, everything is fine, but there are no devices for the cdrom and burner. when the kernel boots, it detects hdc and hdd, but 

after init there are no devices. i have scsi-emulation on both devices, but there are no scsi-devices either.

can someone please help me with this mess?

thanks in advance,

Bobo

----------

## Deathwing00

I suppose you are using lilo and added at the top of the file 

```
append="hdc=ide-scsi"
```

check that the reader and the burner are still in the same buses and check that that line matches them.

If you still have problems... better check the gentoo docs about scsi emulation...

You could give a more detailed information about your past and your current device settings so we can see clearly what's failing.  :Rolling Eyes: 

----------

## BeaTtheMeaT666

ok, sorry.

i use grub, and the kernel options worked fine so far.

here's my setup before the failure of the disk:

hda: contained /boot, swap /home and my old redhat installation

hdb: contains / of gentoo an empty /boot (just spare), a freebsd, a solaris9 and a BeOS installation

hdc: my cdrom

hdd: my burner

ok, then hda died, so the old hdb is now master on the first controller (hda and that works fine).

i restored the old hda /boot partition to the new hda /boot (using grub only to write the boot-sector), deleted BeOS (shame on me) and  used this space for a new swap partition and a spare ext3fs.

hdc and hdd did not change.

The system boots fine now, and accroding to the kernel hdc an hdd are present, but when the system is up, there are no devices for cdrom and burner. Eveything else works

I didn't change devfsd.conf, so i don't know what to do now.

Bobo

PS: i can post the output of my dmesg, fstab, devfsd.conf and fdisk -l if that helps

----------

## Deathwing00

It's definitely the configuration of your bootloader. That happened to me with lilo before and I suppose the same things happens with grub. You could try to have LILO as boot manager though   :Razz:   Anyway, check GRUB docs.

----------

## BeaTtheMeaT666

Hi again,

i don't think it's the bootloader and i won't stop using grub (it booted me 5 different OS before the disk failed)

Here's my grub.conf:

```

default=0

timeout=10

splashimage=(hd0,0)/grub/splash.xpm.gz

title Gentoo Linux 1.4

        root (hd0,0)

        kernel /bzImage ro root=/dev/hda5 hdc=ide-scsi hdd=ide-scsi

title Gentoo Linux 1.4 framebuffer 1280x1024 

        root (hd0,0)

        kernel /bzImage ro root=/dev/hda5 hdc=ide-scsi hdd=ide-scsi video=vesa:mtrr,ywrap  vga=794

title Gentoo Linux 1.4 2.4.20-gentoo-r5 framebuffer 1280x1024 

        root (hd0,0)

        kernel /bzImage.2.4.20-r5 ro root=/dev/hda5 hdc=ide-scsi hdd=ide-scsi video=vesa:mtrr,ywrap  vga=794

title FreeBSD 4.7 

        root (hd0,1,a)

        kernel /boot/loader

title Solaris 9  

        rootnoverify (hd0,3)

        makeactive

        chainloader +1

```

And here's a part of my dmesg:

```

Uniform Multi-Platform E-IDE driver Revision: 6.31

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

ICH2: IDE controller on PCI bus 00 dev f9

ICH2: chipset revision 1

ICH2: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0xb800-0xb807, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0xb808-0xb80f, BIOS settings: hdc:DMA, hdd:DMA

hda: Maxtor 2F040J0, ATA DISK drive

hdc: LTN403L, ATAPI CD/DVD-ROM drive

hdd: HL-DT-ST GCE-8160B, ATAPI CD/DVD-ROM drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

ide1 at 0x170-0x177,0x376 on irq 15

blk: queue c0443a24, I/O limit 4095Mb (mask 0xffffffff)

hda: 80293248 sectors (41110 MB) w/2048KiB Cache, CHS=4998/255/63, UDMA(100)

Partition check:

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 < p5 p6 p7 > p4

Floppy drive(s): fd0 is 1.44M

```

And that's in /proc :

```

chevelle boot # ls -l  /proc/ide/

total 0

-r--r--r--    1 root     root            0 Jun 16 22:09 drivers

lrwxrwxrwx    1 root     root            8 Jun 16 22:09 hda -> ide0/hda

lrwxrwxrwx    1 root     root            8 Jun 16 22:09 hdc -> ide1/hdc

lrwxrwxrwx    1 root     root            8 Jun 16 22:09 hdd -> ide1/hdd

dr-xr-xr-x    3 root     root            0 Jun 16 22:09 ide0

dr-xr-xr-x    4 root     root            0 Jun 16 22:09 ide1

-r--r--r--    1 root     root            0 Jun 16 22:09 piix

```

I guess, it is devfsd, but I didn't edit the config and restarting it with  

the "foreground" option doesn't give me a clue

<frustrated and confused> Bobo </frustrated and confused>

----------

## Deathwing00

Lemme a simple question: have you re-runned GRUB when you had that unfortunate happening so the boot loader can notice the change? And...

 *Quote:*   

> i don't think it's the bootloader

 

I don't mean GRUB is problematic but grub config files are... anyway lemme check these files you supplied ...

----------

## Deathwing00

I've run out of ideas... 

· check cable connections

· re-run grub with the new config file

· check wether there is a command to be run so it'll clean up the devices...[/list]

----------

## BeaTtheMeaT666

Hi you don't have to re-run grub like lilo if you change the config.

i used my old config and replaced hdb to hda and hd1 to hd0 (that's grub device-style) then i ran grub from the gentoo live-cd to write the bootsector into the mbr of hda, the config is in /boot/grub/grub.conf and i still think, that grub does his job quite well.

i just typed this:

```

chevelle boot # cat /proc/ide/ide1/hdc/model 

LTN403L

chevelle boot # cat /proc/ide/ide1/hdd/model 

HL-DT-ST GCE-8160B

```

the kernel still knows my devices, but i dont know how to get this s**t in /dev ...

Bobo

----------

## flurix

The kernel detects your drives so it shouldn't be hardware problem. What's there in /proc/ide/drivers, /proc/ide/hd?/drivers and /proc/ide/piix?

----------

## BeaTtheMeaT666

Hi,

here's some output:

```

chevelle boot # cat /proc/ide/drivers 

ide-cdrom version 4.59

ide-disk version 1.12

chevelle boot # cat /proc/ide/hdd/driver 

(none)

chevelle boot # cat /proc/ide/hdc/driver 

(none)

chevelle boot # cat /proc/ide/piix

                                Intel PIIX4 Ultra 100 Chipset.

--------------- Primary Channel ---------------- Secondary Channel -------------

                 enabled                          enabled

--------------- drive0 --------- drive1 -------- drive0 ---------- drive1 ------

DMA enabled:    yes              no              yes               yes

UDMA enabled:   yes              no              yes               no 

UDMA enabled:   5                X               2                 X

UDMA

DMA

PIO

```

could it be, that the kernel doesn't have the right drivers for my disk loaded ?

the kernel is exactly the same, i used before 

Bobo

Edit: is there a possibility to turn off devfsd, to be sure, this is not the problem ?

----------

## flurix

Notice that you don't have ide-scsi listed in your /proc/ide/drivers. This means it hasn't been registered. One reason could be that you haven't loaded appropriate module(s). Try modprobe ide-scsi

P.S. Sorry for the delay, I have problems reaching forums server  :Wink: 

----------

## BeaTtheMeaT666

 *flurix wrote:*   

> Notice that you don't have ide-scsi listed in your /proc/ide/drivers. This means it hasn't been registered. One reason could be that you haven't loaded appropriate module(s). Try modprobe ide-scsi
> 
> 

 

Thanks so far flurix,

i thought, i had scsi-emulation compiled into the kernel, not as a module (silly me...).

So after modprobing, i have /dev/cdrom but nothing like /dev/hdc, /dev/hdd or /dev/cdroms/cdrom*, even after restarting devfsd.

But the pseudo-scsi devices exist, and so i can burn cds  :Wink: 

The rest should be only a little fine tuning....

I'll try to edit modules.autoload and reboot, but now i know where to search for the problem

 *flurix wrote:*   

> 
> 
> P.S. Sorry for the delay, I have problems reaching forums server 

 

Me too. It's the first time i really needed help from this forum and i was almost going nuts for having connection probs   :Evil or Very Mad: 

Bobo

----------

## flurix

That's normal. After all, you're using scsi emulation so instead of hd? you should get sr? which stands for Scsi cdRom. Nevertheless, /dev/cdrom and /dev/cdroms/* should be present too or you have problems with devfsd. Try looking in /lib/dev-state. It contains 'overrides' that you may have made on /dev. Normally, it is safe to delete entries from there. You are risking to loose some device entries or their properties such as ownership. If you are good, you could try understanding stuff in devfsd.conf and see if something is wrong there (or re-emerge it).

----------

## BeaTtheMeaT666

Hi

everything works fine now, i rebooted an now have all devices.

(sounds like if i was using windoze  :Wink:  )

Thanks 

Bobo

----------

## flurix

If you mess with hardware, there's nothing extra-ordinary in rebooting. Even that may not help sometimes  :Wink: 

----------

