Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Linux, iHP-140 and mystery files
« previous next »
  • Print
Pages: [1]

Author Topic: Linux, iHP-140 and mystery files  (Read 2505 times)

Offline spurty

  • Member
  • *
  • Posts: 10
Linux, iHP-140 and mystery files
« on: January 08, 2009, 05:59:48 PM »
Hope this wasn't covered but my searching only uncovered something in an unrelated thread about Linux USB drivers not quite being ready for prime time. Anyway, I used to use Rockbox exclusively thru Windows XP and had no problems. The LED light on my player would light when it was transferring and wouldn't let me unmount the player until it was finished doing whatever it was doing.

Now I'm using the latest build with a Puppy Linux live CD and I think it works most of the time but when copying files over the player the indicator light doesn't come on. On a few occasions I think I must have unmounted the player before copy completion because there will be empty or broken files within a directory -- it'll play track 2 then skip to 14 or just get stuck on 3.

I've used several versions of Rockbox in past year or so and have noticed the USB Bootloader screen change a couple of times. Does that vary with operating system and is that what my problem is? Is there a temporary work around like 'ps' to check that the copy process is in fact done? Other than that I'm having to listen to all the files off the player while it's still connected to my computer to make sure they are actually there.

Thanks.
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: Linux, iHP-140 and mystery files
« Reply #1 on: January 08, 2009, 07:31:04 PM »
Have you run a disk checking utility?  If your file system is damaged transferring more files to it isn't a good idea.  You should repair any damage otherwise the situation will likely get worse.

I use my players with Linux and don't have any problems. 
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline spurty

  • Member
  • *
  • Posts: 10
Re: Linux, iHP-140 and mystery files
« Reply #2 on: April 09, 2009, 03:19:35 PM »
Newbie question: Do most Linux distros come with a basic file system checker and repair command?
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: Linux, iHP-140 and mystery files
« Reply #3 on: April 09, 2009, 03:45:02 PM »
fsck.vfat
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline spurty

  • Member
  • *
  • Posts: 10
Re: Linux, iHP-140 and mystery files
« Reply #4 on: May 07, 2009, 09:42:25 AM »
For the benefit of other newbies. I ended up using the command below with Puppy Linux 4.20 where "/dev/sda1" is where my iHP-140 was mounted. To check the 40Gs it took about an hour. Not sure what reclaiming unused clusters is. This mean everything checks out?

#dosfsck -vfat /dev/sda1
dosfsck 3.0.1 (23 Nov 2008)
dosfsck 3.0.1, 23 Nov 2008, FAT32, LFN
Checking we can access the last sector of the filesystem
There are differences between boot sector and its backup.
Differences: (offset:original/backup)
  71:20/00, 72:20/00, 73:20/00, 74:20/00, 75:20/00, 76:20/00, 77:20/00
  , 78:20/00, 79:20/00, 80:20/00, 81:20/00
  Not automatically fixing this.
Boot sector contents:
System ID "MSWIN4.1"
Media byte 0xf8 (hard disk)
       512 bytes per logical sector
     32768 bytes per cluster
        32 reserved sectors
