[RndTbl] Re: CD-RW installation

Gilbert E. Detillieux gedetil at cs.umanitoba.ca
Wed Jan 15 12:03:48 CST 2003


According to Mel Seder:
> Hi Gilbert,

Hi Mel.  I decided to post my reply to the roundtable list, in case it's of
use to others too...

> Can you please run those instructions by me again?
> 
> My son-in-law is running Red Hat and 8.0 and he connected a CD RW drive.
> 
> What steps do I have to take to get the drive working in linux?

First, add the following line to the /etc/modules.conf file...

alias scsi_hostadapter ide-scsi

Then, you need to build an "initrd" file for your kernel, to load the
ide-scsi driver automatically on system restart.  Check your kernel version
number by looking in /boot for the vmlinuz-* file(s).  For example, if you
have a kernel called vmlinuz-2.4.18-19.7.x, you'll want a corresponding
initrd file called initrd-2.4.18-19.7.x.img.  (There may already be one if
the installer figured you had other drivers that needed preloading.)  You'd
build (or rebuild) the initrd file as follows...

	mkinitrd -f /boot/initrd-2.4.18-19.7.x.img 2.4.18-19.7.x

The -f option will force an existing file to be rebuilt.  The next argument
is the initrd file name, and the last argument is the kernel version number
(so it knows which /lib/modules directory to get the modules from).

If you've got multiple kernels installed, you may want to repeat the above
for each of the kernel versions you've got.  Certainly, you'll want to do it
for the kernel that gets booted by default.

Next, you have to tell your kernel boot loader (grub or lilo) to load that
initrd file when it loads the kernel.  If you're using grub (you should, as
long as you're running a distribution that supports it), edit /etc/grub.conf
(or /boot/grub/grub.conf, which is what /etc/grub.conf should point to), to
add the following line...

	initrd /boot/initrd-2.4.18-19.7.x.img

You would add that just after the kernel line for the corresponding kernel
version (adjusting the kernel version as required), such as...

	kernel /boot/vmlinuz-2.4.18-19.7.x ro root=/dev/hda2

(Of course, if you already had an initrd file in /boot, the grub.conf file
may already mention it.)

If you're using lilo instead, edit /etc/lilo.conf to add the following
line...

	initrd=/boot/initrd-2.4.18-19.7.x.img

... in the section for the appropriate kernel image, then run the "lilo"
command to update the lilo boot record and map file.

After that, you can reboot, and the driver should load automatically.

If you're using grub as the boot loader, there's the added advantage that
anytime you upgrade your kernel, it will automatically build an updated
initrd file and update the grub.conf file, so there's very little you have
to worry about.  With lilo, unfortunately, you'll have to repeat the lilo
configuration changes above manually each time you upgrade your kernel.

-- 
Gilbert E. Detillieux		E-mail:	<gedetil at cs.umanitoba.ca>
Dept. of Computer Science	Web:	http://www.cs.umanitoba.ca/~gedetil/
University of Manitoba		Phone:	(204)474-8161
Winnipeg, MB, CANADA  R3T 2N2	Fax:	(204)474-7609



More information about the Roundtable mailing list