diff --git a/README.md b/README.md index 6da5abf692..f6b8f5d8ab 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,8 @@ build directory in the case of x86 at `arch/x86/boot/compressed/vmlinux`. ### Rootfs +#### With a disk image + In most cases, you will want to give the VM a virtual block device to use as a root file system: @@ -113,6 +115,16 @@ crosvm run --rwdisk "${ROOT_IMAGE}" -p "root=/dev/vda" vmlinux >**NOTE:** If more disks arguments are added prior to the desired rootfs image, the `root=/dev/vda` must be adjusted to the appropriate letter. +#### With virtiofs + +Linux kernel 5.4+ is required for using virtiofs. This is convenient for testing. +The file system must be named "mtd*" or "ubi*". + +```bash +crosvm run --shared-dir "/:mtdfake:type=fs:cache=always" \ + -p "rootfstype=virtiofs root=mtdfake" vmlinux +``` + ### Control Socket If the control socket was enabled with `-s`, the main process can be controlled