Sunday, December 2, 2012

Restore an Asus Eee PC 1005PEB (or variant)

This took a long time to figure out, but the end result is fairly easy.

Problem:  Won't boot into Windows and/or can't run restore.

Howto:

Hook up a USB DVD drive or use the internal CD drive.

Power the computer on, and press F2 to get into the bios.
Set the boot order to:
1. CDROM
2. Removeable drive
3. Hard drive

Insert a Linux boot disk or Linux based rescue disk into the appropriate drive.

I found that the computer would not boot from the disk unless I paused it by pressing "break" to give the bios a bit more time to detect the CD.

When you are booted into Linux, do the following as root.

fdisk -l
This shows you the partitions. There are 3 of them.
1. Windows
2. Rescue partition
3. Boot partition

You will note that only the boot partition has the "boot" flag set.
If you can't boot into Windows and the restore "F9" function doesn't work, it is because the boot partition is hosed. In that condition, if you set the boot flag on the Windows partition, it will indeed boot Windows, and you could even leave it that way, but it won't get you restored, so set the boot flag for the rescue partition as follows:
fdisk /dev/sda
a
2
w
fdisk is the program that changes the partitions on the hard drive, which is likely to be /dev/sda but could be something else. a=set boot flag, 2 is the partition number to set it on, w writes the change to disk and exits the fdisk program.

Now reboot from the hard drive and you will boot right into restore without even having to press F9.

Go through the restore process.
Boot into Windows and confirm everything works properly.
The restore process resets the boot flags and rebuilds partitions 1 and 3.
Done.

This next procedure can be considered optional, but it is highly recommended.
Get and burn a Clonezilla disk, connect an external USB hard drive or use a USB thumb drive of 16GB or larger.

Use Clonezilla to create a disk image of the entire hard drive in its freshly rebuilt condition. Save it to the USB drive.

If you do it with files that are 700MB or smaller by instructing Clonezilla to 'split' the image, you will be able to restore the entire drive from the internal cd drive. If you set the split to 4.7GB you can restore the entire drive from DVD using an external drive. If you make one big image you will be able to restore from an external hard drive. This is very useful for when the internal hard drive fails and everything on it is gone. You can buy restore disks from Asus for $50, but that's a ridiculous price.

The end.