(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
and continue your work there. Thank you.

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 23 Jan 2021, 13:38
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Backing Up ntfs paritions
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Fri 12 Apr 2019, 01:50    Post subject:  Backing Up ntfs paritions  

I have a windows partition kicking around on one or more older machine that I never use and I need the space for linux stuff. I would like to back up the windows partition in case I need something from it (either windows or some document).

I would like the back-up to be as close as possible to the original system but at the same not waste space in my backup due to unused space in the partition.

The tool ntfsclone (manpage), sounds like it will do what I want:

From the manpage:



ntfsclone will efficiently clone (copy, save, backup, restore) or rescue an NTFS filesystem to a sparse file, image, device (partition) or standard output. It works at disk sector level and copies only the used data. Unused disk space becomes zero (cloning to sparse file), encoded with control codes (saving in special image format), left unchanged (cloning to a disk/partition) or filled with zeros (cloning to standard output).

ntfsclone can be useful to make backups, an exact snapshot of an NTFS filesystem and restore it later on, or for developers to test NTFS read/write functionality, troubleshoot/investigate users' issues using the clone without the risk of destroying the original filesystem.

The clone, if not using the special image format, is an exact copy of the original NTFS filesystem from sector to sector thus it can be also mounted just like the original NTFS filesystem. For example if you clone to a file and the kernel has loopback device and NTFS support then the file can be mounted as

    mount -t ntfs -o loop ntfsclone.img /mnt/ntfsclone

I'm not sure if this technique is a completely risk free approach:

The ntfsclone utility guarantees to make an exact copy of NTFS but it won't deal with booting issues. This is by design: ntfsclone is a filesystem, not system utility. Its aim is only NTFS cloning, not Windows cloning. Hereby ntfsclone can be used as a very fast and reliable build block for Windows cloning but itself it's not enough. You can find useful tips following the related links on the below page

Regarding the booting issue workaround. I found the following useful link by digging through the internet archive:
relocntfs - program for adjusting FS start sector on NTFS partitions
This is relevant because:
Usually, Windows will not be able to boot, unless you copy, move or restore NTFS to the same partition which starts at the same sector on the same type of disk having the same BIOS legacy cylinder setting as the original partition and disk had.


If the goal is to move windows to a different machine or virtual box then it's best to delete and re-install from disks. You can find (legal?) isos of these disks online which you can use to install windows provide you have a valid key.

Anyway, there are two types of output that this program generates. One is an image which is faster and can likely be used to restore the orginal file system. Usage:

ntfsclone --save-image [OPTIONS] SOURCE
ntfsclone --restore-image [OPTIONS] SOURCE


#Save an NTFS to a file in the special image format:
    ntfsclone --save-image --output backup.img /dev/hda1
#Restore an NTFS from a special image file to its original partition:
    ntfsclone --restore-image --overwrite /dev/hda1 backup.img

Note that in the above example the option "--save-image" is used to create the special image format which cannot be mounted. One can presumably leave off this option to create a sparse file instead, which can be mounted (see above). However, it might be more difficult to restore the system from a sparse file. Also, note that not all linux utilities may function as expected with sparse files. From the manpage:


Handling Large Sparse Files

As of today Linux provides inadequate support for managing (tar, cp, gzip, gunzip, bzip2, bunzip2, cat, etc) large sparse files. The only main Linux filesystem having support for efficient sparse file handling is XFS by the XFS_IOC_GETBMAPX ioctl(2). However none of the common utilities supports it. This means when you tar, cp, gzip, bzip2, etc a large sparse file they will always read the entire file, even if you use the "sparse support" options.

Further reading:

As a final though perhaps one can write the special image format to a sparse file by using a loop device. I'll have to look into this. Another idea is to restore the image to virtual media (i.e. the hard disk of a virtual machine).
Back to top
View user's profile Send private message Visit poster's website 

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Fri 12 Apr 2019, 02:06    Post subject:  

P.S. I'm not sure if this stuff is still valid but here is a link on moving your windows to a virtual machine:

How to Convert a Physical Windows or Linux PC to a Virtual Machine

and some related stuff can be found at:

such as how to download a legal iso for an older version of window. Again, I don't know what information is still valid and I'm posting this to give people clues of how they might back-up their old windows systems to create more space for linux (e.g. puppy)
Back to top
View user's profile Send private message Visit poster's website 

Joined: 19 May 2009
Posts: 1502
Location: Brisbane, Australia

PostPosted: Fri 12 Apr 2019, 08:35    Post subject:  

I have used PUDD to create a backup of a windows partition a few times before.

It copies the entire partition at a tar.gz file, which is compressed to half the size of the partition. In my case, I backed up two separate 80gig hard drives of XP installations onto an external hard drive, as 40gig files each.

This on it's own might be the solution for you.

I have also converted those backups into working VDI files for use with Virtualbox.

As PUDD backs up the entire partition, you end up with a lot of wasted space. One of the backups I made actually only had about 10gig of data on it, however, the backup was 40gig, half of the 80gig partition.

I have shrunk the VDI file down to about 10gig at it works fine. I use it regularly for old windows work.

This is from memory, so you might need to fill in some gaps to complete the process....

I booted into Puppy on the XP machines using a live CD.

I then found a drive big enough to copy the backup to. In my case It was a network share. You could also use an external hard drive.

I ran PUDD, found under the utility menu of most Puppies.

Using PUDD, I created the backup. This resulted in a tar.gz file.

I extracted the file to a .img file.

I took that resultant .img file, and ran the conversion using virtualbox's inbuilt utility to convert it to a vdi using this command:

VBoxManage convertdd input.img output.vdi

This gives you a vdi file to work with virtualbox. Use it to create a virtual machine. In the vbox settings you need to find the box and tick enable io/apic - from there it works.

You'll probably need to re-activate windows as the hardware has changed, but that is actually pretty easy (ring microsoft).

Once you have it working, you can possibly play with it some more using the vboxmanage tool to reduce the size of the vdi on disk. (this involves a defrag, zeroing unused space in the guest, and then using vboxmanage to shrink the vdi to be the size of actual used space)
Back to top
View user's profile Send private message 

Joined: 19 May 2009
Posts: 1502
Location: Brisbane, Australia

PostPosted: Fri 12 Apr 2019, 08:39    Post subject:  

of course, if what you need is only documents etc, then just copy those and be rid of windows. Pretty much everything works in linux
Back to top
View user's profile Send private message 

Joined: 19 Jul 2006
Posts: 431
Location: UK

PostPosted: Fri 12 Apr 2019, 11:35    Post subject: Have a look at fsarchiver  

Best action is to just make a copy of the important documents from your Home Folder and forget the installation.
You can of course use Clonezilla https://clonezilla.org/ for the whole HD or Partions or if you want an even more compact set of files you could use http://www.fsarchiver.org/
The dd methods are very good but slow because the copy every bit.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0413s ][ Queries: 12 (0.0045s) ][ GZIP on ]