You are not logged in.
Pages: 1
I have 2 micro sd cards, of 8 and 2 gigabytes, and I'm having problems copying files to them. They're formatted vfat. The problem is when I copy files with cp, sometimes it seems it doesn't actually copy the file - i.e. it appears in ls but has 0 bytes. I've repartitioned and reformatted multiple times but I still get this randomly - for example there's a large directory of .jpgs and only some of them get copied (not allways the same though). I don't think this is a hardware issue since it's on both of them and they were properly working in their devices (android phone and dingoo) before I decided to swap them, copying over the files.
When I insert one in my media bay I get this in messages.log, which seems suspect but doesn't say much to me:
May 31 13:07:58 localhost kernel: [ 1575.421247] sd 4:0:0:0: [sdc] 3862528 512-byte logical blocks: (1.97 GB/1.84 GiB)
May 31 13:07:58 localhost kernel: [ 1575.435878] sdc: sdc1
May 31 13:07:59 localhost kernel: [ 1576.281604] mount: sending ioctl 5310 to a partition!
May 31 13:07:59 localhost kernel: [ 1576.281606] mount: sending ioctl 5310 to a partition!
May 31 13:07:59 localhost kernel: [ 1576.448524] UDF-fs: warning (device sdc1): udf_load_vrs: No VRS found
May 31 13:07:59 localhost kernel: [ 1576.448526] UDF-fs: Rescanning with blocksize 2048
May 31 13:07:59 localhost kernel: [ 1576.628455] UDF-fs: warning (device sdc1): udf_load_vrs: No VRS found
May 31 13:07:59 localhost kernel: [ 1576.628457] UDF-fs: warning (device sdc1): udf_fill_super: No partition found (1)
May 31 13:07:59 localhost kernel: [ 1576.630212] mount: sending ioctl 5310 to a partition!
May 31 13:07:59 localhost kernel: [ 1576.630214] mount: sending ioctl 5310 to a partition!
May 31 13:07:59 localhost kernel: [ 1576.746265] ISOFS: Unable to identify CD-ROM format.also running pumount /media/mysdcard usually hangs, though running mount in another window shows it has succesfully unmounted...
system is up to date. any ideas?
Last edited by Nareto (2012-06-02 17:47:44)
Offline
Are you sure it is actually mounted/formatted as VFAT? It might be an odd question, but your OS keeps talking about UDF, and UDF is a filesystem by itself, so it can't be both.
More info, also about Linux compatibility: http://en.wikipedia.org/wiki/Universal_Disk_Format
Last edited by .:B:. (2012-05-31 16:26:48)
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Try running the following and see what is reported regarding your micro SD cards (your hard drive info will be displayed as well).
fdisk -lMaybe the following link helps.
http://www.ehow.com/how_7165724_mount-s … linux.html
Offline
Have you dd'ed ISO images on these cards directly by chance (e.g. to boot Linux, Windows 7 installation from them)?
asus ux303la, core i5@1.6ghz, 8 gb ram, 500gb hdd, hd4400 gpu, crux x64 with openbox
Offline
so, the card was partitioned with cfdisk, and I chose a type OB - W95 FAT32 type partition. Then I formatted it with
mkdosfs -I -F32 /dev/sdc1and that's all (didn't dd ISO images)...
here's fdisk relevant output:
Disk /dev/sdc: 1977 MB, 1977614336 bytes
64 heads, 63 sectors/track, 957 cylinders, total 3862528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 135 3858623 1929244+ 6 FAT16Also, I have a windows xp installation living as a virtualbox guest, and I tried passing the sd card to it - it seems to be able to copy files without problems - haven't had time to really stress test it, but it did copy correctly 337mb of .jpegs
Offline
Whoa, FAT16? That doesn't look right.
However, it looks to me like the usual issue where data isn't copied immediately but still lingers in caches. pumount doesn't "hang", what's happening is that it's waiting for caches to be flushed, meaning that's when the data is actually being copied. You should mount with the flush option. But pmount doesn't support custom mount options, so you'll either need to hack it's source or switch to a better app.
@.:B:. That UDF and iso stuff is there because pmount will mount stuff by trying one fs after another, until one sticks. pmount is really quite a hackish and crappy app.
Offline
When I used to have problems with USB flash drives and memory cards that appear as UDF disks first and then as FAT disks, I had that fixed by zeroing the first 1 MiB of the flash drive/memory card by using this:
dd if=/dev/zero of=/dev/sdX bs=1024k count=1and then recreating a new partition table (type msdos) using Gparted. MAKE A BACKUP of the memory card first! All data will be destroyed! And be sure the drive letter is the one that corresponds to the memory card! TRIPLE CHECK IT!
Hope it helps!
Last edited by bjornoslav (2012-06-01 09:07:53)
asus ux303la, core i5@1.6ghz, 8 gb ram, 500gb hdd, hd4400 gpu, crux x64 with openbox
Offline
If it is formatted FAT16, you will not get your moneys worth out of that 8GB SD card. FAT16 is limited to 2 (or possibly 4 GB) in file size and partition size AFAIK. SDHC (high capacity) cards are preformatted to FAT32. SDSC (standard capacity - 2GB or less) SD cards are preformatted to FAT16.
Offline
ok, so I reformatted to F32 (the problem was I read online to pass mkdosfs the option -F32, and I think that wasn't recognized and it was falling back to default FAT16; had to pass -F 32 instead (with the space)).
also, Gusar's tip seems to be spot on - everything works as expected if either I mount with the flush option or I just wait for umount/pumount to exit cleanly.
any idea how to craft an udev rule that uses the flush option only if the filesystem is vfat?
EDIT: nevermind, I'll just wait for unmounting. marking as solved
Last edited by Nareto (2012-06-02 17:47:30)
Offline
any idea how to craft an udev rule that uses the flush option only if the filesystem is vfat?
The udev rules on the wiki already have options for vfat filesystems...
Offline
Pages: 1