?

Log in

No account? Create an account
Wakum Mata!
Politcally Incorrect Musings
Linux Kernel Saga, part 2 
8th-Aug-2005 09:07 pm
linux
Back in May, I introduced you all to the travails of my recompiling the Linux kernel on my box (a pathetic Pii 450MHz, Riva TNT2, 256MB - cash donations or latest high-end AMD+SLi based system now being accepted).

I found the setting for the profile that was executing during boot and driving me bonkers by disabling the network. It was part of the Mandrake Configuration utility. Status: FIXED.

The other setting was in recompiling the kernel with having issues with mkinitrd. It complained about no loopback device. Other symptoms were that I had no USB and could not burn a CD.

I searched the mkinitrd man page. There as a short statement about adding a line to LILO regarding a loopback boot device. The line was to be a comment in the LILO config file. Huh? How could that possibly help? I decided that was not the route I needed. I rebooted to other kernels, including the pre-compiled one. While watching the boot messages scroll by, each kernel indicated a "FATAL" when trying to load the loop module. Modprobe and lsmod yielded no loop module. I grepped the .config file for the kernel and there was no "LOOP" module. Gah! No storage loopback module?!?! At all?!?!

So I used the best tool I have at my disposal: my brain. Ouch. Thinking hurts.... dur, huh huh huh. Og uses head....

CDROM burner is an ATAPI device. ATAPI uses a SCSI driver. USB is mapped as a SCSI device. SCSI... SCSI... hmmmmm... You with me?

"lsmod" shows no SCSI driver loaded. I type "modprobe ide-scsi" and all is well. mkinitrd now does what it is supposed to do and I now have my initrd file. USB is now working with the addition of "modprobe uhci-hcd".

So there is the fix. My kernel was fine all this time! All I had to do was load a few modules that were compiled as a LKM and not compiled in. I think I must have thought that the modules would be loaded as needed. Not so! If you don't have the base driver loaded, then how can the kernel determine if a hardware device is even plugged in or available?

Duh. Dur. Og brain hurt.

I have yet to try burning a CDROM, but I have confidence that I can now. I should sleep well tonight.
Comments 
10th-Aug-2005 07:30 pm (UTC) - Nope...
Still can't burn a CDROM. Bugger all. CDRECORD output is below:

#########################################################################################
Note: The author of cdrecord should not be bothered with problems in this version.
#
TOC Type: 1 = CD-ROM
# Warning: Using ATAPI via /dev/hd* interface. Use dev=ATA:X,Y,Z or dev=/dev/hdX
Using libscg version 'schily-0.8'.
#
Driveropts: 'burnfree'
#########################################################################################
Linux sg driver version: 3.5.27
SCSI buffer size: 64512
cdrecord: Cannot allocate memory. Cannot get SCSI I/O buffer.


So now I need to load another SCSI driver? I don't know. Suxors 2B me.
11th-Aug-2005 06:42 am (UTC) - Re: Nope...
No SCSI driver needed. Xcdroast needed the correct hardware settings. I have a Toshiba SD-R1312 DVD-ROM/CDRW combo drive. The settings it had were wrong for the CD I had and the drive itself. It detected a 4MB buffer but the drive only has a 2MB buffer according to documentation.

I also selected a different ATAPI device address for the writer drive. Physically it is the same device, but interface-wise I figure it is a dual device: one reads DVD and CD, the other is a CD writer. What clued me in to this idea was thinking about USB. Multifunction USB devices are represented by different endpoints (device addresses in layman terms). The same physical USB hardware/chip/gizmo contains multiple addresses for all the different functions. I figure that ATAPI devices (i.e., IDE based CDROMs) might run the same way.

I just successfully burned a CD.

Was I right? Who knows. I changed more than one variable at a time so unless I start backing out changes one at a time, I'll never know.

In summary:

I lowered the write speed to 4x from 32x. The box the CD-R came in says up to 24x, but drive supports up to 32x for CD-R and 4x for CDRW. Thus the choice of 4x for assured compatibility.

I changed the buffer to 2MB from 4MB. Drive docs say it has a 2048kB buffer.

And I changed the writer ATAPI device to 0,0,0 from 1,0,0 just to be different from the CD/DVD reader function.

My next trick is to install a HP DeskJet 710C printer. Then I will share it out as a network printer. Using Samba maybe?
This page was loaded Nov 22nd 2017, 9:56 pm GMT.