Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#210005 - 21/03/2004 18:42 Bad FID, bad permissions on sync (help!)
Mataglap
enthusiast

Registered: 11/06/2003
Posts: 384
I've got a file that when I try to sync it errors out with a permission problem. (0xC004100D is "Permission denied" (Player error)) This results in an inconsistent database error. (I've fsck'ed the drive multiple times, no problems reported.)
When I look at the fid, the song file is fine, but the tags file looks like this:

mataglap:/drive1/fids/_00022# cat 531
.@ .!@@@.A@``.a@.@ .@.@.@.@ .!@@@.A@``.a@.@ .@.@.@.@ .!@@@.A@``.a@.@ .@.@.@.@ .!@@@.A@``.a@.@ .@.@.@
mataglap:/drive1/fids/_00022#


Here's the next song, and in fact the next track from the same album:
mataglap:/drive1/fids/_00022# cat 541
artist=Runrig
bitrate=vs160
codec=vorbis
comment=EAC 0.95prebeta5 Ogg post-1.0.1&GT3B2 @q5
ctime=1079842502
date=1998
duration=231026
genre=Folk/Rock
length=4509214
offset=0
replaygain_album_gain=-2.35 dB
replaygain_album_peak=1.10969090
replaygain_track_gain=-3.43 dB
replaygain_track_peak=1.10969090
rid=7db600d652093cfe76fd341685deaac3
samplerate=44100
source=Beat the Drum
title=Satellite Flood
tracknr=2
trailer=0
type=tune
mataglap:/drive1/fids/_00022#


When I try to delete either 530 or 531:
mataglap:/drive1/fids/_00022# rm ./531
rm: remove write-protected file `./531'? y
rm: cannot unlink `./531': Operation not permitted
mataglap:/drive1/fids/_00022#

EDIT: yes, the drive was mounted rw.

My first thought is to look at the file attributes -- maybe the immutable bit
got set somehow -- but I can't find binaries for lsattr or chattr.

So I've got two questions for y'all:
1. Does anyone have binaries for lsattr or chattr that they could point me to? They
are part of e2fsprogs. (I haven't had any good luck getting a cross-compile enviro set
up.)
2. Any ideas why I can't delete the bad tag file? Is it safe to delete the two files
(530 & 531) and then rebuild the database? It seems like it should be...

--Nathan


Edited by Mataglap (21/03/2004 18:47)

Top
#210006 - 21/03/2004 19:07 Re: Bad FID, bad permissions on sync (help!) [Re: Mataglap]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
I have to ask - rw or rwm?

Meanwhile, thinking what else might be involved... Can you do an "ls -al" on that file and the next one over?
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#210007 - 21/03/2004 19:15 Re: Bad FID, bad permissions on sync (help!) [Re: pgrzelak]
Mataglap
enthusiast

Registered: 11/06/2003
Posts: 384
Yeah, I could have been clearer about that, I suppose. I used "/bin/rwm" to remount /dev/hdc4 & /dev/hda4 in read/write mode. verified with a "cat /proc/mounts". There are no problems ls'ing any of the files:
mataglap:/drive1/fids/_00022# ls -al 5[1-9]*
-rw-r--r-- 1 root root 3490730 Feb 15 09:22 510
-rw-r--r-- 1 root root 425 Feb 15 09:22 511
-rw-r--r-- 1 root root 3462822 Feb 15 09:22 520
-rw-r--r-- 1 root root 420 Feb 15 09:22 521
-rw-r--r-- 1 root root 3951064 Mar 21 16:40 530
-rw-r--r-- 1 root root 3072 Feb 15 09:22 531
-rw-r--r-- 1 root root 4509214 Mar 20 20:15 540
-rw-r--r-- 1 root root 429 Mar 20 20:15 541
-rw-r--r-- 1 root root 7822961 Mar 20 20:15 550
-rw-r--r-- 1 root root 426 Mar 20 20:15 551
-rw-r--r-- 1 root root 3740671 Mar 20 20:16 560
-rw-r--r-- 1 root root 433 Mar 20 20:16 561
-rw-r--r-- 1 root root 4413476 Mar 20 20:16 570
-rw-r--r-- 1 root root 426 Mar 20 20:16 571
-rw-r--r-- 1 root root 6923714 Feb 15 09:23 580
-rw-r--r-- 1 root root 435 Feb 15 09:23 581
-rw-r--r-- 1 root root 5663889 Feb 15 09:24 590
-rw-r--r-- 1 root root 428 Feb 15 09:24 591
mataglap:/drive1/fids/_00022#

