~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/rcutorture/doc/rcu-test-image.txt

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 Normally, a minimal initrd is created automatically by the rcutorture
  2 scripting.  But minimal really does mean "minimal", namely just a single
  3 root directory with a single statically linked executable named "init":
  4 
  5 $ size tools/testing/selftests/rcutorture/initrd/init
  6    text    data     bss     dec     hex filename
  7     328       0       8     336     150 tools/testing/selftests/rcutorture/initrd/init
  8 
  9 Suppose you need to run some scripts, perhaps to monitor or control
 10 some aspect of the rcutorture testing.  This will require a more fully
 11 filled-out userspace, perhaps containing libraries, executables for
 12 the shell and other utilities, and soforth.  In that case, place your
 13 desired filesystem here:
 14 
 15         tools/testing/selftests/rcutorture/initrd
 16 
 17 For example, your tools/testing/selftests/rcutorture/initrd/init might
 18 be a script that does any needed mount operations and starts whatever
 19 scripts need starting to properly monitor or control your testing.
 20 The next rcutorture build will then incorporate this filesystem into
 21 the kernel image that is passed to qemu.
 22 
 23 Or maybe you need a real root filesystem for some reason, in which case
 24 please read on!
 25 
 26 The remainder of this document describes one way to create the
 27 rcu-test-image file that contains the filesystem used by the guest-OS
 28 kernel.  There are probably much better ways of doing this, and this
 29 filesystem could no doubt be smaller.  It is probably also possible to
 30 simply download an appropriate image from any number of places.
 31 
 32 That said, here are the commands:
 33 
 34 ------------------------------------------------------------------------
 35 dd if=/dev/zero of=rcu-test-image bs=400M count=1
 36 mkfs.ext3 ./rcu-test-image
 37 sudo mount -o loop ./rcu-test-image /mnt
 38 
 39 # Replace "precise" below with your favorite Ubuntu release.
 40 # Empirical evidence says this image will work for 64-bit, but...
 41 # Note that debootstrap does take a few minutes to run.  Or longer.
 42 sudo debootstrap --verbose --arch i386 precise /mnt http://archive.ubuntu.com/ubuntu
 43 cat << '___EOF___' | sudo dd of=/mnt/etc/fstab
 44 # UNCONFIGURED FSTAB FOR BASE SYSTEM
 45 #
 46 /dev/vda        /               ext3    defaults        1 1
 47 dev             /dev            tmpfs   rw              0 0
 48 tmpfs           /dev/shm        tmpfs   defaults        0 0
 49 devpts          /dev/pts        devpts  gid=5,mode=620  0 0
 50 sysfs           /sys            sysfs   defaults        0 0
 51 proc            /proc           proc    defaults        0 0
 52 ___EOF___
 53 sudo umount /mnt
 54 ------------------------------------------------------------------------
 55 
 56 
 57 References:
 58 
 59         http://sripathikodi.blogspot.com/2010/02/creating-kvm-bootable-fedora-system.html
 60         https://help.ubuntu.com/community/KVM/CreateGuests
 61         https://help.ubuntu.com/community/JeOSVMBuilder
 62         http://wiki.libvirt.org/page/UbuntuKVMWalkthrough
 63         http://www.moe.co.uk/2011/01/07/pci_add_option_rom-failed-to-find-romfile-pxe-rtl8139-bin/ -- "apt-get install kvm-pxe"
 64         https://www.landley.net/writing/rootfs-howto.html
 65         https://en.wikipedia.org/wiki/Initrd
 66         https://en.wikipedia.org/wiki/Cpio
 67         http://wiki.libvirt.org/page/UbuntuKVMWalkthrough

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php