Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 41

Thread: HOW TO: Backup and clear MBR (uninstall GRUB)

  1. #21
    pxwpxw's Avatar
    pxwpxw is offline Chocolate Ubuntu Mocha Blend
    Join Date
    Apr 2006
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOW TO: Backup and clear MBR (uninstall GRUB)

    Quote Originally Posted by stillingen View Post
    I've ended up with not being able to read /dev/sda after clearing the MBR. I've tried running from Ubuntu LiveCD. Is there a way to restore my MBR, or do I have to reinstall OSX and Ubuntu?
    If the problem is an unusable MBR sector on sda, there is a procedure which may fix that.
    It was done using Macosx, but can be done from a Ubuntu live cd.
    It just writes a fake MBR to allow the refit partition tool to resync the MBR.
    You can then install the refit package and run gptsync from the Live CD.

    You first need to check the state of the sda MBR sector by doing a hexdump to see if this applies to you, it may not.

    There is a record of a succesful fix using my posts in these links, you need to read around these posts for the full story..

    Re: 8.04 cleared the MBR partition table
    http://ubuntuforums.org/showpost.php...5&postcount=24

    http://ubuntuforums.org/showpost.php...8&postcount=30
    (attached dummymbr.txt)

    http://ubuntuforums.org/showpost.php...0&postcount=37

  2. #22
    Join Date
    Aug 2005
    Location
    Huntsville, AL, USA
    Beans
    7,526
    Distro
    Ubuntu

    Re: HOW TO: Backup and clear MBR (uninstall GRUB)

    My procedure seems to have stopped working appropriately very recently. I will modify the original post.

    Which command did you run?

    If you created a backup of the MBR (as indicated in the original post) you should be able to restore it as instructed from the LiveCD.

    pxwpxw, What should be modified (if anything) in the original commands so that this does not occur?

  3. #23
    Join Date
    Oct 2005
    Beans
    31
    Distro
    Dapper Drake Testing/

    Re: HOW TO: Backup and clear MBR (uninstall GRUB)

    Quote Originally Posted by pxwpxw View Post
    If the problem is an unusable MBR sector on sda, there is a procedure which may fix that.
    It was done using Macosx, but can be done from a Ubuntu live cd.
    It just writes a fake MBR to allow the refit partition tool to resync the MBR.
    You can then install the refit package and run gptsync from the Live CD.

    You first need to check the state of the sda MBR sector by doing a hexdump to see if this applies to you, it may not.

    There is a record of a succesful fix using my posts in these links, you need to read around these posts for the full story..

    Re: 8.04 cleared the MBR partition table
    http://ubuntuforums.org/showpost.php...5&postcount=24

    http://ubuntuforums.org/showpost.php...8&postcount=30
    (attached dummymbr.txt)

    http://ubuntuforums.org/showpost.php...0&postcount=37
    Thank you. I've tried your suggestions, and everything seems to go ok, but I still can not boot. When I try to boot I end up with a envelope with an question mark on it (like before).

    Quote Originally Posted by cyberdork33 View Post
    My procedure seems to have stopped working appropriately very recently. I will modify the original post.

    Which command did you run?

    If you created a backup of the MBR (as indicated in the original post) you should be able to restore it as instructed from the LiveCD.

    pxwpxw, What should be modified (if anything) in the original commands so that this does not occur?
    I did indeed back up. But I can access /dev/sda, so I can't get to the back up. When I try to mount, I get "device not found".
    I did both commands

    sudo dd if=/dev/sda of=/home/username/mbr_backup bs=512 count=1

    sudo dd if=/dev/zero of=/dev/sda bs=512 count=1

    I just remembered that there was an Apple Boot / EFI update that I completed couple of days ago. Could that be related.
    Really thankful for your support. I would really like to get my Macbook running again..
    Last edited by stillingen; December 15th, 2008 at 07:55 PM.
    Haakon

  4. #24
    Join Date
    Oct 2005
    Beans
    31
    Distro
    Dapper Drake Testing/

    Re: HOW TO: Backup and clear MBR (uninstall GRUB)

    Tried a your instructions pxwpxw a 2nd time, and got it rolling! Thank you, this saved me days...

    I´m not able to boot using Ubuntu though..
    Haakon

  5. #25
    Join Date
    Aug 2005
    Location
    Huntsville, AL, USA
    Beans
    7,526
    Distro
    Ubuntu

    Re: HOW TO: Backup and clear MBR (uninstall GRUB)

    Quote Originally Posted by stillingen View Post
    I´m not able to boot using Ubuntu though..
    You'll still have to sync the partition tables with rEFIt and possibly reinstall grub.

  6. #26
    pxwpxw's Avatar
    pxwpxw is offline Chocolate Ubuntu Mocha Blend
    Join Date
    Apr 2006
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOW TO: Backup and clear MBR (uninstall GRUB)

    Quote Originally Posted by cyberdork33 View Post
    My procedure seems to have stopped working appropriately very recently. I will modify the original post.

    pxwpxw, What should be modified (if anything) in the original commands so that this does not occur?
    I would just delete reference to clearing the 512 bytes, it makes it unbootable and gptsync refuses to sync it.
    http://ubuntuforums.org/showpost.php...17&postcount=3

    There does not seem to be a need to clear all the MBR partition table unless entries are garbled and stop gptsync from correcting ( message ' suspicious ... not touching that ' ).

    If there is a need, clear 510 bytes leaving the dos mbr signature 55AA, which still wont boot, but gptsync will correct it.
    Preferable to use the 512 byte dummymbr, or 'fakembr' - it clears it but makes it bootable by making a valid entry (doesn't seem to require the correct size, just the valid entry format).
    Might be and idea to attach a fake mbr in the thread for insurance.
    And advise to check with hexdump first.

  7. #27
    Join Date
    Aug 2005
    Location
    Huntsville, AL, USA
    Beans
    7,526
    Distro
    Ubuntu

    Re: HOW TO: Backup and clear MBR (uninstall GRUB)

    Quote Originally Posted by pxwpxw View Post
    I would just delete reference to clearing the 512 bytes, it makes it unbootable and gptsync refuses to sync it.
    http://ubuntuforums.org/showpost.php...17&postcount=3

    There does not seem to be a need to clear all the MBR partition table unless entries are garbled and stop gptsync from correcting ( message ' suspicious ... not touching that ' ).

    If there is a need, clear 510 bytes leaving the dos mbr signature 55AA, which still wont boot, but gptsync will correct it.
    Preferable to use the 512 byte dummymbr, or 'fakembr' - it clears it but makes it bootable by making a valid entry (doesn't seem to require the correct size, just the valid entry format).
    Might be and idea to attach a fake mbr in the thread for insurance.
    And advise to check with hexdump first.
    Ok, I thought maybe just posting the "fake" MBR would be better.
    Odd, that this seems to suddenly not work anymore... I had done it countless times before, and now it breaks everything.

  8. #28
    pxwpxw's Avatar
    pxwpxw is offline Chocolate Ubuntu Mocha Blend
    Join Date
    Apr 2006
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOW TO: Backup and clear MBR (uninstall GRUB)

    Quote Originally Posted by cyberdork33 View Post
    Ok, I thought maybe just posting the "fake" MBR would be better.
    Odd, that this seems to suddenly not work anymore... I had done it countless times before, and now it breaks everything.

    The fake mbr has the advantage that one size seems to fit all drives, even though it is for a different drive size (i have 80GB and 300GB to try it), and it worked for 900GB. It is simply what parted does to the MBR, so it can be written to the mbr by running the parted toggle command twice - but that is for the 804/810 version so IDK.

  9. #29
    pxwpxw's Avatar
    pxwpxw is offline Chocolate Ubuntu Mocha Blend
    Join Date
    Apr 2006
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOW TO: Backup and clear MBR (uninstall GRUB)

    fakembr is actually from an 80GB but size doesn't matter.
    Code:
    mb:~/Desktop/mbrcleard pxw$ hexdump -C fakembr80 
    00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    000001c0  01 00 ee fe ff ff 01 00  00 00 af f8 50 09 00 00  |............P...|
    000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
    00000200
    mb:~/Desktop/mbrcleard pxw$
    Attached Files Attached Files

  10. #30
    Join Date
    Aug 2005
    Location
    Huntsville, AL, USA
    Beans
    7,526
    Distro
    Ubuntu

    Re: HOW TO: Backup and clear MBR (uninstall GRUB)

    Quote Originally Posted by pxwpxw View Post
    fakembr is actually from an 80GB but size doesn't matter.
    Code:
    mb:~/Desktop/mbrcleard pxw$ hexdump -C fakembr80 
    00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    000001c0  01 00 ee fe ff ff 01 00  00 00 af f8 50 09 00 00  |............P...|
    000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
    00000200
    mb:~/Desktop/mbrcleard pxw$
    Ok, please review:
    http://ubuntuforums.org/showpost.php...36&postcount=1

Page 3 of 5 FirstFirst 12345 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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