1 The rcutorture scripting tools automatically create the needed initrd
2 directory using dracut. Failing that, this tool will create an initrd
3 containing a single statically linked binary named "init" that loops
4 over a very long sleep() call. In both cases, this creation is done
5 by tools/testing/selftests/rcutorture/bin/mkinitrd.sh.
7 However, if you are attempting to run rcutorture on a system that does
8 not have dracut installed, and if you don't like the notion of static
9 linking, you might wish to press an existing initrd into service:
11 ------------------------------------------------------------------------
12 cd tools/testing/selftests/rcutorture
13 zcat /initrd.img > /tmp/initrd.img.zcat
16 cpio -id < /tmp/initrd.img.zcat
17 # Manually verify that initrd contains needed binaries and libraries.
18 ------------------------------------------------------------------------
20 Interestingly enough, if you are running rcutorture, you don't really
21 need userspace in many cases. Running without userspace has the
22 advantage of allowing you to test your kernel independently of the
23 distro in place, the root-filesystem layout, and so on. To make this
24 happen, put the following script in the initrd's tree's "/init" file,
27 ------------------------------------------------------------------------
34 ------------------------------------------------------------------------
36 This approach also allows most of the binaries and libraries in the
37 initrd filesystem to be dispensed with, which can save significant
38 space in rcutorture's "res" directory.