Saturday, May 2, 2009

Backup and Restore my EeePC

So I decided to restore my EeePC to the original 701 version today.

I have been doing backup and restore of the whole SSD of my EeePC booting from Pupeee, which is a customized version of Puppy Linux for the EeePC that has everything (except webcam) set up already by default. You only need to download the puppy-eee.iso, burn into a CD, then transfer the system to an USB stick, and boot up - no need for any configuration.

Note:

1) Here are some references for how to transfer Puppy Linux to an USB stick:
-
Puppy on USB pen drive (using the Universal Installer of Puppy Linux)
-
Installing Puppy to USB flash drive from within Windows (if you don't want to burn a CD)
2) For more information on how to use Pupeee, you can refer to the instructions I have written here.

Getting start with Pupeee

So, to start with, first boot up from Pupeee. Press [ESC] at bootup of the EeePC, and select the USB disk as 1st boot device. After a while, you should arrive at the Pupeee desktop.

Next, click on the "drives" icon on the desktop. This will bring up the "Pmount Puppy Drive Mounter" where you can mount the USB drive that stores your EeePC SSD backup image.

Just click on the "harddisk" icon on the right. When you see it becomes green, then the drive is mounted. In my case, I store the backup image in /dev/sdb1, which is mounted to /mnt/sdb1.

Note: In the case of my 4G, /dev/hdc (Drive: SILICONMOTION SM223AC) is the SSD. Be sure not to mount this while you backup and/or restore. The "harddisk" icon on the right should NOT be green.

Restore SSD with dd command

Now, I open a terminal by clicking on the console icon on the desktop, and enter these commands:
cd /mnt/sdb1/eeebackup
gzip -dc SSD.img.gz | dd of=/dev/hdc
Here, SSD.img.gz is the filename of my backup image, and eeebackup is the folder name where I stored this backup image in the USB stick (that is mounted to /mnt/sdb1).

Now time for a coffee. It will take some time (depending on how you have created your backup image).

Backup SSD with dd command

To backup, usually I will take one more step: write zeros to the SSD to reduce the backup image size. For this, you will need to mount all the partitions in drive hdc (with pmount), i.e. hdc1, and hdc2 if you still keep union filesystem.
cd /mnt/hdc1
dd if=/dev/zero of=delete.me bs=8M; rm delete.me
After this is done, then umount the drive (with pmount) and proceed to backup with the dd command:
cd /mnt/sdb1/eeebackup
dd if=/dev/hdc conv=noerror,notrunc,sync bs=64K | gzip > [Backup Image Name].img.gz
Note: If you have retained union filesystem, then it is sensible just to backup the 2nd partition of the SSD, i.e. /dev/sda2 in EeePC Linux or /dev/hdc2 in Pupeee, because the 1st partition is always mounted read only and will never change. In this case you can replace "hdc" with "hdc2" in above dd backup and restore commands.

So, now I am back to my familiar EeePC 4G simple mode desktop with start menu enabled and with random wallpaper.

Next, I will install checkinstall and try to build some Debian packages.

No comments:

Post a Comment