[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Backup old boot sectors before installation
From: |
Zhu Yi |
Subject: |
Re: [PATCH] Backup old boot sectors before installation |
Date: |
Mon, 28 Dec 2009 14:55:14 +0800 |
On Fri, 2009-12-25 at 05:21 +0800, Robert Millan wrote:
> I think making a backup is a fine idea, but I'd rather avoid the "option
> creep". It doesn't hurt to simply dump the files in /boot/grub/. If user
> later discovers that valuable data was overwritten, she can figure out
> how to call dd just as she can figure out the right parameters for
> grub-install.
OK. My only concern is the start position of grub core.img (as in disk
sectors) is a variable (see find_usable_region_xxx). This ends up the
backup file is not a simple dump. I used below format in my patch.
<512 bytes MBR> + <U64 start position> + <sizeof(core.img) old sectors>
Option 2 is to put the start position in a separated file.
Option 3 is to use the information in boot.img (as I used in my patch as
a verification method) to get the start position, i.e. `od -j92 -N8 -An
-td8 $grubdir/boot.img`.
Option 4 is to backup everything from MBR to the end of core.img
(including the holes in the middle). This ends up with a bigger image.
Option 1~3 requires the recover has the knowledge of the backup file
format somehow, but a simple dd is enough for option 4. What do you
think?
Thanks,
-yi
- Re: [PATCH] Backup old boot sectors before installation, (continued)
- Re: [PATCH] Backup old boot sectors before installation, Zhu Yi, 2009/12/13
- Re: [PATCH] Backup old boot sectors before installation, kashyap garimella, 2009/12/13
- Re: [PATCH] Backup old boot sectors before installation, address@hidden, 2009/12/13
- Re: [PATCH] Backup old boot sectors before installation, Isaac Dupree, 2009/12/13
- Re: [PATCH] Backup old boot sectors before installation, Zhu Yi, 2009/12/13
- Re: [PATCH] Backup old boot sectors before installation, Isaac Dupree, 2009/12/13
- Re: [PATCH] Backup old boot sectors before installation, Zhu Yi, 2009/12/13
Re: [PATCH] Backup old boot sectors before installation, Robert Millan, 2009/12/24
- Re: [PATCH] Backup old boot sectors before installation,
Zhu Yi <=