PDA

View Full Version : usb mass storage problem



hadrien001
05-27-2003, 01:18 PM
I've a small problem between hdd version and live cd version on my multi card usb mass storage:
with live cd when 2 cards are installed in my pty reader the initialisation is correct and I see my two cards (compactflash and smartmedia) as sda1 and sdb1.
with hdd version I see only the first card sda1.
who know this problem?

hadrien001

Stephen
05-27-2003, 04:55 PM
Have you checked in the /etc/fstab to make sure there is an entry for the second drive or manually mounted the second card (as root in a console mount -t vfat /dev/sdb1 /mnt/sdb1). of course the mount point /sdb1 has to exist already to check ls -l /mnt/.

VeeDubb
05-27-2003, 06:34 PM
I know this problem, and I've fixed it.

SHort answer. Multi card readers DON'T work by default in most distros, and not on the HDD install of knoppix.


Long answer: It's a kernel option. You mass storage driver is a SCSI emulating driver, so you computer things it's a small SCSI harddrive. One of the options when you compile a kernel under the SCSI options section is "probe multiple LUN's on each SCSI device." THat option WAS used for the live kernel, but for some reason, NOT for the HDD kernel. WHat you will have to do is recompile your kernel with that option.

The Bad News: Building kernel source for knoppix is a pain in the ass. It has two custom patches that are not used by any other distro, and the kernel source isn't available for download anywhere, so you'll need a standard 2.4.20 kernel from kernel.org and a lot of help from people more skilled than me.



I know all this because the last distro I used was knoppix and I had the same problem, and I recently fixed it in my current distro (mandrake) by doing what I just told you. Good luck.

hadrien001
05-30-2003, 10:40 AM
Thank for your answer

I've try to compil new kernel with the 2 patches -xfs and knoppix-patch to enlarge the command line and I've try to compil in the standard method (make dep,make depend,make bzImage etc..) or by debian method (make-kpkg --added-patches xfs --append-to-version "-own" --revision "0" buildpackage modules ) and in all cases i obtain a lot of f.. problems and specialy with the depend module.
After 2 days I stop without any result (for the last 7 years I've compil a lot of kernel version and it's the first time that I can't ended...)

But I've 2 questions:
-when I start to boot I obtain after dependencies check some message look like "file are not ELF file" after the depmod command and if I suppress files in the directory /lib/modules/extra I hav'nt this messages but I must made this suppression before any boot?

-all my usb peripherics are working well (scanner,hub,and my first memory card)but my directory /proc/bus/usb is empty and with the command " cat /proc/bus/usb/devices" say no file or directory do you know why and if it's possible to restore these proc file ?

many thanks

VeeDubb
05-30-2003, 08:07 PM
I have to be honest, that's all a bit over my head. As for your errors, let me do what everyone ele refused to do for me, tell you how to compile a kernel in plain english. If it's in halfquotes, it's a command, enter it without the quotes.

I'm going to assume you have your fully patched ready to compile kernel sources in /usr/src/linux-2.4.20 if that's not where your's are, just adjust accordingly. I'm also assuming that the symlink /usr/src/linux points to the old kernel headers and NOT your kernel source.


from a terminal as root:

'cd /usr/src/linux-2.4.20'
'make oldconfig' this uses all the options from the original, and pormpts you about any new options.
'make xconfig' this is the standard x window kernel configurater, change your proccessor type from i386 to what ever you have, then go to the scsi section and change "probe multiple LUN's on each device" to y, then save and quit.

'make dep clean bzImage' this will clean up all the junk and build you main kernel and it can take a LONG time, you should probably go to lunch now.

'make modules modules_install' this builds all the modular parts of your kernel and installs them for you. THis can take a REALY LONG TIME, you should go to bed.

now we are going to copy all you new binaries where they go, be carefull of the spelling.

'cp /usr/src/linux-2.4.20/arch/i386/boot/bzImage /boot/vmlinuz-2.4.20'
'cp /usr/src/linux-2.4.20/System.map /boot/System.map-2.4.20'
'cp /usr/src/linux-2.4.20/.config /boot/.config-2.4.20' (this one is op[tional, it basicaly is a convienient and logical place to store a backup of your .config, I highly reccomend you do it as there is no realn not to.)

you also, will need an initrd file to help start the kernel, make one with the followin comand:

'mkinitrd /boot/initrd-2.4.20.img 2.4.20'


your kernel is now installed, but you now need to modify your bootloader to boot it.

assuming you use lilo, open up /etc/lilo.conf with your favorite text editer and find the stanza that refers to vmlinuz, make a second stanza right below it, but add -2.4.20 to the lines for vmlinz and initrd.

So, if your original said :
image=/boot/vmlinuz
label=linux
root=/dev/hda2
initrd=/boot/initrd.img
append="devfs=mount hdc=ide-scsi"
read-only

you want your new stanza to say:
image=/boot/vmlinuz-2.4.20
label=linux-2.4.20
root=/dev/hda2
initrd=/boot/initrd-2.4.20.img
append="devfs=mount hdc=ide-scsi"
read-only

then run one llast command:

'/sbin/lilo'


Now your new kernel is installed, and you haven't done anything to mess up your existing kernel, so if it doesn't work, you can still boot with the original kernel.

Once you are satisfied that the new kernel works, you can change all your simlinks and remove the old kernel, but make sure you are running first.

hadrien001
05-31-2003, 01:14 PM
Many thanks I'm going to do this compilation procedure.
But I've found the modification to obtain than all mass storage cards will be found after boot it's only a small add in lilo.conf:
create a new line or add to your append line
append = "max_scsi_luns=X"
where X is the maximum available cards in the reader,lilo -v,reboot and it's all folk !!!

francis

hadrien001
05-31-2003, 06:47 PM
Sorry to disturb

I've made a fine compilation after some problem with the patch version of xfs but I've some error with:
mkinitrd /boot/initrd-2.4.20.img 2.4.20

whet is the real fonction of this and why I obtain a syntax error,I've try this command under the linux tree root and outside of it ?
thanks

hadrien001
06-01-2003, 09:48 AM
Don't warry about my last question,I've find the exact syntax for this:

'mkinitrd -o /boot/initrd-2.4.20.img /lib/modules/2.4.20'

and now for me my new kernel is working fine.

many thanks

francis

VeeDubb
06-03-2003, 07:30 PM
glad to hear it. The reason for the slight syntax goof is that I'm running a diferent distro, so what I listed is all I needed. I will remember that knoppix need's more specification to make a init.img

And thanks a million for the apend code to enable it. i can't tell you how much trouvble I'd have saved myself if I'd known that.