USB Thumbdrive File Corruption?

Discuss peripherals for the XO and power management.

USB Thumbdrive File Corruption?

Postby Ben » Wed Jan 30, 2008 5:47 pm

I have a pair of USB thumb drives, one is 1GB, the other is 4GB. If I insert either one into the XO, I can use ls in the Terminal window to see the files. If I use cp to copy a small plain text file from the thumb drive to the XO from the 1GB drive, everything works fine. If I copy the same file from the 4GB thumb drive, both the copy on the XO and the thumb drive is corrupted (the other files on the thumb drive are untouched).

Any idea why the file is getting corrupted? Is there a limit on the size of the USB thumb drive that the XO can use?

My XO has the standard G1G1 OS and firmware. Windows says the filesystem on the 4GB thumb drive is FAT32.

Thanks
Ben
 
Posts: 16
Joined: Tue Dec 11, 2007 11:52 pm

Re: USB Thumbdrive File Corruption?

Postby Nayantara » Wed Jan 30, 2008 8:00 pm

Is the 4GB SD a SDHC card?

There is an open ticket for random corrpution on SDHC cards here http://dev.laptop.org/ticket/6078

Can you replicate the corruption? If so run this in the terminal after you notice the corruption:
Code: Select all
dmesg | tail
Gave 13-Nov-2007, Got 3-Jan-2008.
Nayantara
 
Posts: 60
Joined: Mon Jan 28, 2008 1:48 pm
Location: Boston Area, MA, USA

Re: USB Thumbdrive File Corruption?

Postby Ben » Thu Jan 31, 2008 3:40 pm

Nayantara wrote:Is the 4GB SD a SDHC card?


It's a USB thumb drive, not a SD card.

Nayantara wrote:Can you replicate the corruption? If so run this in the terminal after you notice the corruption:
Code: Select all
dmesg | tail


[ 5166.349406] hub_port_wait_reset: portstatus=503 portchange=10
[ 5166.408823] usb 1-3: new high speed USB device using ehci_hcd and address 5
[ 5166.466150] hub_port_wait_reset: portstatus=503 portchange=10
[ 5166.555495] PM: Adding info for usb:1-3
[ 5166.555820] PM: Adding info for No Bus:usbdev1.5_ep00
[ 5166.555932] usb 1-3: configuration #1 chosen from 1 choice
[ 5166.556207] PM: Adding info for usb:1-3:1.0
[ 5166.556681] scsi2 : SCSI emulation for USB Mass Storage devices
[ 5166.556722] PM: Adding info for No Bus:host2
[ 5166.557013] PM: Adding info for No Bus:usbdev1.5_ep81
[ 5166.557155] PM: Adding info for No Bus:usbdev1.5_ep02
[ 5166.557303] usb-storage: device found at 5
[ 5166.557321] usb-storage: waiting for device to settle before scanning
[ 5171.556091] PM: Adding info for No Bus:target2:0:0
[ 5171.558088] scsi 2:0:0:0: Direct-Access USB 2.0 Flash Disk 1100 PQ
: 0 ANSI: 0 CCS
[ 5171.558162] PM: Adding info for scsi:2:0:0:0
[ 5171.563114] sd 2:0:0:0: [sda] 7928832 512-byte hardware sectors (4060 MB)
[ 5171.564297] sd 2:0:0:0: [sda] Write Protect is off
[ 5171.564327] sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 5171.564347] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 5171.567912] sd 2:0:0:0: [sda] 7928832 512-byte hardware sectors (4060 MB)
[ 5171.569037] sd 2:0:0:0: [sda] Write Protect is off
[ 5171.569066] sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 5171.569086] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 5171.569108] sda: sda1
[ 5171.618671] sd 2:0:0:0: [sda] Attached SCSI removable disk
[ 5171.618874] sd 2:0:0:0: Attached scsi generic sg0 type 0
[ 5171.621830] PM: Adding info for No Bus:target2:0:1
[ 5171.622609] PM: Removing info for No Bus:target2:0:1
[ 5171.622705] PM: Adding info for No Bus:target2:0:2
[ 5171.623212] PM: Removing info for No Bus:target2:0:2
[ 5171.623300] PM: Adding info for No Bus:target2:0:3
[ 5171.623781] PM: Removing info for No Bus:target2:0:3
[ 5171.623867] PM: Adding info for No Bus:target2:0:4
[ 5171.624351] PM: Removing info for No Bus:target2:0:4
[ 5171.624437] PM: Adding info for No Bus:target2:0:5
[ 5171.624917] PM: Removing info for No Bus:target2:0:5
[ 5171.625004] PM: Adding info for No Bus:target2:0:6
[ 5171.625484] PM: Removing info for No Bus:target2:0:6
[ 5171.625571] PM: Adding info for No Bus:target2:0:7
[ 5171.626051] PM: Removing info for No Bus:target2:0:7
[ 5171.626109] usb-storage: device scan complete
[ 5172.939496] FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
Ben
 
Posts: 16
Joined: Tue Dec 11, 2007 11:52 pm

Re: USB Thumbdrive File Corruption?

Postby Nayantara » Thu Jan 31, 2008 3:56 pm

Ben:
Sorry about that, I don't know why I misunderstood that it also had to do with SD cards. :oops:
I see this
[ 5172.939496] FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!

Please try formatting with FAT32 and try. If you think it is already FAT32 - try formatting it again (complete not quick).

Also, there is a ticket for issues with "not giving SD cards and USB drives enough time to power up and become ready". Although this is a firmware issue, you might at some point try updating the OS to the latest build 653.
Activated Upgrade procedure http://wiki.laptop.org/go/Activated_Upgrade
Gave 13-Nov-2007, Got 3-Jan-2008.
Nayantara
 
Posts: 60
Joined: Mon Jan 28, 2008 1:48 pm
Location: Boston Area, MA, USA

Re: USB Thumbdrive File Corruption?

Postby ektoric » Thu Jan 31, 2008 5:07 pm

Ben wrote:If I copy the same file from the 4GB thumb drive, both the copy on the XO and the thumb drive is corrupted (the other files on the thumb drive are untouched).

Try this proposed experiment:
Code: Select all
echo "hello world!" > /media/4gusb/hello.txt
cat /media/4gusb/hello.txt
cp /media/4gusb/hello.txt ~/
cat ~/hello.txt
cat /media/4gusb/hello.txt

If I take your problem statement correctly, you're saying that the first "cat" statement will show "hello world!" correctly, while the second two will be corrupt?

If so, could you provide a dmesg dump right after this experiement?
ektoric
Support Team
 
Posts: 470
Joined: Wed Jan 02, 2008 3:46 pm
Location: Austin, TX


Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest