[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dealing with removable devices?



On Thu, Apr 18, 2002 at 06:51:59PM -0700, Alan Su wrote:
> i'm having a problem i suspect is similar to how people deal with
> laptop docks.  i've got a woody installation on an thinkpad t21, which
> has a ultrabay 2000 slot, allowing for a removable floppy/cdrom.  i
> can swap devices, and everything works ok...*if* the cdrom was in the
> slot when the machine was booted.
> 
> however, if the cdrom is not in the ultrabay at boot time, the
> secondary ide interface doesn't seem to be initialized.  one thing i
> noticed is that there is no /proc/ide1 directory or a /proc/hdc link
> (as there is when i boot with the drive in).
> 
> does anyone know of a way to get this to work if i don't have the
> cdrom in at boot time?  thanks!

I've got that working on a Dell Inspiron 4000 (one bay can be used for
either a floppy or cdrom), it sounds like you should be able to do the
same:

in /etc/lilo.conf:

    append="hdc=noprobe hdc=cdrom"

stops the probing of the cdrom, and forces /dev/hdc to be interpreted as
a cdrom drive, regardless of whether it is present at the time.

Also, I made sure that I have the following as modules, rather than
compiled into the kernel (although I'm not sure how much it matters):

    ide-cd
    cdrom
    floppy

Before removing the cdrom, it's probably a good idea to rmmod ide-cd and
cdrom, and rmmod'ing the floppy module before physically removing the
floppy. I ended up with /usr/local/bin/baychange:

    #!/bin/sh
    PATH=/bin:/sbin:/usr/bin:/usr/sbin
    lsmod | grep -e ide-cd -e cdrom -e floppy | awk '{printf("rmmod %s\n", $1);}' 

and a gnome laucher to "sudo baychange". Still falls in a heap if I
haven't unmounted stuff first though...

HTH
-- 
Karl E. Jørgensen
karl@jorgensen.com
www.karl.jorgensen.com
I'm currently out trying to find myself. If I should get back before I
return, please keep me here.

Attachment: pgpmPfBdKJFIB.pgp
Description: PGP signature


Reply to: