1

Many laptops are delivered with Windows 7 recovery partition (but without CD or DVD) which takes place on the harddrive that could contain some Linux distribution or serve for data storage.

I don't want to format it because sister paid for this partition and has a license key. But she would like to backup it to some medium and use it in time she will need to use this system.

Is there a command in Linux that will backup this recovery partition or make a bootable DVD from this partition?

Note: The content of the partition is not so important. Important is to make a backup of this partition to some medium (best would be CD or DVD) and show how to restore from that medium.

2
  • How big is the partition? Please post the output of fdisk -l /dev/sda or parted -l /dev/sda -- assuming /dev/sda is your disk. Nov 18, 2011 at 13:10
  • I don't have the laptop at home now.
    – xralf
    Nov 18, 2011 at 13:28

1 Answer 1

1

Using tar and gzip is probably your best bet. You could use dd to do a block-by-block copy of it but this will obviously give you a file exactly the same size as the partition.

Assuming the partition is /dev/sda2, something like:-

mkdir /mnt/recovery
mount -t ntfs /dev/sda2 /mnt/recovery
cd /mnt/recovery
tar -cvf - . | gzip -c >/path/to/store/recovery.tar.gz

should back it up, and:-

mkfs.ntfs /dev/sda2
mount -t ntfs /dev/sda2 /mnt/recovery
cd /mnt/recovery
tar xvf /path/to/sotre/recovery.tar.gz

to put it all back again.

2
  • This makes sense. And what if the partition /dev/sda2 does not exist before recovery? I have to create a partition that is little larger than the extracted archive?
    – xralf
    Dec 1, 2011 at 9:52
  • Yup - that should be fine. I was assuming the partition still existed but recreating one should be fine.
    – Andy Smith
    Dec 1, 2011 at 10:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .