Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
"Circular Directory Structure" Problem with a USB
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
Arisna
n00b
n00b


Joined: 28 Nov 2004
Posts: 1

PostPosted: Sun Nov 28, 2004 7:47 pm    Post subject: "Circular Directory Structure" Problem with a USB Reply with quote

First of all, I'm a newbie here. Hi. I hope this is where this belongs.

My USB Lexar Media "Jumpdrive" went read-only recently after working beautifully for several weeks. It happened after I stupidly tried to back up my home folder to it when I had a CD-size ISO file in there. The Jumpdrive is 256 megabytes. Its file system is FAT. I use Fedora 2, which is why this is here instead of another board. If you think it's odd that a Fedora user posted on this site with a problem, then let's just say that I asked about this on another site, and you folks came very highly recommended. :)

The files on the Jumpdrive are now obsolete, and I have been trying to delete everything and start using the device for backups again.

I discovered that I could delete some directories, but not others. The thing was 100% full due to the ISO, but I was able to delete 99% of the stuff on there after running "dosfsck" and truncating many corrupted files to zero bytes. What was left revealed how bad the problem is. I have multiple "Circular Directory Structures" on this drive, none of which "rm" and any combination of "-drf" will delete. "dosfsck" doesn't find the problem when run with or without arguments, and I can't seem to drop these structures with the "-d" flag.

Many people I've found on Google, and even one on the Italian board here, have gotten this error message, but none quite like this (although my Italian isn't that good, so I'm not sure what happened there). I literally have a big loop in my file structure. To demonstrate very clearly, I could, in theory, do this an infinite number of times if I started at "/mnt/flash", and still be in a valid directory:

Code:
cd ./arisna/.fullcircle


The way I see it, I have three general options here:

    Break these chains and delete the useless directories.
    Format the drive.
    Hide the directories with these circles and pretend they aren't there.


I know how to do the last option, but not the first two. Further, I don't know what my best option would be. How would I break the chains? Would formatting a USB flash drive even be safe? Is it feasible to hide the problem, or will future data I put on there also be corrupted?

Sorry to start asking questions right after showing up, and thanks in advance for any advice.
Back to top
View user's profile Send private message
Quantum_
n00b
n00b


Joined: 07 Nov 2004
Posts: 11

PostPosted: Sun Nov 28, 2004 8:47 pm    Post subject: Reply with quote

# fdisk /dev/sda {or whatever the drivespec is -- When you plug it in, #dmesg}
p
d
1
n
p
1
{and create for the whole flash. Then set the part type. Choose something reasonable this time, like ext2:83 or fat32:c. New parts default to 83}
w
# mkfs.ext2 /dev/sda1
or
# mkfs.vfat /dev/sda1

Might also experiment with cfdisk, but it's 'new' and weird.
# mount -text2 /dev/sda1 /mnt/removable
Back to top
View user's profile Send private message
Arisna
n00b
n00b


Joined: 28 Nov 2004
Posts: 1

PostPosted: Sun Nov 28, 2004 10:09 pm    Post subject: Reply with quote

I had to do it a bit differently, but it worked! After some trial and error, I ended up making a vfat filesystem on it, then writing a partition table with a single Win 95 FAT32 (id b) partition on it. Every time I tried to write the table, I got an "error 22", but this time the thing did something, at least, and I can now mount, write to, read from, and delete files on the device. Thank you very much, and someone please let me know if I've put on a crappy filesystem that will break in a few days. :P
Back to top
View user's profile Send private message
Quantum_
n00b
n00b


Joined: 07 Nov 2004
Posts: 11

PostPosted: Sun Nov 28, 2004 10:15 pm    Post subject: Reply with quote

Nah, you're fine. I guess it can't handle logical block addressing.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum