system not seeing memory card
hey,
ive got an external usb card reader, and a memory stick duo pro phone card. now if i put this card into the reader before booting, the system sees it when i log in as root and do 'blkid', and i can mount it and R/W to it. but if i plug the card into the card reader after booting, and do blkid, the system wont see it. i know the light on the card reader flashes when '/etc/rc.d/rc.modules2.6.18' is started at boot, but im not sure where to go from here. |
when the card works ....
do lsmod and save the output to a file. then restart and go to the scenario where the card doesn't work. Connect the card, and do lsmod. do a diff on the outputs or post it here. |
this is the diff
Code:
2a3,6 |
just modprobe everything that is there when it is working, but not there when it is not working. see if it works !
|
got it working.
i have to unload then reload the usb-storage module (rmmod usb-storage, modprobe usb-storage), then run /etc/rc.d/rc.scanluns. what i dont understand, is the system always sees the card reader, so why is it necessary to have to unload then load the module, for scanluns to see the memory card. and i dont want a user to be able to load and unload modules at will, just so i can use my memory card. any ideas? *edit* just thought maybe i can do this with the sudoers file. |
Try setting up HAL to do it for you.
|
ive now got it working for my normal user.
ive edited the sudoers file so that the user can run 'rmmod usb-storage', 'modprobe usb-storage', and 'rescan-scsi-bus -l' commands, then i created a script on the desktop to run through those commands. but ive come across a weird problem. the script will not work on its 3rd execution ?? it works once, it works twice, then it fails. it works once, it works twice, then it fails. i dont get it. lol anyone? |
just a thought here, but couldnt i fool the computer into thinking the memory card is in the card reader and connected at boot, even if it isnt? so that when i do plug the card into the reader sometime after boot, i wouldnt have to unload/load the module, i could just have to mount it? is this possible?
|
There's an option in the kernel config (which Patrick had set off by default when I last looked) that makes most of these kinds of things go away. I've got a combination thumbdrive and sdcard reader that functions flawlessly once the kernel knows to probe for more than one LUN per device by default, without needing to run rc.scanluns.
Look under Device Drivers->SCSI Device Support for "Probe all LUNs on each SCSI device". Enabling that in a kernel should eliminate the need to run the scanluns script. |
interesting, thanks evilDagmar.
i think its probably high time i had a go at building a custom kernel, as there are a few other features i would like to use too, but ive been stalling cus it looks difficult! |
Building a custom kernel does not have to be terribly difficult. There
are different schools of thought. One is to take the present working kernel's config file and use it to build a new kernel. Doing this can achieve the desired result, but you won't learn much (if anything) about kernel building. You'll also still have a very large kernel. When I first starting using GNU/Linux, it was amazing to me that I could actually rebuild my kernel, excluding drivers (modules) for hardware that is not in my computer. That's one of the things that makes Windows "easy to use" for a lot of PCs, and has allowed it to dominate the desktop market. There are drivers included for hundreds, if not thousands, of pieces of hardware. Building, compiling, and installing a custom kernel takes reading and learning, and patience. Today it seems there is a dearth of people willing to read, even man pages or online HOW-TOs, in order to learn. These are some resources that will help you learn how to build a custom kernel: Quote:
Unpack the source and open ./linux-2.6.x.y/README -- and do just that. The book Linux Kernel in a Nutshell will educate you beyond measure. It is available in both PDF and DocBook formats. Since I haven't yet learned about DocBook, I d/led the tarball of the pdf files and used pdftk to make one file of them. Follow the guide above and Linus' advice in the README file. For the actual install you have to be root (and can even use sudo), but none of the normal build should require that. Don't take the name of root in vain. You might not get a bootable kernel the first time, which is why you should follow the advice in my guide about leaving your old kernel in place. Another thing I do is add append="panic=15" to /etc/lilo.conf so that if I mess up and get a kernel panic, the system will reboot itself after 15 seconds. If you think you'll need more time to read the onscreen output, increase the time. Building a custom kernel teaches one a lot about their system. There is so much more included in the kernel than simple hardware support. EDIT: Also, for your problem, make sure that /etc/rc.d/rc.scanluns is executable. If not, issue "chmod +x /etc/rc.d/rc.scanluns" as root. |
Thanks for the long post Bruce. I have just ordered the book you spoke of (Linux Kernel in a Nutshell) and I hope to 'roll my own' in my leave in April. Looking forward to it :-)
Andrew |
Quote:
That's why it's off in the stock kernels. |
thanks Bruce, and thanks Robby for the additional info.
|
Hi,
Quote:
|
All times are GMT -5. The time now is 09:33 AM. |