Hendrik Boom - 23.12.18, 04:15:
> On Sun, Dec 23, 2018 at 02:35:35AM +0100, Gonzalo Pérez de Olaguer
Córdoba wrote:
> > Hi Hendrik,
> >
> > El Sat, 22 Dec 2018 18:20:22 -0500
> >
> > Hendrik Boom <hendrik@???> escribió:
> > > > > > Rename them.
> > > > > >
> > > > > > 1. 'ls -i' #Gets the inode number.
> > > > > > 2. 'find . -inum "inode-number-from-ls -i" -exec mv {}
> > > > > > "newfilename" \;'> >
> > > Yes, I see inode numbers. Unfortunately, the files with slashes
> > > in
> > > their names have question marks for their inode numbers.
> > >
> > > 2522 @ 2523 ? 2526 ? ? 07/TRA~1.MP3
> > > 2516
> >
> > You don't have to use inodes at all. Anything provided by find to
> > match the file will do. For example, try something like:
> >
> > find . -type f -iname '07*TRA*MP3' -exec ...
>
> I'm starting to think the way to go about this is to use a utility
> that bypasses the kernel's VFAT file system and treats /dev/sdb1 as a
> block device. A few have been suggested. Maybe a hex editor. Maybe
> fsck.vfat. Maybe mtools, possibly modified since the documentation
> https://www.gnu.org/software/mtools/manual/mtools.html#default-values
> says:
Well mtools act directly on an FAT filesystem and do not use the vfat/
msdos filesystem drivers in Linux. It has the "mren" command to rename
files.
However I still assume that this FAT filesystem is just corrupted and
that maybe not even mtools is able to do the rename.
What I'd do is:
First copy the whole block device with the filesystem block by block into
a file. Then make a copy of that file. Only work from the copy of the file.
Then you can throw 'mren', 'fsck.vfat' / 'fsck.msdos', use a hex editor,
or well just 'photorec' on it. And due to working with a copy of the
copy you have unlimited attempts.
Thanks,
--
Martin