1 |
Richard Fish wrote: |
2 |
> Jarry wrote: |
3 |
> |
4 |
>> |
5 |
>> Is it not possible to archive MBR too? That way I could save 5. and |
6 |
>> 6., and to automate it with some scripts... |
7 |
> |
8 |
> |
9 |
> |
10 |
> Technically, yes, I guess you could do this. Although, I don't know if |
11 |
> I would really recommend it. |
12 |
> |
13 |
> If you are using a stage 1.5 with grub, you would need to archive the |
14 |
> first 63 blocks of the disk (technically fewer than that, but you would |
15 |
> have to check grub-install's output to be sure of the exact count, and |
16 |
> 63 is the safe number). This is because grub embeds the stage1.5 loader |
17 |
> after the mbr (first block) and the start of the first partition. |
18 |
> |
19 |
> If you are not using the stage 1.5, or you are using lilo, then you have |
20 |
> little choice but to reinstall the boot loader. This is because some |
21 |
> files in /boot are block mapped into the mbr, and the restore process |
22 |
> may have changed the layout of these files, so the block map will be |
23 |
> incorrect. |
24 |
> |
25 |
> I think the safest route is to always let the system write a fresh mbr. |
26 |
> |
27 |
> -Richard |
28 |
> |
29 |
|
30 |
It make sense but is easily bypassable using "hda1" as boot partition |
31 |
AND it's the first on disk, with a little help from "fdisk" and "dd" |
32 |
("##" are shell commands "#" comm.inside fdisk): |
33 |
|
34 |
==== hikky trikky ==== |
35 |
##fdisk /dev/hda |
36 |
#Command (m for help): u |
37 |
Changing display/entry units to sectors |
38 |
#Command (m for help): p |
39 |
|
40 |
Disk /dev/hda: 40.0 GB, 40027029504 bytes |
41 |
255 heads, 63 sectors/track, 4866 cylinders, total 78177792 sectors |
42 |
Units = sectors of 1 * 512 = 512 bytes |
43 |
|
44 |
Device Boot Start End Blocks Id System |
45 |
/dev/hda1 * 63 979964 489951 83 Linux |
46 |
#Command (m for help): q |
47 |
|
48 |
##dd if=/dev/hda of=MBR-boot.backup bs=512 count=489951 |
49 |
==== hikky trikky ==== |
50 |
|
51 |
MBR-boot.backup now contain your MBR + the boot partition. |
52 |
|
53 |
now three question: |
54 |
a) I know noone that use this backup method, is it affidable ? |
55 |
b) What happen if it need to be restored on another disk |
56 |
c) HOW do I restore (hint "man dd") |
57 |
|
58 |
Another hint: always try at least one restore after a choice of backup |
59 |
method, the rule is "you never know" . |
60 |
|
61 |
cheers |
62 |
Francesco |
63 |
-- |
64 |
gentoo-user@g.o mailing list |