Re: Pendrive corrupted filesystem
Rodolfo Medina <rodolfo.medina@gmail.com> writes:
> When I try to remove a certain directory from my pendrive,
> the following error message appears:
>
> $ rm -vr to-be-removed
> rm: WARNING: Circular directory structure.
> This almost certainly means that you have a corrupted file system.
> NOTIFY YOUR SYSTEM MANAGER.
> The following directory is part of the cycle:
> `to-be-removed/News/to-be-removed/News'
>
> . Do I have to throw it away, or is there a way to repair it?
Tony Godshall wrote:
> You can try formatting it, e.g. mkfs.vfat /dev/mypendrive
Owen Heisler <owenh000@gmail.com> wrote:
> You certainly don't need to throw away the drive (just use fdisk to
> repartition and mkdosfs to format it)
Ron Johnson <ron.l.johnson@cox.net> wrote:
> Install dosfstools, umount the
> partition and fsck it.
I used `parted', and the pendrive filesystem seems to be
recovered now. I inserted the pendrive into the usb port, and:
# parted
GNU Parted 1.6.21 with HFS shrink patch 16
Copyright (C) 1998 - 2004 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
Using /dev/sda
(parted) p
Disk geometry for /dev/sda: 0.000-241.500 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.016 241.250 primary fat16 boot
(parted) rm 1
(parted) p
Disk geometry for /dev/sda: 0.000-241.500 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
(parted) mkpartfs primary fat16 0.000 241.500
(parted) p
Disk geometry for /dev/sda: 0.000-241.500 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 235.327 primary fat16
. Then I copied all the files and directories again, and
$ df /mnt/sda1
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 240688 179036 61652 75% /mnt/sda1
. Thanks to all who provided help.
Do you think it is all right now?
Cheers,
Rodolfo
Reply to: