Re: [SLUG] Reading blocks from SD card

From: Donald E Haselwood (dhaselwood@verizon.net)
Date: Sat Sep 22 2007 - 17:14:49 EDT


On Saturday 22 September 2007 15:55, ronan wrote:
> Have you tried using dd?
>
> dd if=/dev/sda of=/tmp/myblocks
>
> That would require that you know which /dev entry the device was
> mapped-to, after you stick in your SD card, try running "dmesg" and see
> if it says that it found and mapped a new device.
>
> If that works, you should be able to mount your output file as a
> filesystem:
>
> mount /tmp/myblocks /mnt/floppy -o loop -t vfat
>
>
> --ronan
>
> > Is there a way to read the blocks from an SD card directly, i.e. no file
> > system?
>
ronan,

Thanks for the response.

dmesg shows the device. If it is fomrated correctly with FAT it mounts the
device automatically after it is plugged in (and shows up as "/media/disk",
though the initial message is "system:/media/sdc1"). When I do "dd" I get
less than one block (512) and it isn't anything that is on the card.

If I write the 1st block of the SD card to 0's (thus destroying the "AA55" at
the end that identifies the file system as FAT), then "dd" gives--

deh@P4-1:~/block> dd if=/dev/.udev/db/block@sdc@sdc1 of=/home/deh/block/x
dd: opening `/dev/.udev/db/block@sdc@sdc1': No such file or directory

...
dmesg also gives--
sdc: assuming drive cache: write through
 sdc: sdc1
FAT: Filesystem panic (dev sdc1)
    invalid access to FAT (entry 0x00004a4a)
    File system has been set read-only
FAT: Filesystem panic (dev sdc1)
    invalid access to FAT (entry 0x00004a4a)
...
This suggests that "it" (driver & hardware?) only expects a FAT file system. I
may be stuck with FAT.

Don
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:16:39 EDT