Linux NTFS: Difference between revisions

From miki
Jump to navigation Jump to search
(New page: == NTFSClone == Backup an NTFS partition to a file <source lang="bash"> % ntfsclone --save-image -o - /dev/sda1 | gzip -c > backup-20090908.img.gz </source>)
 
No edit summary
Line 1: Line 1:
== Partitions ==
Saving partition table data and first sectors, change the table:
<source lang="bash">
$ sfdisk -d /dev/sda >sda.pt
$ dd if=/dev/sda of=sda.mbr bs=512 count=1
$ fdisk /dev/sda
</source>

== NTFSResize ==
Change the size of an existing NTFS partition
<source lang="bash">
$ 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
</source>

== NTFSClone ==
== NTFSClone ==
Backup an NTFS partition to a file
Backup an NTFS partition to a file
<source lang="bash">
<source lang="bash">
% ntfsclone --save-image -o - /dev/sda1 | gzip -c > backup-20090908.img.gz
$ ntfsclone --save-image -o - /dev/sda1 | gzip -c > backup-20090908.img.gz
</source>
</source>

Revision as of 21:49, 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

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