You are not logged in.

#1 2009-04-26 00:18:29

Young
Member
Registered: 2009-04-26
Posts: 50

Mount NTFS partition.

Hi!

I need to mount a ntfs partition and its files have accented characters, but they are not appearing correctly. My locales are set to pt_BR.iso88591 (I'm from Brazil). I have ntfs-3g installed and have already specified it as the file system. Can someone help me, please?

Offline

#2 2009-04-26 00:35:55

moonfish
Member
From: Germany
Registered: 2008-10-09
Posts: 15

Re: Mount NTFS partition.

Try this:
mount -t ntfs -o iocharset=iso8859-1 /dev/ntfspartition /mountfolder

Offline

#3 2009-04-26 00:55:06

Young
Member
Registered: 2009-04-26
Posts: 50

Re: Mount NTFS partition.

Ok, it mounted the device as ntfs with the correct accents, but I don't have permission to read and write. Is there a way to mount it with accents and ntfs-3g? (I tried the same command with ntfs-3g instead of ntfs, but it didn't worked).

Offline

#4 2009-04-26 06:43:25

darthaxul
Member
Registered: 2008-09-24
Posts: 156

Re: Mount NTFS partition.

make sure u install the ntfs-3g package. u might also need fuse package.

Offline

#5 2009-04-26 08:59:03

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Mount NTFS partition.

Young wrote:

Hi!

