Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
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?


  Search this Thread
Old 11-17-2010, 03:03 AM   #16
LQ Newbie
Registered: Sep 2010
Distribution: Slackware
Posts: 25

Rep: Reputation: Disabled

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
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 1,178

Rep: Reputation: 47
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.


Contains a free cluster (5523521). Assuming EOF.


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.

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
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:45 AM.

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