Author Topic: How to backup your bootloader (boot sector + extra folder)  (Read 5069 times)

0 Members and 1 Guest are viewing this topic.

zxcasd

  • Entrant
  • Posts: 3
How to backup your bootloader (boot sector + extra folder)
« on: June 02, 2011, 12:41:42 AM »
The request:
I was wondering if anyone knew of a method, command in terminal, program, utility, ritual or prayer that will work with snow Leopard that would allow me to backup the current master boot record + bootloader + bootloader settings to a folder.

I am also obviously interested in learning about how to restore the mbr and bootloader after backing it up  :lol:

The details:
I am very happy with my boot settings but I am about to install Windows 7 on the same hard drive where Snow Leopard is and that means that Windows 7 will overwrite the mbr and I want to be able to undo those Windows 7 changes and putting Chameleon back exactly the way it was.

Note: I have seen chameleon installers and have tried to use them but for whatever reason then the settings that allow my ATI x1300 to work disappear altogether and I get all sort of kernel panics and ended up re-installing so now that I have absolutely everything up and running and don't want to mess it up, backing up the bootloader will be the perfect solution to my dilemma.

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
Re: How to backup your bootloader (boot sector + extra folder)
« Reply #1 on: June 02, 2011, 12:55:58 AM »
Make a Chameleon boot CD that clones your existing Chameleon configuration. Use a CD-RW so you can tweak and re-burn if it doesn't work at first. Once it's working correctly you should be able to boot your existing install without losing functionality.
http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131
for whatever reason then the settings that allow my ATI x1300 to work disappear altogether
You'll need to find out what those settings are. Obviously if you're using some modified version of Chameleon with special ATI sauce, a boot CD using an unmodified cdboot will not work 100%. But it might be good enough to at least let you boot your Hackintosh and then re-install the modified boot loader.
Follow the link in my sig to learn one way to install/update Chameleon.
« Last Edit: June 02, 2011, 01:06:07 AM by Gringo Vermelho »
10.9.5 - ASUS P8Z77-V Pro - i5 3570K - GTX 660 - Chameleon 2.3 svn-r2xxx
How to...
Install Chameleon: http://forum.voodooprojects.org/index.php/topic,649
Make your own Chameleon boot CD: http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131

zxcasd

  • Entrant
  • Posts: 3
Re: How to backup your bootloader (boot sector + extra folder)
« Reply #2 on: June 02, 2011, 01:30:25 AM »
Interesting approach amigo gringo, thanks for the quick reply. i couldn't tell you what makes my setup load w/o difficulties. I get QE/Ci on this x1300 w/o a problem but at one point I used multibeast w/ RC5 by tonymacx86 to re-install the bootloader and it didn't matter what i did, the x1300 would not work (it did 1024*768 and no hardware acceleration of any kind  :-[ ) so i had no choice but to reinstall. i would try the iBoot disk but no luck with that either, so I'm now pretty hesitant to do anything if I'm unable to backup the bootloader as it is (RC4).

At the time I copied the content of the extra folder as it was but i had no luck.

I'd like to wait for a reply that would point out a way to backup the bootloader as it is but I'm definitely giving a try to what you say and see how it behaves, maybe that's the solution to my problem.

kexlam

  • Entrant
  • Posts: 8
Re: How to backup your bootloader (boot sector + extra folder)
« Reply #3 on: June 04, 2011, 10:48:43 AM »
You can use the terminal command "dd" to create a backup of the whole MBR including boot loader and partition table.

The MBR is in the first 512 byte of the disk. Boot loader makes up the first 446 bytes, partition table the next 64 bytes, followed by 2 final bytes of the Magic Number. See Wikipedia for more enlightenment.  :)

Backup the MBR into file:
Code: [Select]
sudo dd if=/dev/diskX of=/PATH/TO/BACKUP/diskX-mbr.bin bs=512 count=1
Restore: Swap the paths after "if=" and "of=":
Code: [Select]
sudo dd if=/PATH/TO/BACKUP/diskX-mbr.bin of=/dev/diskX bs=512 count=1
Restore only the partition table:
Code: [Select]
sudo dd if=/PATH/TO/BACKUP/diskX-mbr.bin of=/dev/sdX bs=1 count=64 skip=446 seek=446
You need an admin password for the "sudo" commands.
The backup file can be named other than "diskX-mbr.bin". If you are experimenting, it's very wise to include date and time in it. :)

To find out the disk number use:
Code: [Select]
diskutil list
This method works from any OS with a terminal (the disk labelling may vary), from the active system, and even through ssh (search for "dd through ssh"). :) I am sure. :)

No idea about boot loader settings, though, sorry.