I need to mount a ntfs partition and its files have accented characters, but they are not appearing correctly. My locales are set to pt_BR.iso88591 (I'm from Brazil). I have ntfs-3g installed and have already specified it as the file system. Can someone help me, please?

(1) pt_BR.UTF-8 would be a less troublesome choice, in the long run. In fact, en_US.UTF-8 will do just as well, with respect to your trouble.

(2) http://bbs.archlinux.org/viewtopic.php?id=70951

Offline

#6 2009-04-26 18:07:41

Young
Member
Registered: 2009-04-26
Posts: 50

Re: Mount NTFS partition.

Ok. I changed the locale to pt_BR.utf8. Now the name appears correctly, but the accents don't appear when I change to the console (Ctrl + Alt + F1) and try to type something like á, ã, ó... Actually, this was the reason for me to choose ISO-8859-1 before. What do I need to change to fix this?

Offline

#7 2009-04-26 18:27:19

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Mount NTFS partition.

Can't tell smile . I tried to change keyboard layout after Ctrl-Alt-F1; sure enough, it won't switch. I tried it for the first time ever; without your request it would have never occurred to me smile . I used to think that Ctrl-Alt-F1 is an emergency resort and no place to practice my native tongue... On my desktop (KDE) the layout switches as it should, including the windowed console.

By the way, there's no law against enabling both UTF and ISO locales. Your NTFS partitions will still be mounted according to the fdi policy, your console - well, you can try...

Offline

#8 2009-04-26 18:45:28

Young
Member
Registered: 2009-04-26
Posts: 50

Re: Mount NTFS partition.

Ok. I copied the fdi policy file from /usr/share/hal/fdi/policy/10osvendor/20-ntfs-config-write-policy.fdi to /etc/hal/fdi/policy/20-ntfs-config-write-policy.fdi, but what do I have to change inside it to correct the locale information? I don't know too much about this "fdi policy" things. tongue

Offline

#9 2009-04-26 18:58:56

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Mount NTFS partition.

Probably nothing. UTF thing is mentioned only once in the policy file, and very conveniently without any prefix. Anything wrong? You can also compare it with the 10-ntfs-policy.fdi I posted: it lives on my box since time immemorial (it hasn't always been standard issue), and is still in service.

Offline

#10 2009-04-26 19:22:24

Young
Member
Registered: 2009-04-26
Posts: 50

Re: Mount NTFS partition.

This is what I did now: changed the locale back to pt_BR.iso85591 in /etc/rc.conf, and the accents in console are working fine, but the filenames are wrong again in my ntfs-3g mount. It seems that I need to choose one or another (the accents in console with pt_BR.iso88591 or the accents in the ntfs-3g mount with pt_BR.utf8). What should I do to make both work at the same time?

Offline

#11 2009-04-26 19:34:13

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Mount NTFS partition.

Sorry, but my expertise doesn't reach that far smile . I always hated these complications; I use en_US.UTF-8 locale for everything. Thank God, it's good enough to show correct file names and enable correct input on the desktop; everything else I'm happy to have in English.

Offline

#12 2009-04-26 19:45:32

Young
Member
Registered: 2009-04-26
Posts: 50

Re: Mount NTFS partition.

Just one more detail: I configured the mount point in /etc/fstab adding the following line:

/dev/sda1               /mnt/windows    ntfs-3g users,locale=pt_BR.utf8       0       0

Should I change something? I already tried to change the locale to pt_BR.iso88591, but the results are the same (the accents don't appear). By the way, how can I update the locale information changed in /etc/rc.conf without rebooting the system?

Offline

#13 2009-04-26 20:35:37

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Mount NTFS partition.

Maybe iocharset=utf8 instead of locale? Better still (much better), comment it out and rely on automounting.

Offline

#14 2009-04-26 21:07:42

Young
Member
Registered: 2009-04-26
Posts: 50

Re: Mount NTFS partition.

I don't know how to automount my ntfs-3g partition. When I remove the line from /etc/fstab, it just doesn't mount anywhere (according to "mount -a" command). Is there any configuration for this? Maybe another package that I need to install?

Offline

#15 2009-04-26 21:43:31

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Mount NTFS partition.

It depends on your desktop environment. In KDE in may show in Storage Media/Pluggable Media; it can be mounted by clicking; options like "mount on startup" are there somewhere; at least one of my (KDE 3.5) distros automounts everything within reach on logging in without being asked for smile . I never really explored the possibilities...

Last edited by Llama (2009-04-26 21:45:11)

Offline

#16 2009-04-27 15:09:55

Young
Member
Registered: 2009-04-26
Posts: 50

Re: Mount NTFS partition.

I installed the xfce4-mount-plugin package, but it doesn't show my ntfs-3g partition. I still haven't found a solution. I want to mount an ntfs-3g partition with utf8 to see the accents in file names, but leave the system locale as pt_BR.iso88591 (I'm from Brazil) to use special characters (such as "ã, í, ó, â"...) in the console (Ctrl + Alt + F1). Any help would be appreciated.

Offline

#17 2009-04-27 15:14:18

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Mount NTFS partition.

Windows afaik does not use UTF - you're better off using the ISO formats, since that's what the partition is handled with in Windows.

Check a few of your windows text files in Linux with the file command,  you'll see most (if not all) of them report to be in ISO format, not in UTF-8.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#18 2009-04-27 21:23:58

Young
Member
Registered: 2009-04-26
Posts: 50

Re: Mount NTFS partition.

Yes, I was trying to mount the ntfs device as ntfs-3g and with the pt_BR.iso8859 (ISO-8859-1) locale, but without success. The accents in file names were wrong, so I decided to follow the answers above and change the locale to UTF-8. It worked for the file names, but the console accents were messed up. I want to use the ISO-8859-1 charset for the console, but I also need the special characters (â,ó,ã...) in my ntfs files. I don't know how I could do it.

Offline

#19 2009-04-27 22:11:27

Teoulas
Member
From: Athens, Greece
Registered: 2009-03-21
Posts: 70

Re: Mount NTFS partition.

From linuxfromscratch.org:

Some keymaps have dead keys (i.e., keys that don't produce a character by themselves, but put an accent on the character produced by the next key) or define composition rules (such as: "press Ctrl+. A E to get Æ" in the default keymap). Linux-2.6.22.1 in UTF-8 keyboard mode assumes that accented characters produced via dead keys or composing are in the Latin-1 range of Unicode, and it is impossible to change this assumption. Thus, accented characters needed for, e.g., the Czech language, can't be typed on Linux console in UTF-8 mode (but files containing these characters can be displayed correctly). The solution is either to avoid the use of UTF-8, or to install the X window system that doesn't have this limitation in its input handling.

I can't type any accented greek characters in UTF-8 mode, so the above paragraph should be correct. I'm not sure about your case, as you should be covered by the latin-1 range and therefore able to type any accented character in that range.

NTFS filenames are encoded in Unicode (UTF-16LE, I think) that's why you can't see the filenames, unless you mount the partition with utf-8 encoding.

Last edited by Teoulas (2009-04-27 22:14:24)

Offline

#20 2009-04-28 00:19:19

Young
Member
Registered: 2009-04-26
Posts: 50

Re: Mount NTFS partition.

Right, but that's the question: what should I do to automount my ntfs partition with UTF-8 when the system startup, and also keep the ISO-8859-1 charset for all the other things?

Offline

#21 2009-04-29 20:51:51

Young
Member
Registered: 2009-04-26
Posts: 50

Re: Mount NTFS partition.

Despite my researches, I didn't find anything helpful. I tried a lot of combinations in /etc/fstab, but any of them worked. I would really like if anyone could help me. The question remains: how can I automount a NTFS partition with ntfs-3g and access files with special characters (ó, ã, á...) with pt_BR.iso88591 as my locale (so I can type the correct accents in console - Ctrl + Alt + F1 - too).

Offline

Board footer

Powered by FluxBB