Image Format
Version 7 (Nikos Skalkotos, 11/23/2011 05:00 pm)
1 | 1 | Nikos Skalkotos | h1. Image Format |
---|---|---|---|
2 | 1 | Nikos Skalkotos | |
3 | 4 | Nikos Skalkotos | Right now we support 4 different types of images: |
4 | 4 | Nikos Skalkotos | * extdump |
5 | 4 | Nikos Skalkotos | * ntfsdump |
6 | 4 | Nikos Skalkotos | * diskdump |
7 | 4 | Nikos Skalkotos | * custom |
8 | 1 | Nikos Skalkotos | |
9 | 4 | Nikos Skalkotos | h2. extdump & ntfsdump |
10 | 4 | Nikos Skalkotos | |
11 | 4 | Nikos Skalkotos | Those two formats are raw copies (using dd) of partitions hosting Linux systems on ext{2,3,4} and Windows systems on ntfs filesystems respectively. |
12 | 4 | Nikos Skalkotos | |
13 | 5 | Nikos Skalkotos | Partitions hosting a Windows or Linux system that are suitable for dumping should have the following properties: |
14 | 1 | Nikos Skalkotos | * Be the first partition in the filesystem |
15 | 5 | Nikos Skalkotos | * The OS they host should not depend on any other partitions |
16 | 1 | Nikos Skalkotos | * Start at sector 2048 |
17 | 1 | Nikos Skalkotos | * Have a bootloader installed in the partition |
18 | 5 | Nikos Skalkotos | * Have the root device in /etc/fstab specified in a persistent way, using UUID or LABEL (for extdump only) |
19 | 3 | Nikos Skalkotos | |
20 | 4 | Nikos Skalkotos | h3. Known Issues |
21 | 1 | Nikos Skalkotos | |
22 | 1 | Nikos Skalkotos | * For linux systems, having grub installed in the partition is fragile and things can go wrong when resizing the partitions, especially when shrinking. |
23 | 3 | Nikos Skalkotos | * Swap space is not supported. |
24 | 3 | Nikos Skalkotos | * More complicated partition schemes are not supported. |
25 | 3 | Nikos Skalkotos | |
26 | 1 | Nikos Skalkotos | h2. diskdump |
27 | 1 | Nikos Skalkotos | |
28 | 7 | Nikos Skalkotos | Diskdump is a newer format that overcomes most of the aforementioned issues. This format is a raw copy (dd) of a whole disk. |
29 | 1 | Nikos Skalkotos | |
30 | 7 | Nikos Skalkotos | This design decision has the following benefits: |
31 | 5 | Nikos Skalkotos | * Swap partitions are supported |
32 | 5 | Nikos Skalkotos | * The system may use multiple partitions: |
33 | 5 | Nikos Skalkotos | ** dedicated partitions for /boot, /home etc in linux |
34 | 5 | Nikos Skalkotos | ** system and boot partition in Windows |
35 | 7 | Nikos Skalkotos | * There are no restrictions on starting sectors of partitions |
36 | 5 | Nikos Skalkotos | |
37 | 5 | Nikos Skalkotos | Although diskdump is a lot more flexible that the older formats, there are still some rules to follow: |
38 | 5 | Nikos Skalkotos | * All devices in fstab should be specified by persistent names (UUID or LABEL) |
39 | 6 | Nikos Skalkotos | * LVMs and extended partitions should be avoided. |
40 | 6 | Nikos Skalkotos | ** The support for extended partitions is partial. snf-image does not support resizing logical partitions. |
41 | 6 | Nikos Skalkotos | ** Logical volumes are not supported at all |
42 | 6 | Nikos Skalkotos | * In Linux disks only ext{2,3,4} filesystems are supported |
43 | 6 | Nikos Skalkotos | |
44 | 6 | Nikos Skalkotos | h3. Image Properties |
45 | 6 | Nikos Skalkotos | |
46 | 6 | Nikos Skalkotos | In order for snf-image to be able to properly configure a diskdump image it needs to be aware some of image properties: |
47 | 6 | Nikos Skalkotos | |
48 | 6 | Nikos Skalkotos | * *OSFAMILY={linux|windows}* |
49 | 6 | Nikos Skalkotos | This specifies whether the image is a Linux or a Windows Image |
50 | 6 | Nikos Skalkotos | |
51 | 1 | Nikos Skalkotos | * *ROOT_PARTITION=[1234]* |
52 | 6 | Nikos Skalkotos | This specifies the partition number of the root partition. As mentioned earlier, for now we only support primary partitions |
53 | 6 | Nikos Skalkotos | |
54 | 7 | Nikos Skalkotos | * *USERS="username1 username2...."* |
55 | 7 | Nikos Skalkotos | This is a list of users, snf-image should try to reset the password for. |