[ale] replacing disk sda
Michael H. Warfield
mhw at WittsEnd.com
Wed Apr 23 14:32:24 EDT 2014
On Wed, 2014-04-23 at 13:31 -0400, Paul Cartwright wrote:
> On 04/23/2014 01:15 PM, Michael H. Warfield wrote:
> > The partition table starts at +01BEh in the first sector. Everything
> > before that is boot code and grub / grub2 installs part of itself in
> > there.
> >
> > http://en.wikipedia.org/wiki/Master_boot_record
> I started reading that and my eyes glazed over...
>
> so, sfdisk just backs up the partition table, not the bootloader code?
Correct.
> if your MBR got wiped out and you restored from an sfdisk file, would it
> boot ( assuming your OS partitions were still there)..
Possibly, but not the way to bet. Most drives have a default MBR on
them that may or way not work and would most certainly NOT contain grub.
OTOH, if you restored the entire drive from sector 0 onward, you would
restore the grub code to the MBR. But... If you restore a logical
backup of /boot, it probably won't boot until you rerun grub[2]-install
from a rescue CD.
> I just backed up my sda using clonezilla, restored it to a new drive,
> and I got booted to my grub menu.
I would hope that clonezilla would do the same right thing. Looks like
it did.
> are there other ways to backup the MBR that include the bootloader (
> grub?) info?
dd if=/dev/sda of=mbr bs=512 count=1
Restore works the other way with the proviso that, if you make any
changes to the location of the /boot partition or restore a logical
backup, you'll probably have to rerun grub[2]-install to reinstantiate
the new information.
Regards,
Mike
--
Michael H. Warfield (AI4NB) | (770) 978-7061 | mhw at WittsEnd.com
/\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://mail.ale.org/pipermail/ale/attachments/20140423/c0756403/attachment-0001.sig>
More information about the Ale
mailing list