Unable to copy files with accents in names [solved]

Topics about disk partitioning (fdisk, parted, gparted, partimage), Volumes Management (lvm, evms, dmraid), Storage, file systems, ...
marco
Posts: 5
Joined: 05 Jun 2011, 19:25

Unable to copy files with accents in names [solved]

Postby marco » 05 Jun 2011, 19:31

I am trying to backup files from a dead Windows system to an USB external drive.
The "dead" HD is NTFS, the USB drive is FAT.
I mounted the first readonly to prevent data loss.

When I copy from the first to the second (both with mc and emelfm2) I get error messages about "invalid arguments" which seem to be related to the presence, in many file names, of accented and "special" characters (à è é ì ° ...). Those files are not copied, thus making the backup procedure useless.

How can I tell RescueCD to copy those files as well as the others?

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: Unable to copy files with accents in names

Postby gernot » 05 Jun 2011, 19:50

Use a ntfs-3g mounted NTFS target partition , make a Imagebackup or use a archivetool. A FAT filesysten can't hold all NTFS capabilitis.

Gernot

marco
Posts: 5
Joined: 05 Jun 2011, 19:25

Re: Unable to copy files with accents in names

Postby marco » 06 Jun 2011, 03:13

I usually prefer not using Linux to write on NTFS drives, as I've always read that ntfs writing in Linux is somehow experimental and not as secure as writing on FAT, which Linux has always been perfectly compatible with. Is ntfs-3g officially 100% secure?

The files I have to backup are very important and I can not test them one by one; I need to be sure that if they are copied (the source disk is damaged but happily the damage seems to be elsewhere, in the areas where the OS stands) they are copied well.

Actually emelFM2 seems to copy the file very seamlessly, giving no reading errors at all. The only thing is that it refuses to copy those file which have "special" characters in their names or paths. It's just a matter of names, nothing to do with those NTFS's capabilities which FAT is unable to hold. If I use the "Copy as..." command removing/changing those characters the files get copied immediately with no problems at all. Sadly those files are many hundreds: I can't rename/copy them one by one.

It seems impossible to me that RescueCD, which is designed exactly for this kind of tasks (accessing a broken system and copying the "good" files away before it's too late), can not cope with a such common situation. That would make this tool totally useless to almost all european people and also to all those americans who have some euro-named files on their computers and servers...
But, another very unexpected thing, I was not able to find any help about it.

So I posted a message here, hoping someone can teach me how to set things correctly.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: Unable to copy files with accents in names

Postby gernot » 06 Jun 2011, 04:03

That is what i mean with capabilitys. The charset used for filenames is not the same. There are options for the used charset while mounting FAT filseystems, but i think it dont solve the problem full:
codepage=value
Sets the codepage for converting to shortname char­
acters on FAT and VFAT filesystems. By default,
codepage 437 is used.
iocharset=value
Character set to use for converting between 8 bit
characters and 16 bit Unicode characters. The
default is iso8859-1. Long filenames are stored on
disk in Unicode format.

ntfs-3g is ok but NTFS is a propritary MS product so there are the problem.

If you want be sure and dont trust linux tools use ddrescue to clone the bad drive 1:1 to a external. Copy then the files under MS.

gernot

marco
Posts: 5
Joined: 05 Jun 2011, 19:25

Re: Unable to copy files with accents in names

Postby marco » 06 Jun 2011, 07:09

I thank you for your help.
My low trust in Linux tools regarding NTFS writing does not come from low trust in "Linux tools" themselves, but in the problems inevitably related to writing data on a file system which specifications are not open and which, obviously, prevents programmers (no matter how skilled) to design a fully reliable driver.

I'm sorry for my low expertise, but I still haven't understood if and how I can get RescueCD to copy files with "european" accented characters in their names.
Do you mean that I can solve my problem by simply using ntfg-3g and a ntfs target disk?

In the end, shall I conclude that RescueCD is not able to copy such kind of files in a totally secure way?

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: Unable to copy files with accents in names

Postby gernot » 06 Jun 2011, 13:55

you cant never be 100% sure. Not with linux or windows.
Make a Imagebackup. Then you can try ntfs3g without risk.
Use Windows to doublecheck.

Gernot

marco
Posts: 5
Joined: 05 Jun 2011, 19:25

Re: Unable to copy files with accents in names

Postby marco » 06 Jun 2011, 17:54

I thank you again for your kind help.

Let me say, anyway, that I've been really very surprised in discovering such a huge limitation in this potentially so powerful tool.

We're not talking about file names written in some rare or ancient language, but about characters which are extremely common everywhere nowadays.
This can make this RescueCD much less useful (or even useless) to a huge lot of people, which is really a pity.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: Unable to copy files with accents in names

Postby gernot » 07 Jun 2011, 04:38

yes, its a limitation, but a small one.
There are other ways to save your data.
Only the "windows style " to solve a problem is not easy.

Gernot

marco
Posts: 5
Joined: 05 Jun 2011, 19:25

Re: Unable to copy files with accents in names

Postby marco » 07 Jun 2011, 18:44

gernot wrote:...Only the "windows style" to solve a problem is not easy...

Well, the meaning of the word "easy" is quite far from being objective.

Anyway, I don't want to be controversial at all. I'm not here to... sell anything, neither the idea that Windows is better than other OSs nor the opposite one; I think they all have their strengths and weaknesses, as any human production.

I've learned that something that looks easy and flawless to me can look difficult and twisted to other people, not necessarily less intelligent or less skilled than I am; I may feel those people as "strange", but they may feel just the same about me, none of us being objectively right or wrong.

In this case, as the rescue CD is intended to be used also by Windows users to rescue their damaged boxes (maybe we should say "especially by Windows users", if we assume that Linux systems are much less likely to crash... :] ), I don't think the limitation about file names is so small.

