Skip to contentSkip to conversation

Removable USB device contents cached after removal?

DISCUSSION Vid Strpic 2 participants 2 messages Jan 1, 2004

lore
Share & tools
lore

Vid Strpic

author
#0 lore raw

On Wed, Dec 31, 2003 at 05:12:16PM -0700, Matthew Mastracci wrote:

[...]

Quoted 4 lines

1. Insert card into reader.
2. Mount card as directory somewhere in root filesystem, list contents of card
3. dd if=/dev/sdd1 count=1024 bs=1024 | hexdump

Quoted 8 lines

- results in correct filesystem dump
4. Remove card from reader.
5. dd if=/dev/sdd1 count=1024 bs=1024 | hexdump
- same filesystem dump as before!
6. cd to mountpoint, contents are still available
7. dd if=/dev/sdd1 of=/dev/null
- approx 3MB of card data still available
8. umount the mountpoint from before

Did you try eject sdd after this, and if not, try, and see how it works.

Quoted 1 line

9. dd if=/dev/sdd1 of=/dev/null results in "No medium found"

usb-storage behaves differently in 2.6 than in 2.4, maybe this is the problem for you now.

Signature · 4 lines
           [email protected], IRC:*@Martin, /bin/zsh. C|N>K
Linux moria 2.6.0-mm2 #1 Tue Dec 30 10:21:33 CET 2003 i686
 12:46:44 up 1 day, 23:08, 11 users,  load average: 0.94, 0.68, 0.69
UNIX programmers DO IT with forks.
#1 lore raw

USB Digital Camera mount problem [WAS: Removable USB device contents cached after removal?]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 4 lines · Vid Strpic
Quoted 1 line

9. dd if=/dev/sdd1 of=/dev/null results in "No medium found"

usb-storage behaves differently in 2.6 than in 2.4, maybe this is the problem for you now.

I get "No medium found" when I try to mount the SD card inside my digital camera (Panasonic DMC-LC33.) It works fine in 2.4.18 that comes with Debian, but I get the above message in 2.6.0 (and couple of releases before it - it is a fairly new camera, ~2 months old.)

Any ideas how to debug it?

Jeff.

When plugged in:

kernel: hub 2-2:1.0: new USB device on port 4, assigned address 3
kernel: Initializing USB Mass Storage driver...
kernel: scsi1 : SCSI emulation for USB Mass Storage devices
kernel:   Vendor: MATSHITA  Model: DMC-LC33          Rev: 0100
kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
kernel: SCSI device sda: 246017 512-byte hdwr sectors (126 MB)
kernel: sda: Write Protect is off
kernel: sda: Mode Sense: 00 06 00 00
kernel: sda: assuming drive cache: write through
kernel:  sda: sda1
kernel: Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
kernel: Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0,  type 0
kernel: WARNING: USB Mass Storage data integrity not assured
kernel: USB Mass Storage device found at 3
kernel: drivers/usb/core/usb.c: registered new driver usb-storage
kernel: USB Mass Storage support registered.

scsi.agent[22366]: disk at /devices/pci0000:00/0000:00:1f.4/ usb2/2-2/2-2.4/2-2.4:1.0/host1/1:0:0:0

When I try to mount it, mount refuses, but there are no log messages:

jeff:~# mount /dev/sda1 /mnt/camera/
mount: No medium found
jeff:~#

And when I shut the camera off, I get:

kernel: usb 2-2.4: USB disconnect, address 3

The modules:

jeff:~# lsmod
Module                  Size  Used by
usb_storage            34688  0
nvidia               1704492  10
tvaudio                21888  0
msp3400                22928  0
bttv                  140704  1
video_buf              22400  1 bttv
i2c_algo_bit           10248  1 bttv
btcx_risc               5252  1 bttv
v4l2_common             5376  1 bttv
videodev               10368  2 bttv
uhci_hcd               31240  0
usbcore               109012  4 usb_storage,uhci_hcd
evdev                  10496  0
tuner                  15108  0
i2c_core               24964  5 tvaudio,msp3400,bttv,i2c_algo_bit,tuner
eepro100               31244  0
mii                     5632  1 eepro100

- --
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
- Abbie Hoffman
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/9GnRwFP0+seVj/4RAnrCAJ92Kp6vkMobqPFnPzxs+HZIeD49rwCgneQf n3u1o/SmRVOSJMi+IuBjn6g=
=lYLk
-----END PGP SIGNATURE-----