Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Here's what happened (roughly): Factory installed Win XP I installed RH 7.2 successfully as a dual boot I backed up most (but probably not all) of my data on other ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    6

    Question need help rescuing Win XP /dev/hda1


    Here's what happened (roughly):

    1. Factory installed Win XP
    2. I installed RH 7.2 successfully as a dual boot
    3. I backed up most (but probably not all) of my data on other (new) Windows partitions of the hard drive
    4. Deleted the RH 7.2 partitions, leaving them unallocated
    5. Installed Ubuntu using the advanced option during the partition step, making one ext3 partition and one swap, leaving the Win XP /dev/hda1 intact
    6. Grub gave error 2 on boot
    7. I stupidly followed some advice on deleting Grub: dd if=/dev/zero of=/dev/hda1 bs=446 count=1 (don't do this!)
    8. Grub gave error 22 on boot
    9. Used the XP install disc to boot into the Rescue Console. Tried fixmbr.
    10. I deleted the Ubuntu partitions and installed Ubuntu again, this time asking it to use the largest continuous free space (what I should have done in the first place)
    11. Grub boots Ubuntu successfully
    12. Win XP says (windows)/system32/hal.dll is corrupt and therefore doesn't finish booting. At this point, I'm thinking the dd command overwrote part of hal.dll, but the other files are still ok, even though it can't list C:\ but it can list other Windows partitions.
    13. Parted Magic says partition type for /dev/hda1 is unknown. I write down all the info I can about /dev/hda1 before trying to recreate /dev/hda1 without formatting it.
    14. /dev/hda1 unfortunately starts at an earlier sector now. Windows Rescue Console says C:\ is empty


    Here's what I'd like to know:

    1. Is there a partitioning program that will let me specify start and end sectors for /dev/hda1? (like 63 and 123456789)
    2. Would that make the old files "list-able"?
    3. Would I then be able to overwrite hal.dll with a good copy?
    4. Will there be happiness?


    Thanks in advance for any help!
    Last edited by devZero; 07-25-2009 at 01:15 PM. Reason: Formatting

  2. #2
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    878
    Happiness will be there, no problem with that.
    Life is a tragedy for those who feel and a comedy for those who think.

    Now, to computing.
    There is a wonderful tool called testdisk which can restore lost partitions. It's included in almost all Linux LiveCD's. And yes, fdisk can create partitions using sector numbers. And yes, if you restore original partition boundaries all files will reappear. And no, that dll thing is not overwritten by dd, it's a Windows quirk.

  3. #3
    Just Joined!
    Join Date
    Jul 2009
    Posts
    6

    tragedy looming

    Life is a tragedy for those who feel and a comedy for those who think.

    But I think a tragedy is looming. (Thanks for all those answers! I haven't done anything yet... But I am writing to you from within Ubuntu with the wireless driver help from Linuxant.)

    The following two commands encounter fatal errors -- cfdisk cannot open the drive:
    1. cfdisk /dev/hda
    2. cfdisk /dev/hda1


    The following two commands return nothing:
    1. fdisk -l /dev/hda
    2. fdisk -l /dev/hda1


    In any case, please tell me how to do the following if the above commands don't work...
    1. Delete the first ntfs partition that starts at the wrong sector (0)
    2. Create a new ntfs partition starting at sector A and ending at sector B (numbers I wrote down earlier)


    Again, thanks in advance!

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    878
    fdisk -l
    should tell you what devices are present in your system.
    See man cfdisk for usage.

    Understanding some lost files in some lost partition have nothing to do with big emptiness is a step closer to the enlightenment.

  6. #5
    Just Joined!
    Join Date
    Jul 2009
    Posts
    6

    hmm...

    Some lost files might mean some marital stress. Heh.

    So sfdisk says my /dev/hda1 already begins and ends at the same sectors as the ones I wrote down (63 and some other larger number).

    If that's true, then why can't I list the files in C:\ when in Windows XP Rescue Console? And why can't it boot?

    Could sfdisk be wrong? The reason I ask is because TestDisk found /dev/hda1 to start at sector 0, which seems (to my limited knowledge) to fit with the evidence better.

  7. #6
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    878
    Why you think your first partition starts on 63? Don't see it in your initial post. TestDisk is correct ... probably.

  8. #7
    Just Joined!
    Join Date
    Jul 2009
    Posts
    6

    #13

    At step #13, I wrote down everything displayed in Parted Magic's Info dialog box concerning /dev/hda1

  9. #8
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    878
    Did you have Windows partition back after step #9? You deleted MBR in step #7, but not partition table.

  10. #9
    Just Joined!
    Join Date
    Jul 2009
    Posts
    6
    As far as I can tell, /dev/hda1 was unhappy (and stayed unhappy (directory-un-listable)) starting from the time I brought Ubuntu into the picture and used the advanced partitioning option (where I did not specify any change to /dev/hda1)

  11. #10
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    878
    Well, then TestDisk is correct. First partition starting from beginning makes more sense, too. Unless there was a hidden partition for Windows recovery, some manufacturers do this.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •