Tr:HOWTO: Automount NTFS partitions as read/write

From Sabayon Wiki
Revision as of 09:22, 16 November 2012 by Hatalar205 (talk | contribs) (Created page with "{{I18n| en pl tr}} = NTFS Böl...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
i18n: en pl tr

NTFS Bölümlerini Okuma/Yazma Haklarıyla Otomatik Bağlama

Actually all Sabayon Linux Distros from 3.4+ use SATA imaging. Which means that all drives appear as sd*. An example is /dev/sda/ Element 22:34, 24 September 2007 (UTC)`

This will show you how to automount your root Window's parition so that you can read and write to it.

Perform the following commands to create a mountpoint and open up fstab to edit

$ su
# mkdir /media/Windows
# nano -w /etc/fstab

Now add the following to the bottom:

/dev/hda1 /media/Windows ntfs-fuse auto,user_xattr,unmask=000 1 1

Change /hda1 to sda1 if you have sata. /media/Windows is our new mountpoint (where you go to see the files after boot time). ntfs-fuse is telling it its a ntfs parition and fuse is needed to write to it. The rest just mounts it automatically and for all users to read and write to it.

If you have a mutliple user system and only want certain users to read/write to it, do the following:

# addgroup ntfs
# adduser <username> ntfs

The output should look something like this:

Adding group `ntfs' (1002)... 

That number is your gid an umask number to use.

and do this instead for fstab:

/dev/hda1    /media/Windows    ntfs-fuse    auto,gid=1002,unmask=0002    0    0

You will need to change the gid and umask to equal that of whatever your ntfs usergroup is.

There you have it. Save and exit. Then reboot and you'll have read/write access to it from /media/Windows

There is more than one way to skin this cat and one of them is ntfs-3g, however I personally favor the above as its worked for me 100% of the time


the ntfs-3g way. This worked for me :) newbies like me might prefer it. It is the newer way.

1. Perform the following commands in a konsole terminal to create a mountpoint and open up the fstab (file system table) to edit (you will need to be root, the command su means super user, and elevates you, so when it asks - type your ROOT password).

$ su
# mkdir /media/Windows #this will be where you will find your ntfs disk. (also it will still show up as before mounted in storage media -it's a twofer! or nonefer!)
#sudo kate /etc/fstab 

Kate is a pretty, more windowsy editor, you need sudo to open the file. fstab(file hidden by default) is where the mount settings are kept (any session button will do, if you are going to have more than one file open then this keeps them neatly)

2. On the last line of fstab paste EITHER

File: (etc/fstab)
/dev/disk/by-id/whatever /media/windowsntfs ntfs-3g defaults 0 0

The spaces are important they are in columns, people don't tell you that.. OR

File: (etc/fstab)
/dev/sdwhatever /media/windowsntfs ntfs-3g defaults 0 0

if you are more used to the sda, sdb disk partition listing. (most of us are) You will see hda on a lot of how to's it used to be that way. sda refers to 1st disk to boot from in bios. sdb 2nd disk.. So sdb3 would mount only the 2nd disk(b) 3rd partition. But you can remove the number and get the lot or change the number... Now save the file... and exit kate. konsole may complain or hang type - exit

3. back at the konsole prompt - no need to reboot!

#edit /etc/fstab #apply modifications, yes you need the "#" before edit
mount -a # mount all the not mounted partitions in /etc/fstab

Done :lol:

For more detail I mixed with look out :roll: opensuse is different somehow


A different way is the following, this way does not use fstab. Post Mounting NTFS partitions in a safe way, without /etc/fstab I want to explain you how to configure HAL to let users mount NTFS partitions without any /etc/fstab hack or shell contorsion.

Fire up your favorite terminal and become root. then copy the lines below in /usr/share/hal/fdi/policy/10osvendor/99-ntfs-policy.fdi:

	<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- --> 
<deviceinfo version="0.2">
<!-- Mount external ntfs drives with user privileges -->
  <match key="block.is_volume" bool="true">
   <match key="volume.fsusage" string="filesystem">
    <match key="@block.storage_device:storage.no_partitions_hint" bool="false">
     <match key="volume.partition.msdos_part_table_type" exists="true">
      <match key="volume.partition.msdos_part_table_type" int="0x07">
       <merge key="volume.mount_option" type="string">umask=0222</merge>

Now, always as root, just run this command:

	sed -i '/# echo "options =/s/#/MOUNTOPTIONS="$MOUNTOPTIONS,$HAL_PROP_VOLUME_MOUNT_OPTION"\n\n#/'/usr/share/hal/scripts/hal-system-storage-mount

Now, just reboot or, for the bravest:

	/etc/init.d/hald restart

...and you are done

--cvill64 21:28, 6 November 2006 (PST)--cvilll64