User:PMay/Complete System Backup

From ArchWiki
< User:PMay
Revision as of 16:19, 27 December 2013 by PMay (Talk | contribs)

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

Use dd to fill the disk with zeros

Fill the /boot partition

  • clear the /boot partition with zero
 dd if=/dev/zero of=/boot/deletemelater bs=1024
 rm /boot/deletemelater

Fill the root partition

  • use df to see how many blocky are free
  • then use dd to fill them
 dd if=/dev/zero of=/deletemelater bs=1024 count=<number_of_free_block - some>
 rm /deletemelater

Backup /boot

 umount /boot
 dd if=/dev/sda2 | gzip | ssh mike@ "cat > boot.img.gz"
 mount /boot