[ltp] ultrabay how recognize it on linux??

Thomas Hood linux-thinkpad@www.bm-soft.com
Wed, 07 Mar 2001 20:17:55 -0500


Michael Selway wrote:
> I don't use my hard-disc adapter in the ultrabay solely because of
> your advice that There Be Dragons if I swap between CD and hard
> disc without re-booting.  Is the problem "only" that the kernel
> panics?  I got the impression (not sure where from) that you'd
> seen data corruption on your internal hard drive.  In the
> interests of research I'll risk a kernel panic, but I'm not up for
> data corruption.

Swapping between devices "cold" (i.e., with power off) is
no problem.

It has been reported by "tom" on this list that warm swapping between
CD-ROM and battery can be done if Linux is booted with the
"noprobe /dev/hdc" option.  (Shouldn't this be "hdc=noprobe"?)

It has been reported by Robert Hajime Lanning <lanning@lanning.cc>
on this list that warm swapping between CD-ROM and floppy drive
can be done if Linux is booted with the "hdc=cdrom" option.

I haven't confirmed either of these claims.  I know that when
I played with this, the only way I could get Linux to recognize
the floppy drive *ever* was to boot with the floppy drive
installed in the bay.  That done, I could (in suspend) remove the
floppy drive and install the CD-ROM drive, (after resume) register
the secondary ide interface using "hdparm -R", and access the
CD-ROM drive.  I could switch back and forth between floppy and
CD-ROM.  However I found that if I didn't unregister the secondary
ide interface while using the floppy, I would get errors in the
syslog; whereas if I did unregister it then I got kernel panics.
Not only did this cause me to have to fsck, but it also seemed
to corrupt my main filesystem.  Clearly there were bugs in the
ide driver code at the time (2.2.early).  The ide driver has
been substantially changed since then so the problem may have
gone away.  Needs testing.

Switching between CD-ROM drive and hard drive is a different
kettle of fish altogether.  Whereas the floppy (and, of course
the battery) don't use an ide interface at all, the second
hard drive does.  IIRC, the second hard drive is 
a second device on the primary ide interface, unlike the
CD-ROM drive which is attached to the primary ide interface;
therefore it should appear as hdb rather than as hdc.  So
far as Linux is concerned, I see no reason why one shouldn't
be able to warm swap between hard disk and CD-ROM drive by
doing one of the tricks described above: i.e., either by 
telling the ide driver about both disks (hdb=yadda hdc=cdrom)
and/or by dynamically registering and unregistering the
secondary interface.

However there may be limitations in the BIOS or in the
ThinkPad hardware.

Right now I don't have a second hard disk, and the TP600
doesn't take a battery in the bay; so all I can test is
warm swapping between floppy and CD-ROM drives.  I'll
try it out tomorrow.

Thomas

----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html