Recovery after a hardisk disaster

I had screwed up my hardisk a day ago..
wipe off all the “160Gb” hardisk back to factory setting sort of..hehee

but I did managed to recover some partition and data with
TestDisk
I boot with a LiveCD and run downloaded TestDisk binary for
generic linux.
Testdisklogo_clear_100
The step to recover using TestDisk:

1. Select the hardisk device to recover:
mine “/dev/sda”

2. Select type of :
mine “Intel”

3. Select option “Analyze”
some current partition will appear.
4. Select “Search Deeper”
wait until all old partition appear.
.. this moment can see old “/”, “/home”,”vfat” thingy.
wait until completed scanning cyclinder to “100%”

5. Go to each partition .. try list the old data.
by pressing “L”
.. it shall shows some folder inside inside the partition
if recoverable.
if not .. select next partition till can see data ..

6. press “q” to return to previous menu..
7. at the listing when confirmed which one is recoverable.
use arrow key “Left” / “Right” to set properties of partition
either “D-Delete” “P-primary” ,”*–bootable”,”L-Secondary”, “E-Extended”
.. hmm.. on Dell laptop..
there is the first partition for Dell Utility ,
have to press “t” ammend the partition type code to “DE”

8. repeat step 6-7 until all partition got into place correctly,
and the status of MBR become OK…
9. now press “ENTER” to continue..
10. It shall asked to “Write” , “Extend”.
to “MBR” ..the extend is to grow “Extended” partition to fit free space..

11. press write.. “it shall asked for a reboot before can see the old partition again”..

reboot the system and check the newly restored partition table,
peform some fsck and try to read, write.. until satisfied..

some partition had been damaged though..

.. personally from above step , i managed to recover :

[ad#postad] 1. my old “/ ” without “/etc” and some other files.
2. my old “Windows XP partiton on /dev/sda7”.
3. my old “Ubuntu” with some files copied by “Migration Assistant” inside it..
4. my Dell “Recovery” partition of “2GB”. *(permanently deleted afterward)

vanished :

1. my “/home”
2. my “Windows Vista” partition on “/dev/sda2”

.. after giving it a night of recovery..

removed all again..

1. install Ubuntu..9.10 *again*
[ so that i can burn my CentOS 5.4 iso.. from backup repo.. ]

2. install windows xp on new partition ,
so that i can restore the “old XP” with
the bootloader of windows xp.
[ just need to add a line into boot.ini ]

4. install windows vista ? * skipped*

5. install windows 7 ? *skipped as the DVD is unbootable*

6. install CentOS 5.4 .. with new dedicated “/home”

7. mangling around with CentOS 5.4 to get MythTV frontend to work again.
[ so that i can watch TV on my laptop again…]

8. then only think about how to get RPMs tools to work again.
[work related stuff… hahaha] [ad#postad] the current partition table of my notebook become as below :

recovered-abit

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Like

Related Post

2 Responses

  1. HawkEYE says:

    the step to remove old plesk before can start install a new
    but it is preferable to have a complete system restore..
    *** somehow . to wait for sys-admin to do thing to you.. ah.. a lil’ bit fu*ked thing.. why not ***..

    as root..
    1. yum remove psa-*
    2. yum remove httpd
    3. rm -rf /var/httpd -R
    4. rm -rf /usr/local/psa -R
    5. rm -rf /var/www/vhosts -R
    6. service mysqld stop
    7. If don’t know the root pass for myql .try this as root :
    mysqld_safe –skip-grant-table

    6. mysql -uroot
    i. drop database psa
    ii. drop database phpmyadmin_14813SHFF < -- some serial here can see using show databases; iii. drop database horde; iv. drop database sitebuilder; v. and any other thing .. except test and mysql; vi. may have to reset pass for root to blank ... if u want to delete other user than root in mysql use mysql; delete * from user where User!='root'; update user set Password=PASSWORD('') where User='root'; may be need to add the admin user with pass setup. and with all priv here. insert into user (Host,User,Password) values ('localhost',admin,PASSWORD('something-default-here')); then have to grant.. all the privilege. to the admin then remove mysqld. yum remove mysql. ***.. after that may proceed with re-installation process. note i did'nt remove any other user created before.. such as qmail.. bla..bla.. because we are going to re-install .. then.. ./psa_installer_v3.1.2_build070321.17_os_CentOS_4_i386 answer all question.. wait.. till finished.. hopefully no problem.. may be need to flush the firewall services iptables restart.. then can access to https://server.name.com:8443/

    you should see the login screen..
    wahaha..

    Reply
  2. HawkEYE says:

    the step to remove old plesk before can start install a new
    but it is preferable to have a complete system restore..
    *** somehow . to wait for sys-admin to do thing to you.. ah.. a lil’ bit fu*ked thing.. why not ***..

    as root..
    1. yum remove psa-*
    2. yum remove httpd
    3. rm -rf /var/httpd -R
    4. rm -rf /usr/local/psa -R
    5. rm -rf /var/www/vhosts -R
    6. service mysqld stop
    7. If don’t know the root pass for myql .try this as root :
    mysqld_safe –skip-grant-table

    6. mysql -uroot
    i. drop database psa
    ii. drop database phpmyadmin_14813SHFF < -- some serial here can see using show databases; iii. drop database horde; iv. drop database sitebuilder; v. and any other thing .. except test and mysql; vi. may have to reset pass for root to blank ... if u want to delete other user than root in mysql use mysql; delete * from user where User!='root'; update user set Password=PASSWORD('') where User='root'; may be need to add the admin user with pass setup. and with all priv here. insert into user (Host,User,Password) values ('localhost',admin,PASSWORD('something-default-here')); then have to grant.. all the privilege. to the admin then remove mysqld. yum remove mysql. ***.. after that may proceed with re-installation process. note i did'nt remove any other user created before.. such as qmail.. bla..bla.. because we are going to re-install .. then.. ./psa_installer_v3.1.2_build070321.17_os_CentOS_4_i386 answer all question.. wait.. till finished.. hopefully no problem.. may be need to flush the firewall services iptables restart.. then can access to https://server.name.com:8443/

    you should see the login screen..
    wahaha..

    Reply

Anything to add?

X