Codebase list partman-auto / fa0d6e1
Many changes in partman packages, look at debian/changelog files r15332 Anton Zinoviev 20 years ago
14 changed file(s) with 371 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
0 Contents:
1 1. Format of the recipe files
2 2. Architecture specific recipes
3
4
5 1. FORMAT OF THE RECIPE FILES
6 -----------------------------
7
8 All new lines and tabulations in the recipe are converted to spaces.
9 Then two or more consequtive spaces are converted to one space.
10 Almost all tokens must be separated by spaces. An important exception
11 is the opening curly bracket ("{"), before it there must be _no_
12 space.
13
14 In the following rules we denote spaces by "_".
15
16 <recipe>::=<header>_<partitions>
17
18 <header>::=<simple name>|<debconf name>
19
20 <simple name>::=<name>_:
21
22 <name> can be for example "Multi user system".
23
24 <debconf name>::=<debconf template>_::
25
26 The purpose of <debconf name> is to allow translation of the names of
27 the recipes into different languages.
28
29 <partitions>::=<partition>|<partition>_<partitions>
30
31 <partition>::=<limits>_<specifiers>_.
32
33 <limits>::=<minimal size>_<priority>_<maximal size>_<parted fs>
34
35 <minimal size> is the minimal allowed size of the partition in
36 megabytes. It is rounded to cylinder size, so if you make <minimal
37 size> to be 20 MB and the cylinder size is 12MB, then it is possible
38 for the partition to be only 12MB.
39
40 <maximal size> is the maximal size for the partition, i.e. a limit
41 size such that there is no sence to make this partition larger.
42
43 <priority> is some size usually between <minimal size> and <maximal
44 size>. It determines the priority of this partition in the contest
45 with the other partitions for size. Notice that if <priority> is too
46 small (relatively the priority of the other partitions) then this
47 partition will have size close to <minimal size>. That's why to small
48 partitions it is recomented to give <priority> larger than their
49 <maximal size>.
50
51 <parted fs> is the file system as known to parted of this partition.
52
53
54 <specifiers>::=<specifier>|<specifier>_<specifiers>
55
56 <specifier>::=<internal specifier>|<regular specifier>
57
58 <internal specifier>::=$primary{_}|$bootable{_}
59
60 $primary{_} says that the partition should be primary (if possible).
61 $bootable{_} says that the bootable flag will be set.
62
63 <regular specifier>::=<file name>{ <file contents> }
64
65 <file name> is a file to be created in the directory of the partition.
66 <file contents> is the information to write in this file.
67
68
69 2. ARCHITECTURE DEPENTENT RECIPES
70 ---------------------------------
71
72 Some architectures have specific requirements for their partitions.
73 For example many of them require special partitions to support
74 bootloading.
75
76 Suppose that the architecture is powerpc/powermac_newworld. Then
77 partman-auto will look in the following places for recipes:
78
79 /lib/partman/recipes-powerpc-powermac_newworld/*
80 /lib/partman/recipes-powerpc/*
81 /lib/partman/recipes/*
82
83 Partman-auto will use the recipes from the first of these directories
84 that exists.
85
86 Due to limitation of the algorithms in partman-auto, there must be at
87 least one partition with high maximal size so that the whole free
88 space can be used. Usualy you can give the partition containing /home
89 a maximal size 1000000000 which is high enouhg for the present storage
90 devices. Do not use higher than 1000000000 numbers because the shell
91 arithmetic is limited to 31 bits (on i386).
0 65 auto
0 45 auto
0 partman-auto (19) UNRELEASED; urgency=low
1
2 * Anton Zinoviev
3 - move the item in the main partitioning menu up.
4 - recipes/multi_user: give higher priority to the size of /tmp, the
5 limits are still the same (min = about 20MB, max = about 400MB).
6 Thanks to Ivan Nestlerode, closes: #246749
7 - recipes.sh (choose_recipe): add support for architecture dependent
8 recipes
9 - add recipes customised for powerpc newworld. Thanks to Brett Wuth,
10 Giuseppe Sacco, Jared Sulem and Dave Miller,
11 closes: #241817, #244957, #243253, #244977
12 - add recipes customised for hppa
13
14 -- Anton Zinoviev <[email protected]> Wed, 12 May 2004 22:48:00 +0300
15
016 partman-auto (18) unstable; urgency=low
117
218 * Joey Hess
2323 dh_install perform_recipe bin
2424 dh_install recipes.sh lib/partman
2525 debian/install-rc recipes
26 debian/install-rc recipes-hppa
27 debian/install-rc recipes-powerpc-powermac_newworld
2628 debian/install-rc choose_partition
2729 debian/install-rc free_space
2830 debian/install-rc automatically_partition
2222 filesystem{ ext3 }
2323 mountpoint{ /var } .
2424
25 20 50 400 ext3
25 20 300 400 ext3
2626 method{ format }
2727 format{ }
2828 use_filesystem{ }
0 30 atomic
1 50 home
2 80 multi_user
0 partman-auto/text/atomic_scheme ::
1
2 30 1000 35 linux-swap
3 $primary{ }
4 method{ palo } .
5
6 50 1000 130 ext2
7 $primary{ }
8 method{ format }
9 format{ }
10 use_filesystem{ }
11 filesystem{ ext2 }
12 mountpoint{ /boot } .
13
14 500 10000 1000000 ext3
15 $bootable{ }
16 method{ format }
17 format{ }
18 use_filesystem{ }
19 filesystem{ ext3 }
20 mountpoint{ / } .
21
22 64 512 512 linux-swap
23 method{ swap }
24 format{ } .
0 partman-auto/text/home_scheme ::
1
2 30 1000 35 linux-swap
3 $primary{ }
4 method{ palo } .
5
6 50 1000 130 ext2
7 $primary{ }
8 method{ format }
9 format{ }
10 use_filesystem{ }
11 filesystem{ ext2 }
12 mountpoint{ /boot } .
13
14 300 4000 7000 ext3
15 $bootable{ }
16 method{ format }
17 format{ }
18 use_filesystem{ }
19 filesystem{ ext3 }
20 mountpoint{ / } .
21
22 100 10000 1000000000 ext3
23 method{ format }
24 format{ }
25 use_filesystem{ }
26 filesystem{ ext3 }
27 mountpoint{ /home } .
28
29 64 512 512 linux-swap
30 method{ swap }
31 format{ } .
32
0 partman-auto/text/multi_user_scheme ::
1
2 30 1000 35 linux-swap
3 $primary{ }
4 method{ palo } .
5
6 50 1000 130 ext2
7 $primary{ }
8 method{ format }
9 format{ }
10 use_filesystem{ }
11 filesystem{ ext2 }
12 mountpoint{ /boot } .
13
14 30 400 150 ext3
15 $bootable{ }
16 method{ format }
17 format{ }
18 use_filesystem{ }
19 filesystem{ ext3 }
20 mountpoint{ / } .
21
22 500 3000 5000 ext3
23 method{ format }
24 format{ }
25 use_filesystem{ }
26 filesystem{ ext3 }
27 mountpoint{ /usr } .
28
29 40 1500 3000 ext3
30 method{ format }
31 format{ }
32 use_filesystem{ }
33 filesystem{ ext3 }
34 mountpoint{ /var } .
35
36 20 300 400 ext3
37 method{ format }
38 format{ }
39 use_filesystem{ }
40 filesystem{ ext3 }
41 mountpoint{ /tmp } .
42
43 300 3000 1000000000 ext3
44 method{ format }
45 format{ }
46 use_filesystem{ }
47 filesystem{ ext3 }
48 mountpoint{ /home } .
49
50 64 512 512 linux-swap
51 method{ swap }
52 format{ } .
0 30 atomic
1 50 home
2 80 multi_user
0 partman-auto/text/atomic_scheme ::
1
2 2 1000 10 hfs
3 $bootable{ }
4 method{ newworld } .
5
6 500 10000 1000000 ext3
7 $bootable{ }
8 method{ format }
9 format{ }
10 use_filesystem{ }
11 filesystem{ ext3 }
12 mountpoint{ / } .
13
14 64 512 512 linux-swap
15 method{ swap }
16 format{ } .
0 partman-auto/text/home_scheme ::
1
2 2 1000 10 hfs
3 $bootable{ }
4 method{ newworld } .
5
6 300 4000 7000 ext3
7 $bootable{ }
8 method{ format }
9 format{ }
10 use_filesystem{ }
11 filesystem{ ext3 }
12 mountpoint{ / } .
13
14 100 10000 1000000000 ext3
15 method{ format }
16 format{ }
17 use_filesystem{ }
18 filesystem{ ext3 }
19 mountpoint{ /home } .
20
21 64 512 512 linux-swap
22 method{ swap }
23 format{ } .
24
0 partman-auto/text/multi_user_scheme ::
1
2 2 1000 10 hfs
3 $bootable{ }
4 method{ newworld } .
5
6 30 400 150 ext3
7 $bootable{ }
8 method{ format }
9 format{ }
10 use_filesystem{ }
11 filesystem{ ext3 }
12 mountpoint{ / } .
13
14 500 3000 5000 ext3
15 method{ format }
16 format{ }
17 use_filesystem{ }
18 filesystem{ ext3 }
19 mountpoint{ /usr } .
20
21 40 1500 3000 ext3
22 method{ format }
23 format{ }
24 use_filesystem{ }
25 filesystem{ ext3 }
26 mountpoint{ /var } .
27
28 20 300 400 ext3
29 method{ format }
30 format{ }
31 use_filesystem{ }
32 filesystem{ ext3 }
33 mountpoint{ /tmp } .
34
35 300 3000 1000000000 ext3
36 method{ format }
37 format{ }
38 use_filesystem{ }
39 filesystem{ ext3 }
40 mountpoint{ /home } .
41
42 64 512 512 linux-swap
43 method{ swap }
44 format{ } .
245245 }
246246
247247 choose_recipe () {
248 local free_size choices min_size
248 local recipes archdetect arch sub free_size choices min_size
249
250 # recipes=$(
251 # if [ -x /bin/archdetect ]; then
252 # archdetect=$(archdetect)
253 # else
254 # archdetect=unknown/generic
255 # fi
256 # arch=${archdetect%/*}
257 # sub=${archdetect#*/}
258 # for recipe in \
259 # /lib/partman/recipes/* \
260 # /lib/partman/recipes-$arch/* \
261 # /lib/partman/recipes-$arch-$sub/*
262 # do
263 # [ -f $recipe ] || continue
264 # echo ${recipe##*/} ${recipe#/lib/partman/recipes} $recipe
265 # done |
266 # sort | {
267 # oldname=''
268 # while read name recipe; do
269 # if [ "$name" != "$oldname" ]; then
270 # echo $recipe
271 # oldname="$name"
272 # fi
273 # done
274 # }
275 # )
276
277 if [ -x /bin/archdetect ]; then
278 archdetect=$(archdetect)
279 else
280 archdetect=unknown/generic
281 fi
282 arch=${archdetect%/*}
283 sub=${archdetect#*/}
284
285 for recipedir in \
286 /lib/partman/recipes-$arch-$sub \
287 /lib/partman/recipes-$arch \
288 /lib/partman/recipes
289 do
290 if [ -d $recipedir ]; then
291 break
292 fi
293 done
294
249295 free_size=$1
250296 choices=''
251 first_recipe=''
252 for recipe in /lib/partman/recipes/*; do
297 first_recipe=no
298 for recipe in $recipedir/*; do
253299 [ -f "$recipe" ] || continue
254300 decode_recipe $recipe
255301 if [ $(min_size) -le $free_size ]; then
256302 choices="${choices}${recipe}${TAB}${name}${NL}"
257 fi
258 if [ -z "$first_recipe" ]; then
259 first_recipe="$recipe"
260 fi
261 done
262
303 if [ no = "$first_recipe" ]; then
304 first_recipe="$recipe"
305 fi
306 fi
307 done
308
263309 if [ -z "$choices" ]; then
264310 db_input critical partman-auto/no_recipe || true
265311 db_go || true # TODO handle backup right