blob: 1c0a61f4606316691c6be8be91f0e10aafa15fe5 (
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
|
Hi! This is my super-fancy test script that I use for working on the dracut
module in anaconda. It was never intended for public release so I don't really
care that it's ugly and kind of stupid in places. It gets the job done and
that's good enough for me.
If you're reading this, I hope maybe some of this will be useful to you?
-w
Will Woods <wwoods@redhat.com>
HOW IT WORKS:
Before you start, you should edit testboot.conf and set $dracutdir and $cdrom.
The first time you run testboot.sh, , it will open up the configured CDROM
image and pull out some files:
vmlinuz
vmlinuz.kv
initramfs.img.orig
initramfs.orig/
/lib/modules/$(kernel version)/
It then rebuilds the initramfs using the dracut in $dracutdir, and whatever
$dracut_opts you set in testboot.conf. This creates:
initramfs/
Next, if there is an updates/ directory, its contents are copied into
initramfs/. And then we create:
initrd.img
which is just a compressed cpio archive of initramfs/.
Finally, we run virt-install, booting the vmlinuz+initrd.img (PXE-style) with
any kernel arguments given on the commandline.
TIPS:
To force a rebuild of the initramfs, 'rm -rf initramfs'.
Remember that the files in 'updates/' are applied to the *initrd*. If you want
to apply updates to the anaconda runtime put them in 'updates/updates'. For
example, adding 'updates/updates/usr/bin/free' would add the 'free' binary to
the anaconda environment.
BUGS:
If you remove something from updates/, it doesn't get removed from initramfs/.
|