Linux NTFS: Difference between revisions

From miki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:
$ fdisk /dev/sda
$ fdisk /dev/sda
</source>
</source>

== Mounting ==
References
* https://help.ubuntu.com/community/MountingWindowsPartitions/ThirdPartyNTFS3G
* http://ubuntuforums.org/archive/index.php/t-1072025.html

All you have to do is edit your /etc/fstab file (note: <tt>ntfs</tt> is actually equivalent to <tt>ntfs-3g</tt> since <tt>/sbin/mount.ntfs</tt> is symlinked to <tt>/sbin/mount.ntfs-3g</tt>):
<source lang="bash">
$ sudo blkid # Get the UUID of the partition to mount
$ gksudo gedit /etc/fstab # Edit the file

# Add a line similar to:
UUID=XXXXXXXXXXXXXXXXXXXXX /media/windows ntfs defaults,umask=007,gid=46 0 1

$ sudo mount -a
</source>
Note that '''gid=46''' refers to '''plugdev''' group.


== NTFSResize ==
== NTFSResize ==

Revision as of 22:34, 8 September 2009

Partitions

Saving partition table data and first sectors, change the table:

$ sfdisk -d /dev/sda >sda.pt
$ dd if=/dev/sda of=sda.mbr bs=512 count=1
$ fdisk /dev/sda

Mounting

References

All you have to do is edit your /etc/fstab file (note: ntfs is actually equivalent to ntfs-3g since /sbin/mount.ntfs is symlinked to /sbin/mount.ntfs-3g):

$ sudo blkid                 # Get the UUID of the partition to mount
$ gksudo gedit /etc/fstab    # Edit the file

# Add a line similar to:
UUID=XXXXXXXXXXXXXXXXXXXXX /media/windows ntfs defaults,umask=007,gid=46 0 1

$ sudo mount -a

Note that gid=46 refers to plugdev group.

NTFSResize

Change the size of an existing NTFS partition

$ fdisk -l /dev/sda                               # List information on partitions on /dev/sda
$ ntfsresize --info /dev/sda1
$ ntfsresize --no-action --size 20152M /dev/sda1  # Testing
$ ntfsresize --no-action --size 20151M /dev/sda1  # Testing
$ ntfsresize --size 20151M /dev/sda1
$ ntfsresize --size 20000M /dev/sda1

NTFSClone

Backup an NTFS partition to a file

$ ntfsclone --save-image -o - /dev/sda1 | gzip -c > backup-20090908.img.gz