Share your knowledge at the LQ Wiki.
Go Back > Blogs > dr_agon
User Name


Rate this Entry

recover from HP Backup&Recovery partition mess

Posted 06-07-2008 at 08:13 AM by dr_agon

After initial OS installation (WindowsXP) on a HP laptop I created a set of recovery DVDs. The user installed more and more unnecessary programs and remnants after applications removal started to build up, so I decided to revert it to the fresh state after the first run. The important thing is, that after creating the backup DVDs I resized the first (system) partition, created another for user files, and removed the HP Recovery partition, because I decided to keep my backups elsewhere. <!--break--> I didn't change the partitions before first OS installation, because there was a factory preinstalled WindowsXP image on the hard disk.
So, I had a hard disk with 2 partitions: system and user.

I booted from the recovery DVD and chose to restore "entire disk", because other options were to leave existing files on disk, and I wanted to get rid of them. There was no option for choosing the place to which restore the disk contents, neither an option to restore only one partition. I spent a while considering this, but decided to give it a try, thinking that Windows usually named a partition - "disk" ("Disk C: full" etc.). I hoped it will restore the entire backed-up contents to the first partition. I had a full, fresh backup of my disk anyway.
Well, it did exactly that. But... also something more!

It recreated the HP Restore partition, but in wrong way! It shrunk the NTFS filesystem inside the first partition (system), shrunk the second partition (user) without updating the NTFS information inside it, and put the contents of the restore partition at the end of the disk!

The result made me laugh:
I had:
  • the first (system) partition in the original size, but with shrunken filesystem,
  • the second partition (user) shrunken in partition table, but unusable because NTFS was not adjusted to smaller partition,
  • and the third partition (recovery) present as a ghost at the end of the disk, without proper partition table entry.
The system was bootable, but I could not access the user partition files from WindowsXP.

I had to straighten things up.
Using my favourite SystemRescueCd, which I found most helpful many times, I did the following modifications:
  • testdisk found the recovery partition and restored it putting necessary information into the partition table, and also updated the partition table entry for the system partition, shrinking it to the size of filesystem - not very wise, it left unpartitioned space.
  • I tried ntfsfix on the user partition, which probably fixed the problem with different size of filesystem and partition (although I'm not sure, maybe testdisk did it)
  • To resize the system partition to fill the free space I had to use Ranish Partition Manager, because I had trouble with fdisk, parted, and gparted trying to use 255 heads geometry, while all partition table entries were using 240 heads.
  • ntfsresize adjusted the NTFS on the system partition without any problems.
I have now system, user and recovery partition working.

Many thanks to SystemRescueCd team and NTFS utils team.
Posted in Uncategorized
Views 1444 Comments 0
« Prev     Main     Next »


All times are GMT -5. The time now is 01:04 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration