How to dump and restore the Vista recovery partition on HTC Shift

The HTC Shift HDD is 40 GB, exactly 40000536576 bytes. The Host Protected Area starts at 0×88FE00000 and is exactly 3GiB, from linux dmesg output:

sda: Host Protected Area detected.
        current capacity is 71826615 sectors (36775 MB)
        native  capacity is 78126048 sectors (40000 MB)
sda: Host Protected Area disabled.
sda: 78126048 sectors (40000 MB), CHS=16383/255/63

Here’s the radare dump, showing the end of the Vista partition and the start of the Host Protected Area, where the Shift HDD stores the Vista recovery information.

Here is how gparted sees the HTC Shift partitions, the 3.00 GiB “unallocated” space at the end holds the vista recovery information, you can’t see this space in Vista.

So we can dump it using ‘dd’: 0×88FE00000 == 36773560320 , we will read & write 16384 bytes at a time, to speed up the process, so 36773560320/16384 = 2244480

# dd if=/dev/sda of=/media/disk/shift-vista-recovery.bin bs=16384 skip=2244480

If we keep the bin file in a safe place, we can happily use the unallocated space and gain 3GiB of space in our HDD.

The md5sum of my Spanish Vista is the following:

# md5sum shift-vista-recovery-es.bin
5c3a9ea3ea578419daf3f1f242755122  shift-vista-recovery-es.bin

If later on we need to restore it, to be able to recover vista using the Fn+F3 key combo at boot time, we must place it in the same place so, using ‘dd’ this would be:

dd if=/media/disk/shift-vista-recovery.bin of=/dev/sda bs=16384 seek=2244480

You can always boot from a USB pendrive using Slax, to perform the ‘dd’ operations.
Note: Replace ‘/dev/sda’ for ‘/dev/hda’ if using Slax.

5 comentaris per a “How to dump and restore the Vista recovery partition on HTC Shift”

Giorgio
August 8th, 2008 @ 01:26    

you may publish the file bin? Thank you.

Felipe Casado
November 2nd, 2008 @ 23:25    

Hola Pau.
Tengo una htc SHIFT, y he instalado Ubuntu 8.04, me funciona de muerte, por si acaso me hize una imagen .tib con acronis, para poder recuperar el sistema original.
el problema vino cuando el disco duro externo se me estropeó.
no he podido recuperar la imagen.
Por este motivo te solicito la imagen de la particion oculta de tu htc shift en español.
Te agradeceria que me proporcionaras la imagen “shift-vista-recovery.bin”.

Saludos

sam
November 21st, 2008 @ 01:57    

greetings,
thanks to you for those helping you did
i have htc shift and i installed linux 8.04 on all of 40gb harddisk, when i restart i can press fn+3 for recovery of vista but it dose not proceed, just it displays the message and i answer yes but nothing will happen afterword
would you please help me getting my vista back
thanks again in advance

homer
March 7th, 2009 @ 14:46    

to pof
instale un ubuntu mid en mi shift y no me gusto mucho y jodi el parttion del HD y borre la vista shift recovery.bin . a ver si me puedes mandar el ftp o enlace del bin, gracias yo prefero en ingles saludo

Javierllt
May 18th, 2009 @ 14:07    

Hola
Yo desde la inexperiencia y el nerviosismo, cometí el error garrafal de borrar la partición de recuperación. Si alguien pudiera indicarme como conseguir una copia de una dump o darme alguna indicación de que hacer se lo agradecería.

P.D.: Ojalá hubiera visto esta página antes, está genial.

Deixa el teu comentari...