Anyway, maybe I'm the only one who ran into this.
In the end I was able to solve my problem very well, finding another Linux Live CD (I think live CD are definitely one of the highlights of Linux) which allowed me to copy the files with no error messages at all.

Thanks again for your help.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: Unable to copy files with accents in names

Postby gernot » 07 Jun 2011, 20:02

marco wrote:In the end I was able to solve my problem very well, finding another Linux Live CD (I think live CD are definitely one of the highlights of Linux) which allowed me to copy the files with no error messages at all.

Thanks for this info. If i find time i will try with some charset.
Maybe emelfm2 is participated with the problem.

Gernot

BrunoMarcandella
Posts: 1
Joined: 17 Aug 2011, 16:12

Re: Unable to copy files with accents in names

Postby BrunoMarcandella » 17 Aug 2011, 16:16

I encounter the same prblem as you.
I tried with the --e=ASCII flag that i found in the manual, but without success.

Could you please give me the name of the other Linux Live CD you used with success to copy file with accents in their names ?

Thanks in advance

quidam
Posts: 1
Joined: 24 Feb 2012, 11:27

Re: Unable to copy files with accents in names

Postby quidam » 24 Feb 2012, 12:51

I had the same problem, and I agree with Marco: being unable to copy files with diacritic characters in their name would be a major hindrance for a recovery system.
Non-ASCII characters are VERY common in most human languages apart from basic English.
Resorting to disk image backup isn't near a decent workaround.

Fortunately, there is an easy solution: mount the VFAT device (i.e. most external HDD and USB sticks) with the "utf8" option:

Code: Select all

mount -o utf8 /dev/your_vfat_device /mnt/your_mount_point


For example, if say /dev/sdc1 is the VFAT partition of your USB drive:

Code: Select all

mount -o utf8 /dev/sdc1 /mnt/usbdrive

(Assuming you created the /mnt/usbdrive directory first with

Code: Select all

mkdir /mnt/usbdrive
)

At least that did the trick for me (I use SystemRescueCD 2.4.1, and I thank the authors for this very useful tool).

VFAT and NTFS store their long file names as Unicode UTF-16 (little endian), and the console uses UTF-8 (which is a better choice, but you already knew that, since VFAT and NTFS are Windows file systems, and the console is a Linux shell).
That seems to be a little confusing for the mount command (at least the one in this distribution) which, without the utf8 option, doesn't seem to know how to interpret the non-ASCII characters of a VFAT file system.
mount or ntfs-3g seem to be more clever with NTFS devices, as they don't seem to require this option.

Like Marco, I didn't find much help on this issue, which I also assume to be very common.
Maybe a bit of advice, say on the "Backup data from an unbootable Windows computer" page, would help many people (or a more clever version of the mount command).

ftatooine
Posts: 1
Joined: 02 Sep 2015, 14:26

Re: Unable to copy files with accents in names

Postby ftatooine » 02 Sep 2015, 14:34

Thank you quidam!

Now, September 2015, I had same problem. :)

with x86-4.5.4 version

"invalid arguments" at cp, if file contains slovak character

Thank you very mutch, and authors SystemRescueCd too. Files are save, on external HDD


Return to “Hard-disk partitioning and storage”

Who is online

Users browsing this forum: No registered users and 6 guests