LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-17-2010, 03:03 AM   #16
CMartin
Member
 
Registered: Sep 2010
Distribution: Slackware
Posts: 48

Rep: Reputation: 22

Excuse me, I have no experience with OS on USB sticks; may I safely conclude from this thread that linux installed on a flash memory drive (live-usb) can be configured to write on the stick as well?

For example to configure a web browser from the USB to store cookies on the stick, Vi editor to use /tmp on a stick, or any other application which will need /tmp ? I know it can write to a RAM disk file system, of course, just like a distro on live-cd. But can it write on the stick ?

Last edited by CMartin; 11-17-2010 at 04:21 AM. Reason: spelling
 
Old 11-17-2010, 08:44 AM   #17
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
Quote:
Originally Posted by crashpoint_zero View Post
The above thread was very useful as I am facing the same problem and am running dosfsck to repair my USB drive. Thanks. I googled for what it tries to fix to understand the output and ran it with -v option, but didn't get much information. Can anyone elaborate on what:

File size is 111 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.

and

Contains a free cluster (5523521). Assuming EOF.

signifies?

Does the USB hard drive have an internal table which keeps track of the clusters used and if the table entries are not in sync with the data on the disk, at that time these errors are detected?
Hi and welcome to LQ!
This was an old thread, but anyway -

If I understand correctly those messages simply indicate lost cluster(s) recovered by dosfsck - the type of error caused by write failures, power hiccups, software glitches, etc. The same thing scandisk in DOS/Win fixes without showing such messages. Your messages might be related to a file taking up 111 bytes when the FAT says it should be 0, or an incomplete write.

The same problem as the OP, eh? There are a few possible causes:
1) The number of files/folders on the root of the disk. FAT16 and FAT 32 have limits that can easily be exceeded by today's standards.
2) Power fluctuation on the usb root hub or disk drive. Have you tried testing it on other computers?
3) Corrupt FAT. Maybe dosfsck can't detect or fix this. Wipe and reformat the drive/partition, maybe?
4) Bad sectors where the disk it trying to write. SMART has been good at reassigning bad sectors to avoid problems, but sometimes it runs out of space for reassignment. The badblocks command in linux can scan for bad sectors. Get a copy of the Window$ utility HDDScan and run it with Admin privelege to get a SMART report. High and increasing values for reallocation_sector_count, reallocation_event_count and current_pending_sector_count could indicate pending drive failure.
http://hddscan.com/

USB hard drives and flash drives still use allocation tables for FAT-formatted partitions, or journals for NTFS, to track cluster usage and assignment. USB hard drives are actually internal drives mounted in a box. Anything that applies to internal drives also applies to USB hard drives: partitioning, mechanics, etc. Flash drives, though, also use FAT tables or journals, but the technology is more sensitive, has longer write delays, and more prone to data loss during any of the previously-mentioned situations.

Hope this helps
 
1 members found this post helpful.
Old 11-17-2010, 11:38 PM   #18
crashpoint_zero
LQ Newbie
 
Registered: Nov 2010
Posts: 5

Rep: Reputation: 1
Thumbs up

Thanks Dracolich. This was useful info. Will check out hddscan and badblocks. Hddscan look quite interesting and would be a good tool to know more.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB drive Read/Write - NTFS sp149 Linux - General 7 11-14-2007 04:11 PM
USB flash drive (Pen drive) mounts read only prabhatsoni Linux - Hardware 24 07-02-2007 01:28 PM
usb flash drive always read-only flihp Linux - Hardware 2 11-12-2005 05:14 PM
How to Read USB drive in RH9 omeryasin Linux - Newbie 4 10-28-2005 10:59 PM
read usb drive in redhat 9.0 ? wlaw Linux - Newbie 1 06-21-2004 06:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration