Menu

Filling pagefile.sys with zeros before partition cloning with clonezilla, to make it highly compressable?

zimon
2021-11-03
2021-11-06
  • zimon

    zimon - 2021-11-03

    Cloning Windows (Windows 2000, NTFS, production pc which cannot be upgraded) partition with Clonezilla. Due to some reasons, only smallish USB memory stick 8GB can be used as a backup media. No network.

    Majority of the partition, when compressed with "tar cJf", is containing pagefile.sys file. Doing web search, it seems not to be good advice to remove that file, but what if pagefile.sys is replaced having all zeros but keeping file size the same? Will Windows (2000,NT) be able to re-create the file when booted, and more importantly would not refuse to work then if pagefile.sys is invalid and full of zeros?

    Clonezilla is using compresion, so pagefile.sys containing just zeros would reduce in size nicely.

    Zeroing would be done in CLI with:

    dd if=/dev/zero of=/mnt/sda1/pagefile.sys count=<SIZEWANTED> #  (in Linux)
    

    Maybe this should be asked in some Microsoft Windows oriented discussion forum, but in those usually answer is no you should not delete pagefile.sys
    I am interested if some ppl have experiences just removing pagefile.sys before cloning, or even truncating it, if Windows is able to recover then in the first boot.

     

    Last edit: zimon 2021-11-03
  • Steven Shiau

    Steven Shiau - 2021-11-06

    Thanks for proposing this.
    However, no one reported any issue if they choose to remove the pagefile.sys before taking an image when using the option "-rm-win-swap-file" in the expert mode:
    https://clonezilla.org/clonezilla-live/doc/01_Save_disk_image/advanced/09-advanced-param.php
    Did you encounter any issue?

    Steven

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.