Menu

#90 unable to boot windows XP

open
nobody
None
5
2011-09-22
2011-09-22
Look First
No

Ok, so I tried to install Ubuntu Linux on an external USB drive connected to my dual boot iMac. After the deed was done, I was unable to boot into Ubuntu Linux and then I discovered that I could no longer boot into Windows XP on my dual boot iMac. I am still able to boot into my Snow Leopard. I decided to abandon the experiment of installing Ubuntu Linux hoping that uninstalling would somehow fix my no-longer-bootable Windows XP. It did not.

I saw on http://refit.sourceforge.net/help/usb_disk.html , the following quote: "That’s because it normally re-initializes the driver stack during the boot process in a way that disrupts its own access to the boot drive." This is what I believe has happened. My question would be: How do I fix it so that the boot process will recognize Windows XP like it did before? Incidentally, it still offers Linux as a bootable option when I no longer have my USB hard drive connected (not that I have it anymore even when I connect the USB hard drive).

Any assistance/advice would be greatly appreciated!

Discussion

  • joevt

    joevt - 2011-09-22

    What do your partitions look like in the MBR and the GPT?

    diskutil list
    sudo fdisk /dev/rdisk0
    sudo gpt -r show -l /dev/disk0

    If rEFIt shows Linux still, even when the USB device is not connected, then it means the Linux installer did something to your internal drive. Maybe it installed grub to it. Check the boot code of the MBR and the partitions (change # to 0 for the MBR, 1 for the block after the MBR, 34 for the block after the GPT table, or the start block of each partition listed by gpt or fdisk)

    sudo dd if=/dev/disk0 count=1 skip=0 count=# | xxd

     
  • joevt

    joevt - 2011-09-22

    Oops, wrong command. It should be:
    sudo dd if=/dev/disk0 count=1 skip=# | xxd

     
  • Look First

    Look First - 2011-10-16

    Thank you for your answer, unfortunately when I try entering those commands in the refit shell it tells me that it does not recognize those commands. So I am unable to reset my dual boot system. I am still unable to boot into my windows XP and I still have Ubuntu as a choice when it doesn't exist on my system. I can only boot into my OS X snow leopard with success.

     
  • joevt

    joevt - 2011-10-16

    Those commands are to be run in the Mac OS X Terminal.app

    There's a script at http://members.shaw.ca/joevt/dumpvols2.sh.zip which will do the same thing for you
    (dumps the contents of the MBR and GPT and also the boot blocks of each
    partition plus NVRAM settings). Run it using a command like this in Terminal.app:

    sudo ./dumpvols.sh > dumpvols_result.txt 2>&1

     
  • Look First

    Look First - 2011-10-16

    seems to have hit a dead end..... here is what happened:
    QUOTATION MARKS BEGIN HERE
    localhost:~ $ diskutil list
    /dev/disk0
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *500.1 GB disk0
    1: EFI 209.7 MB disk0s1
    2: Apple_HFS Macintosh HD 284.5 GB disk0s2
    3: Microsoft Basic Data BOOTCAMP 215.2 GB disk0s3
    localhost:~ $ sudo fdisk /dev/rdisk0
    Disk: /dev/rdisk0 geometry: 60801/255/63 [976773168 sectors]
    Signature: 0xAA55
    Starting Ending
    #: id cyl hd sec - cyl hd sec [ start - size]
    ------------------------------------------------------------------------
    1: EE 0 0 2 - 25 127 14 [ 1 - 409639] <Unknown ID>
    2: AF 25 127 15 - 1023 10 55 [ 409640 - 555745280] HFS+
    *3: 07 1023 91 57 - 1023 80 23 [ 556417064 - 420356064] HPFS/QNX/AUX
    4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
    localhost:~ $ sudo gpt -r show -l /dev/disk0
    gpt show: /dev/disk0: Suspicious MBR at sector 0
    start size index contents
    0 1 MBR
    1 1 Pri GPT header
    2 32 Pri GPT table
    34 6
    40 409600 1 GPT part - "EFI System Partition"
    409640 555745280 2 GPT part - "Customer"
    556154920 262144
    556417064 420356064 3 GPT part - "Untitled 2"
    976773128 7
    976773135 32 Sec GPT table
    976773167 1 Sec GPT header
    localhost:~ $ sudo dd if=/dev/disk0 count=1 skip=# | xxd
    dd: skip: Invalid argument
    QUOTATION MARKS END HERE

    then I rebooted and I still saw Linux as available, and if I choose Windows XP to boot it sends me to a black screen with a flashing cursor at the top left of the screen. (I don't bother choosing Linux because it doesn't exist, the USB where it would have been is not plugged in and I re-formatted that USB hard drive a month ago when I was unable to boot Linux).... Never any problem getting back to my Mac OS X-Snow leopard....

    Serves me right trying to get a triple boot system with bootcamp and rEFIt with Linux on a USB external hard drive before reading the fine print.... :( (everywhere else it said that it was easy to do.... exception is if I have the specific setup which I happen to have)

     
  • joevt

    joevt - 2011-10-17

    I don't see anything wrong with the gpt and fdisk output.

    For the dd command, you need to replace # with the block number you want to look at.

    # dump contents of MBR
    sudo dd if=/dev/disk0 count=1 skip=0 | xxd

    # dump contents of first block of EFI partition
    sudo dd if=/dev/disk0 count=1 skip=40 | xxd

    # dump contents of first block of HFS partition
    sudo dd if=/dev/disk0 count=1 skip=409640 | xxd

    # dump contents of first block of BootCamp partition
    sudo dd if=/dev/disk0 count=1 skip=556417064 | xxd

    If you did accidentally install grub to the MBR (the first dd command above should tell you that), then there are a few ways to put it back to normal.
    A) Use the Windows Recovery Console and run the FIXMBR command. http://support.microsoft.com/kb/314058
    B) Use a utility like iPartition to replace the boot code. http://www.coriolis-systems.com/iPartition.php
    C) Erase the boot code in the MBR and let rEFIt replace it with it's own.
    D) Find some boot code and write it yourself.

    Are you able to see your BOOTCAMP disk in Mac OS X? Does it have files NTLDR, boot.ini, NTDETECT.COM, and folder WINDOWS?

     

Log in to post a comment.

Auth0 Logo