LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-12-2008, 09:01 PM   #1
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Rep: Reputation: 15
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.

Last edited by jukebox55; 03-12-2008 at 09:08 PM.
 
Old 03-12-2008, 10:51 PM   #2
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
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.
 
Old 03-13-2008, 07:05 AM   #3
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
this is the diff

Code:
2a3,6
> nls_iso8859_1           4096  0 
> nls_cp437               5760  0 
> vfat                   10240  0 
> fat                    46108  1 vfat
21d24
< joydev                  8256  0 
22a26
> joydev                  8256  0 
24d27
< nvidia               7813056  0 
26d28
< evdev                   8192  0 
27a30
> nvidia               7813056  0 
30c33,34
< pcspkr                  2560  0 
---
> e1000                 121664  0 
> evdev                   8192  0 
31a36
> i2c_i801                6924  0 
34,35c39
< i2c_i801                6924  0 
< e1000                 121664  0 
---
> pcspkr                  2560  0
 
Old 03-14-2008, 12:57 AM   #4
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
just modprobe everything that is there when it is working, but not there when it is not working. see if it works !
 
Old 03-14-2008, 12:29 PM   #5
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
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.

Last edited by jukebox55; 03-14-2008 at 12:41 PM.
 
Old 03-14-2008, 01:59 PM   #6
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Try setting up HAL to do it for you.
 
Old 03-14-2008, 02:21 PM   #7
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
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?
 
Old 03-15-2008, 11:23 AM   #8
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
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?

Last edited by jukebox55; 03-15-2008 at 11:24 AM.
 
Old 03-16-2008, 04:33 AM   #9
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
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.
 
Old 03-16-2008, 11:42 AM   #10
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
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!
 
Old 03-17-2008, 06:25 PM   #11
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
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:
Start by downloading the latest source from Kernel.org (2.6.24.3 as of this post).

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.

Last edited by Bruce Hill; 03-17-2008 at 06:41 PM.
 
Old 03-17-2008, 09:06 PM   #12
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,364

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
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

Last edited by andrew.46; 03-17-2008 at 09:07 PM. Reason: typo
 
Old 03-18-2008, 01:43 AM   #13
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Quote:
Originally Posted by evilDagmar View Post
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.
Unless something's changed, this makes some real scsi drives lock up.
That's why it's off in the stock kernels.
 
Old 03-18-2008, 12:38 PM   #14
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
thanks Bruce, and thanks Robby for the additional info.
 
Old 03-19-2008, 08:46 AM   #15
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,
Quote:
Originally Posted by Bruce Hill View Post
<snip>

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.
Bruce, would it be better to place a 'addappend="panic=15" within the new stanza for the test/compiled kernel? I think the 'addappend' can be used more than once but for one image. Therefore you could place the 'addappend=' within a stanza. Since you will be creating a new stanza within the '/etc/lilo.conf' for the new kernel then your global would be left intact.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between resident memory,shared memory and virtual memory in system monitor mathimca05 Linux - Newbie 1 11-11-2007 04:05 AM
installed system memory differs from mounted (available) memory landroni Debian 5 08-13-2007 06:43 AM
system memory still at 504 after video card install Furlinastis Slackware 6 07-21-2005 12:10 PM
RH 8.0 Mapping Virtual Memory to get access to VMIC Reflective Memory PCI card. Merlin53 Linux - Hardware 0 05-05-2003 12:50 PM
memory stick / CF memory card reader X-dazed Linux - Newbie 1 01-21-2003 12:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration