aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoqun Feng <boqun.feng@gmail.com>2016-05-18 23:42:21 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2016-06-14 19:03:28 -0400
commite5731b584b3e521e3db6fda9cdfe10646d3413a3 (patch)
treecc0b626725a3c0871a9658c1e3f2d8c4e862c71a
parent750db0f5f7d0ff6b86158015f02c275702639b20 (diff)
rcutorture/doc: Create initrd using dracut
Using dracut is another way to get an initramfs for KVM-based RCU torture tests, which is more flexible than using the host's initramfs image, because modules and binaries may be added or removed via dracut command options. So add an example in the document, in case that there are some situations where host's initramfs couldn't be used. Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-rw-r--r--tools/testing/selftests/rcutorture/doc/initrd.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/testing/selftests/rcutorture/doc/initrd.txt b/tools/testing/selftests/rcutorture/doc/initrd.txt
index 4170e714f044..833f826d6ec2 100644
--- a/tools/testing/selftests/rcutorture/doc/initrd.txt
+++ b/tools/testing/selftests/rcutorture/doc/initrd.txt
@@ -13,6 +13,22 @@ cd initrd
13cpio -id < /tmp/initrd.img.zcat 13cpio -id < /tmp/initrd.img.zcat
14------------------------------------------------------------------------ 14------------------------------------------------------------------------
15 15
16Another way to create an initramfs image is using "dracut"[1], which is
17available on many distros, however the initramfs dracut generates is a cpio
18archive with another cpio archive in it, so an extra step is needed to create
19the initrd directory hierarchy.
20
21Here are the commands to create a initrd directory for rcutorture using
22dracut:
23
24------------------------------------------------------------------------
25dracut --no-hostonly --no-hostonly-cmdline --module "base bash shutdown" /tmp/initramfs.img
26cd tools/testing/selftests/rcutorture
27mkdir initrd
28cd initrd
29/usr/lib/dracut/skipcpio /tmp/initramfs.img | zcat | cpio -id < /tmp/initramfs.img
30------------------------------------------------------------------------
31
16Interestingly enough, if you are running rcutorture, you don't really 32Interestingly enough, if you are running rcutorture, you don't really
17need userspace in many cases. Running without userspace has the 33need userspace in many cases. Running without userspace has the
18advantage of allowing you to test your kernel independently of the 34advantage of allowing you to test your kernel independently of the
@@ -89,3 +105,9 @@ while :
89do 105do
90 sleep 10 106 sleep 10
91done 107done
108------------------------------------------------------------------------
109
110References:
111[1]: https://dracut.wiki.kernel.org/index.php/Main_Page
112[2]: http://blog.elastocloud.org/2015/06/rapid-linux-kernel-devtest-with-qemu.html
113[3]: https://www.centos.org/forums/viewtopic.php?t=51621