Jump to content

Write to SD Memory Card?


santner
 Share

Recommended Posts

Im pretty sure usb-mass storage is compiled onto mandrake as a module as standard.

what might not be working is the modules.conf...

 

but also you need IDE_SCSI etc.

 

I can post what mine looks like but if someonbe is at home then get a usb card/camera/disk working and post a lsmod then we can see all the modules which depend on the others (used by)

IDE-SCSI was only required in 2.4 for CD burning. It is obsoleted in 2.6 and isnt required for usb mass storage devices.

 

stop using mknod and makedev. They are utterly useless unless the driver is loaded.

 

modprobe usb-storage

 

then

 

ls /dev/sd*

 

 

And it ought to be there. If it isnt. Get an external.

Link to comment
Share on other sites

  • Replies 37
  • Created
  • Last Reply

Top Posters In This Topic

I don't know if it will help, but I had the same problem. I compiled my own kernel (2.4.25), with the hope I'd still have the digital camera hotplug capability.

So with Mandrake's kernel, I did lsmod, then plugged my camera, then lsmod again. Here are the modules that got added to the list (IIRC):

- scsimon (CONFIG_SCSI_..._SM)

- scsi-disk (CONFIG_SCSI_..._SD)

- usb-storage

- fat

- vfat

 

The first one is not in any standard kernel, and after some search, I found a URL where I could download a patch for 2.4.18, if I remember correctly. This patch applied cleanly to the 2.4.25 kernel. But unfortunately, I must have forgotten some CONFIG... somewhere because even with all the above modules available, /dev/scsi/ remained empty for me...

 

Now I use kernel 2.6.6, and the digital camera is back on the desktop :)

Link to comment
Share on other sites

JFYI, Flash Cards must be used with cdrecord (they are handled like CD drives). For the "hard-disk"s, I found one needs the modules usbcore, usb_storage, (ehci_hcd, ohci_hcd), scsi_mod, sd_mod (sg for Flash Cards)

 

ide-scsi wasnot even required in 2.4 (beginning with about 2.4.20) to burn CDs (<-- in conjunctino with cdrecord-2.00 of course)

 

ln -s /dev/sda /dev/scsi/host0/bus0/target0/lun0/disc

devfs is deprecated in 2.6.

Edited by Hirogen2
Link to comment
Share on other sites

Just for clarity:

modprobe usb-storage

 

then

 

ls /dev/sd*

 

should I delete the files that I created with mknod, i.e. /dev/sda and /dev/sda1 before I do this? In other words, if /dev/sda does not exist, then I do what you say above will /dev/sda be created when I plug in the camera?

 

Also:

 

Flash Cards must be used with cdrecord (they are handled like CD drives).

 

Does this mean that you can not mount a flash drive and write to it like any other mounted partition? I'm new/ignorant on the subject, so please edumacte me. :P

 

devfs is deprecated in 2.6.

 

I was just getting familiar with devfs. How is it being replaced? When will it no longer be included with the kernel?

Link to comment
Share on other sites

(Quick note: be carefull with ln: it is "ln -s existing_name new_alias", not the other way around)

 

From 2.6 kernel itself:

devfs is deprecated by hotplug, procfs, and some others...

Link to comment
Share on other sites

I'm slowly inching closer to a solution....

 

Here is what I did this morning:

 

Restart computer

su into root

insert usb from camera into computer, turn on camera

rmmod sd_mod usb-storage

modprobe scsi_mod max_scsi_luns=1

modprobe usb-storage

 

Now doing this actually creates /dev/sda and /dev/sda1(They weren't there before)

 

So the moment of truth arrives... :unsure:

 

mount /dev/sda1 /mnt/camera

mount: /dev/sda1 is not a block device :furious3:

 

Any ideas?

Link to comment
Share on other sites

If I do give up and get a card reader, should I get an internel or external one? Do I need to be concerned about compatibility with Linux, or can I pick any one I want? Any suggestions for a good SD Flash card reader?

Link to comment
Share on other sites

Just another suggestion,

FAT 12 is often used on the flash cards and FAT12 doesnt support partitions...

 

therefore try

mount /dev/sda /mnt/sda

 

this seems strange and its far from consistent but its worked for me in the past.

Im holding fire on comments on IDE_SCSI till I check it, !

 

I feel Iphitus is wrong but he's usually right and i havent explicitly checked since I started using kernel 2.6!

Link to comment
Share on other sites

Just another suggestion,

FAT 12 is often used on the flash cards and FAT12 doesnt support partitions...

actually, most cards (atleast in the U.S.) use fat16, also make sure you specify the type:

mount -t vfat /dev/sdaX /mnt/card

Link to comment
Share on other sites

well seperating fact from what I think I read

 

I have had cards from some cameras where sda was mounted and others where sda1

I think this was something to do with the filesystem and it wasnt quite a FAT16 on some cameras. at least I think I read this somewhere !!!!

 

anyway it doesnt hurt anything and its worth a go...

even if I cant find an card formatted this way ....

Link to comment
Share on other sites

I have an SD card and it is fat16

 

Get the external reader

 

Avoid all in one's -- some work but many dont and nearly all are trouble.

 

i have an external panasonic one that does the job, but just about any decent external should work.

 

OT:

i have also got an internal one in the front of my laptop that doesnt work. ive tried everything. :'( such a slap in the face having to use the external.

Link to comment
Share on other sites

Anyway regardless of reasons I have found that mounting sda _not_ sda1 sometimes works

 

As for the automagic desktop entry ... this has always seemed hit and miss for me and I usually just end up mounting it....

 

I have used a few digital cameras and all of them have been recognised in linux since 2.4 kernels ... however real USB mass storage is great....

it means I can carry the tiny lead and dload the pictuers onto my old mans XP machine or a linux machine...

 

I even took someone elses pictues the other day becuase they are home from uni and couldnt get their camera to work with Win98 on their fathers PC... so I just plugged it into my Mandrake box and mounted (in this case sda1)

 

 

http://www.maushammer.com/systems/dakotadi...age-format.html

 

Thats just the first google search on FAT12 and camera...

It seems its older <16MB cards only ... for FAT 12 but this might not be why it mounts on sda ???

 

like I say I never wrecked a camera by reading and even after messing up the compact flash deliberately I just reformat it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...