LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
Search this Thread
Old 12-11-2010, 12:14 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,033

Rep: Reputation: 45
About file systems, memory sticks and DVD players.


Hi:

I plug my pen drive (aka USB flash drive or memory stick) into my stand-alone DVD player and, when I switch it from DVD to USB it prints 'No USB device'. (Perhaps this is for an electronics forum.) I think one of the possible causes is it does not like the file system the stick is formatted in. This is how it was formatted, where mkdosfs belongs to package dosfstools:

mkdosfs -F 32 -n MAESTRO! -v -I /dev/sda'

-F 32 is for FAT32.
-n volume label
-v verbose
-I force formatting of whole volume.

Mkdosfs' output was
/dev/sda has 126 heads and 62 secs per track,
logical sec size is 512, using 0xF8 media descriptor,
with 7942144 secs;
file system has 2 32-bit FATs and 8 secs por cluster.
FAT size is 7741 secs, and provides 990828 clusters.
Volume ID is 4730D359, volume label MAESTRO!

However, 'No USB device' seems to refer to a more basic issue. Perhaps it can be programmed, and programmed with the correct driver. Any ideas?
 
Old 12-11-2010, 10:34 AM   #2
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Check the manual.

Maybe don't use the '-I' option.
 
Old 12-11-2010, 12:05 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,944
Blog Entries: 54

Rep: Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731
Quote:
Originally Posted by stf92 View Post
mkdosfs -F 32 -n MAESTRO! -v -I /dev/sda'
Shouldn't the stick have a partition table ('fdisk -l /dev/sda' should show)?
And if it should, shouldn't the FAT32 one be the only partition (and you should use 'mkdosfs -F 32 -n MAESTRO -v -I /dev/sda1' instead)?


(BTW
Quote:
Originally Posted by stf92 View Post
Volume ID is 4730D359, volume label MAESTRO!
ClippyOS vendor says < > : " / \ | ? * chars aren't allowed in file names (+ , ; = [ ] are with LFN) and their FAT restriction doesn't allow < > : " / \ | ? * . , ; + = [ ] chars in volume labels. So maybe an exclamation point shouldn't be used either?)
 
Old 12-11-2010, 03:46 PM   #4
Latios
Member
 
Registered: Dec 2010
Distribution: Arch
Posts: 115

Rep: Reputation: 21
Try to zero the beginning of he stick (dd if=/dev/zero of=/dev/sdb for few seconds then kill it with ctrl c) and formatting again

Try both formatting /dev/sdb or creating /dev/sdb1 and formatting the partition. If creating partition, there are some options for FAT16/32 partitions (in cfdisk go to type and see whats there). Try some of them. The correct one is probably 0b or 0c for FAT32 and 06 or 0e for FAT16)

Try FAT16

Try to make the partition bootable or unbootable by setting the Active flag. Its unrelated, but I have seen devices (even a pc bios once) freak out when its there or not there

Try formatting on a Windows computer, if it worked check on the linux computer what was different
 
Old 12-11-2010, 04:33 PM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,033

Original Poster
Rep: Reputation: 45
Before proceeding, let me say I ran dosfsck (belonging to a slack package) on the stick and it found the boot sector did not match its backup sector (a mere copy of the first). They should be identical. The boot sector is present on every vfat partition, bootable or not, and contains data crucial for the o.s. to understand the disk. Dosfsck asked if I wanted to copy the original to the backup or the backup to the original. I could only answer him by manual inspection of the sectors. May be dd if=/dev/sda <some_stuff>|hexdum -C will do.
 
Old 12-11-2010, 04:44 PM   #6
Latios
Member
 
Registered: Dec 2010
Distribution: Arch
Posts: 115

Rep: Reputation: 21
I wonder why they were different on a new created filesystem
 
Old 12-11-2010, 05:46 PM   #7
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,033

Original Poster
Rep: Reputation: 45
The stick was formatted by me several years ago, under linux, with mkdosfs. I remember I once lost a file I had saved in it (some failure). As my linux box is not USB 2.0 capable, transfers between this stick and my box are slow. And I have 1.1GB in files in it. I was trying to keep them.

Curiously enough, it came formatted with a single 16MB partition (vfat) from the factory, it being a 2GB mem stick. So I ran mkdosfs on it and, for some reason I don't remember, I had to format /dev/sda and not /dev/sda1. The stick worked correcty on new generation dvd player. Now I have what I think is an older one, and the rest has been told.

Last edited by stf92; 12-11-2010 at 05:58 PM.
 
Old 12-12-2010, 05:36 AM   #8
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,033

Original Poster
Rep: Reputation: 45
A solution.

It took me some work to discover what dosfsck was very explicitly telling me. He said:
Code:
Differences have been encountered between the boot sector and its backup.
[offset:original/backup]
65:01/00
He's saying: byte at offset 65 is 0x01 in original, 0x00 at backup.

Offset 65 of the boot sector corresponds to the BPB in a FAT32 filesystem. Wikipedia says:
Quote:
In Windows NT bit 0 is a dirty flag to request chkdsk at boot time. bit 1 requests surface scan too.
And there really were problems in the device (the free clusters summary or something like that).

********** What I finally did ************

The DVD player is currently accepting the memory stick. This is the story: I had never [c]fdisked the stick. I had directly ran 'mkdosfs -F 32 -n <label> -v -I /dev/sda'. First I had tried mke2fs but the player rejected the stick. I thought, then, "every thing is M$ compatible" and fell back on mkdosfs. Notice how, after running that command, the device has no partitions and, therefor, no MBR. First sector on device is straightforwardly the boot sector.

Under these conditions, the DVD player I had before, did not object the stick. Then I replaced the player and, in the meantime, the stick file system was corrupted. When I tried the stick with my new (but actually perhaps an older generation DVD player) player, the latter did not like it. Second step: I run dosfsck (these two programs belong to the dosfstools slackware package) on the stick, who detects the fs inconsistency. Dosfsck then fixes (supposedly) it. But still the player dislikes it. (My machine never complained.)

Finally, not caring about my data being lost this way, I proceed to reformat. This time I intend to make things such that the stick is left as it was when it left the factory. That is: one (and only one) partition 16MB large (sic) (it's a 4MB mem. stick, aka flash drive). As the typical size for FAT16 is 16MB, I make the file system FAT16 (that is, I assume it came with cluster size = eight 512-byte sectors). And this time, I succeed: the set DVD player - flash drive performs well.

However, I'll never know what the player was objecting: the corrupted file system or the lack of partitions/wrong file system. I now shall proceed by trial and error to make the full 4GB usable and I promise not to tell you anything about it. I'm sorry, but many a time I've been told, upon discovery of a solution, to state it in the forum. Greetings.

Last edited by stf92; 12-12-2010 at 12:28 PM.
 
  


Reply


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
memory sticks metallica1973 Linux - Hardware 3 11-14-2006 03:14 PM
mp3 usb players/sticks unihiekka Linux - Hardware 1 12-01-2005 12:32 PM
Burning DVD's and DVD file systems hockeystop Linux - General 0 10-25-2004 11:47 AM
USB memory sticks island_dude Linux - Hardware 1 01-20-2004 11:16 AM
Sony memory sticks? bxb32001 Linux - Hardware 15 08-14-2002 07:16 PM


All times are GMT -5. The time now is 01:31 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration