0

I am a linux newbie, tech oldie.

I am setting up a system with Lubuntu 14.04. Although, when I ran the installation I created two partitions -- 1/2 for quickie backups and 1/2 for the installed system -- lubuntu ignored that and took my entire disk.

Yesterday, I spent a lot of time with the Redo Rescue disk manually recreating what I wanted.

Now, I have the following paritions:

/dev/sda1 ext2 /boot +- 200MB
/dev/sda2 extended +- 244GB
/dev/sda3 ext2 +- 220GB

sda1 and sda2 were created by the installer. I manually created sda3 after resizing those.

within sda2 is a logical volume

sda5 lvm2 pv lubuntu-vg

within sda 5 there are a swap partion and the root partition and nothing else. these were also created by the installer, but I resized them yesterday.

I want to backup sda1 and sda2 to sda3. I have been at this long enough to know that gives me zero protection from a disk failure. I just want to quickly be able to restore my work up to a certain point if I screw something up as I am tweaking the new system.

I have the qt4-fsarchiver LiveCD, the SystemRescueCD LiveCD and the Redo Rescue LiveCD. As a linux newbie, I have been unable to figure out how to do this on any of these.

SuB
  • 4,229
  • 5
  • 24
  • 33
LambdaFox
  • 31
  • 8

1 Answers1

0

Warning: Any time you deal with partitions, you should be very careful, since data might get destroyed.

Try dd.

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

dd if=/dev/sda1 of=/dev/sdb1 bs=4096 conv=notrunc,noerror,sync

To clone a partition

OR

dd if=/dev/sda of=/dev/sdb bs=4096 conv=notrunc,noerror,sync

To clone an entire hard disk

For more info see dd Man Page 1 & Man Page 2

Mitch
  • 107,631
  • Thank you, Mitch. I will give this a try. I am curious, why notrunc and sync? If I understand those correctly, they will expand the backup with empty space. – LambdaFox Apr 27 '14 at 05:17
  • This might help. http://stackoverflow.com/questions/20526198/why-using-conv-notrunc-when-cloning-a-disk-with-dd. sync,noerror is essentil to prevent dd from halting on an error, so it won't make a dump at the same location for each blocks, than source. conv=sync is no good without noerror. – Mitch Apr 27 '14 at 05:48