and I can cat 521 & 541 successfully.

--Nathan

Top
#210008 - 21/03/2004 19:26 Re: Bad FID, bad permissions on sync (help!) [Re: Mataglap]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Hmm... It looks like filesystem errors, but fsck ran clean. Did you use the force tag? (fsck -f) Another thought, can you move (mv) the file into a different directory out of the way? I am not sure how best to proceed otherwise...
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#210009 - 21/03/2004 21:04 Re: Bad FID, bad permissions on sync (help!) [Re: Mataglap]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Weird.

Try debugfs, which you can grab (temporarily) from here.

To use it on your empeg, do something like this:

./debugfs -w /dev/hda4
rm /fids/_00022/531
quit


If the rm (above) fails, then try the freei command, and if that fails use the unlink command. For freei, you'll first need the inode number, which you can get (before running debugfs) with ls -i /drive0/fids/_00022/531

Good luck!

-ml


Edited by mlord (21/03/2004 21:06)

Top
#210010 - 22/03/2004 01:38 Re: Bad FID, bad permissions on sync (help!) [Re: mlord]
Mataglap
enthusiast

Registered: 11/06/2003
Posts: 384
Paul, thanks for the suggestions. Yes, I did force the fsck; no, I didn't try a mv because it was the unlink(2) call that failed. A mv to the same filesystem would have just moved the inode reference around and a mv to a different fs would have called unlink as well.

Mark, that did it, it's gone. Thanks! Did you have to do anything other make sure the ...armtools/bin is first in the path to x-compile debugfs? If the e2fsprogs are cross-compile friendly I'll see if I can't get lsattr built as a test case.

--Nathan

Top
#210011 - 22/03/2004 05:37 Re: Bad FID, bad permissions on sync (help!) [Re: Mataglap]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
I am glad that you got it working! Just a word of clarification - I was hoping you could move the file to /drivex, outside of the fid directory structure so that you could create a new one and resync that way. It is better this way!
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#210012 - 22/03/2004 07:32 Re: Bad FID, bad permissions on sync (help!) [Re: Mataglap]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Did you have to do anything other make sure the ...armtools/bin is first in the path to x-compile debugfs?

I cheated -- I have some Corel Netwinders around here which have the same CPU as the Empeg, so I just copied the binary from one of those!

Cheers

Top
#210013 - 22/03/2004 09:11 Re: Bad FID, bad permissions on sync (help!) [Re: mlord]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Or you could hit http://packages.debian.org, and grab the relevant bits from there...
_________________________
-- roger

Top
#210014 - 22/03/2004 13:31 Re: Bad FID, bad permissions on sync (help!) [Re: mlord]
brendanhoar
enthusiast

Registered: 09/06/2003
Posts: 297
Speaking of compiling for arm:

i've successfully used the skif cluster* at handhelds.org to compile linux binaries for my zaurus sl-c700:

http://www.handhelds.org/projects/skiffcluster.html

Would that not also be useful for quick compiles for the empeg?

-brendan

* a cluster of PDAs...with disk! http://www.handhelds.org/cam.html

Top
#210015 - 23/03/2004 05:43 Re: Bad FID, bad permissions on sync (help!) [Re: brendanhoar]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Would that not also be useful for quick compiles for the empeg?
Could be... the "distro" on an Empeg is quite old by modern standards, though (GCC 2, glibc 2.1.3) and so if your compile farmlet is at all modern, it won't work.

Peter

Top