blob: f915b50597587a0bdb40fe29377ac3957586fa90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
Restore CD architecture ########################################################
the restore CD is based on a mdv rescue CD.
it typically contains:
data/box.XXX/lst
data/box.XXX/hda5
isolinux/all.rdz
isolinux/isolinux.bin
isolinux/isolinux.cfg
isolinux/vmlinuz
install/stage2/rescue.clp
data/box.XXX #######################################################
- lst contains the partition table and the drive geometry
(the format is custom, read and generated by partimage_whole_disk)
- hda5 is an imagefile, a mirror of /dev/hda5
(the format is partimage only, the idea of partimage is same as dump(8))
isolinux ###########################################################
- kernel and stage1 (same as standard mdv rescue)
- isolinux.cfg customized to call directly save_all or rest_all
(with option keepmounted for rest_all)
install/stage2/rescue.clp ##########################################
- compressed loopback containing a iso9660 filesystem.
it is mostly the same as the mdv rescue.clp, *plus* partimage_whole_disk
(nb : use extract_compressed_fs/create_compressed_fs to expand/create rescue.clp)
Mastering process ##############################################################
1. install a distribution and customize it
nb: it's better to leave an empty space on the disk after the /home
partition (since the restore script grows it, it's no waste) to allow
adapting to different disk geometry without failing
2. boot on part_save_all.iso
3. "partimage_whole_disk -s hostfoo save_all /data/box" is called
3.1. it connects to partimaged server on hostfoo
3.2. it fins the first free /data/box.XXX
3.3. it saves the partition table and geometry in /data/box.XXX/lst calling
partimage with action save_file (need a patched partimage)
3.4. it saves the devices needing to be saved calling partimage with action save.
nb: it doesn't save swap partitions (useless)
nb: it doesn't save ntfs/fat partitions
nb: with option save_home_directory, the last linux partition is not saved
4. a restore CD iso is built using the data from step (3.)
5. restore CD is burned
6. restore CD booted on the target computer
7. "partimage_whole_disk rest_all /data/box.XXX" is called
7.1. it resizes main windows partition if wanted and needed
7.2. it gets the partition table and geometry and creates partition table
accordingly
7.3. it creates swap partitions if needed
7.4. it restores linux partitions
7.5. it creates linux partitions if wanted (esp. for /home)
7.6. it grows the last linux partition if wanted (esp. for /home)
7.7. it installs the bootloader (calling rescue script "install_bootloader")
Build process ##################################################################
- patched partimaged must be installed and launched
(one gets patched partimage rpm building with option "--with jail")
- the data gets to /var/lib/partimage/data/box.XXX (owned by user partimag)
- sudo chmod a+r /var/lib/partimage/data/*/*
- in gi/rescue, call
./make_partimage_save_rest_all partimage-0.6.4-7mdk.i586.rpm /var/lib/partimage /data/box.XXX
=> it calls ./make_rescue_img with special options to create a special rescue.clp
=> generates part_save_all.iso and part_rest_all.iso
|