First FAT starts at byte 16384 (sector 32)
         2 FATs, 32 bit entries
   4882432 bytes per FAT (= 9536 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 9781248 (sector 19104)
   1220389 data clusters (39989706752 bytes)
63 sectors/track, 255 heads
        63 hidden sectors
  78124032 sectors total
Checking for bad clusters.
Reclaiming unconnected clusters.
Reclaimed 16875 unused clusters (552960000 bytes) in 112 chains.
Checking free cluster summary.
Performing changes.
/dev/sda1: 2503 files, 332279/1220389 clusters
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: Linux, iHP-140 and mystery files
« Reply #5 on: May 07, 2009, 10:28:55 AM »
You need to supply a switch when you call the command in order to have it automatically repair problems.  You should be able to run fsck.vfat --help for further assistance.
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: Linux, iHP-140 and mystery files
« Reply #6 on: May 07, 2009, 03:23:49 PM »
Quote from: spurty on May 07, 2009, 09:42:25 AM
Not sure what reclaiming unused clusters is. This mean everything checks out?
FAT uses a simply linked lists for files. A big table (the FAT) contains a list of all clusters (the smallest fraction of the filesystem you can allocate). A file is split over several clusters which don't necessarily need to be successive. In the FAT, each cluster is marked as empty, points to the cluster following in the list of a file or is marked as last cluster in a list. This is the data by itself. Now there's the directory entries. Each entry points to the first cluster of that file. To access that file you now know where to start, then you can check the FAT about the next cluster that follows it and so on until you reached the last cluster used by the file.
If you delete a file you have to do two things: you need to remove the entry in the directory, i.e. the pointer to the first cluster. Second, you need to mark all the clusters of a file as empty, so when writing a new file those can get reused.

Due to this structure you can loose clusters by removing the directory entry but not marking the clusters (or only parts of the clusters) in the FAT as empty. If this happened the clusters won't get reused so you can't use the space allocated by those clusters. chkdsk / fsck now checks if all clusters marked as used have a pointer to them. If not, it's a lost cluster. If you create a new directory entry for them (i.e. file pointing to that data) you can delete it and thus regain the space it uses.

(I've left out some details in the explanation, but that's basically what lost clusters are.)
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline spurty

  • Member
  • *
  • Posts: 10
Re: Linux, iHP-140 and mystery files
« Reply #7 on: May 07, 2009, 04:31:56 PM »
@Chronon
I don't think Puppy has fsck.vfat installed by default. I think Die.net mentioned dosfsck when I searched fsck.vfat. Hope I didn't screw things up. It definitely did something. I thought the -vfat was the switch.
-v
Verbose mode.
-f
Salvage unused cluster chains to files.
-a
Automatically repair the file system.
-t
Mark unreadable clusters as bad.

The files I had on beforehand are still there and play fine as far as I know right now. But now there is a slew of weird FSCK files.

FSCK0000.REC
FSCK0001.REC
...
FSCK0111.REC

And these files actually have varying and substantial sizes. Can I (should I) delete these?

@bluebrother
Thanks for the explanation. Eventually I'd like to build a proper Linux box (Arch I think) and learn some of this stuff properly.
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: Linux, iHP-140 and mystery files
« Reply #8 on: May 07, 2009, 05:11:16 PM »
spurty, Ubuntu seems to consider dosfsck, fsck.vfat and fsck.msdos aliases of each other.  http://manpages.ubuntu.com/manpages/jaunty/man8/dosfsck.8.html

According to bluebrother's explanation, I would guess that those files are references to the aforementioned lost clusters, though I am not totally certain.
« Last Edit: May 07, 2009, 06:08:46 PM by Chronon »
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: Linux, iHP-140 and mystery files
« Reply #9 on: May 07, 2009, 06:33:38 PM »
yes, they are recovered "files".  You can safely delete them, unless you want to check them for data you may have lost. 
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline spurty

  • Member
  • *
  • Posts: 10
Re: Linux, iHP-140 and mystery files
« Reply #10 on: May 08, 2009, 07:48:36 PM »
Wow! This has been an educational thread. The Rockbox community is very welcoming. Thoughtful and patient replies by the extremely knowledgeable developers. Other friendly users who don't know the answer, doing the research and writing back.

Open source development can be tedious and thankless. On the other hand, I am inexpressibly grateful and wish the developers could see the huge smile on my face right now. Music is huge part of my life and RockBox is an amazing tool that makes the experience even better.
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: Linux, iHP-140 and mystery files
« Reply #11 on: May 08, 2009, 08:04:18 PM »
Quote from: spurty on May 08, 2009, 07:48:36 PM
Music is huge part of my life and RockBox is an amazing tool that makes the experience even better.

I will second that!   ;)
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Linux, iHP-140 and mystery files
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.084 seconds with 14 queries.