help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

save state and restore (for grub 2)


From: Dan Hitt
Subject: save state and restore (for grub 2)
Date: Sun, 18 Mar 2012 19:53:20 -0700

I have a gpt (as opposed to mbr) system ("first system")
on which i use grub 1.99 to boot into one of several oses
(including two versions of ubuntu as well as blag).

On a similar system ("second system"), i tried to
install gnewsense, which somehow clobbered my grub.
I couldn't actually boot the gnewsense cd on the first system,
which turned out to be a blessing in disguise, i guess.

And this isn't the first time that i've clobbered grub
by adding a new os to a partition (even if the installer
promises not to touch grub).  (I think it has to do
with earlier versions of grub not knowing about later
versions, or install scripts not being aware of various
logical possibilities that can actually occur.)

Anyhow, my first system is still intact, so i would like
to save its state, so that it can be restored later if necessary,
after the next time some os installation goes bad.

But i'm not sure exactly what has to be saved.

I suppose the first 512 bytes of the disk have to be saved,
but i think there's more --- the first partition on my gpt disk
starts at 1049kB, and i think some of that large area (approx 1M)
is connected with grub.

And i would prefer that all of this be encapsulated anyway.

Ideally, there would be some program like
  save_grub_state
which i could run (perhaps after booting from a specialized CD)
which would scan my disk, save the grub parts, and write
them out as part of a bootable iso file that i could burn.  Then, after i next
installed something that clobbered my grub area, i wouldn't
have to try to figure out what to do in order to restore the
status quo ante, but i would just boot the rescue cd which would
be able to spray in the original grub 1.99 info to the lowest
megabyte of disk.

I am aware of boot_info_script.sh that gives you a report of
just what is on your disks, and also the super grub cd,
which lets you get into a system that you've lost access to
and try to get it back in order.

But what i want is something a little more atomic,
a save-state and restore path.

Thanks in advance for any pointers or info on this.

dan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]