Creating a Rootfs Disk Image

If you need to either re-create or substantively modify the rootfs disk image provided, it takes a little doing, but isn't too big a deal. The first step is to create a file that will contain the disk image:

$ dd if=/dev/zero of=rootfs.img bs=1M count=8192

This creates an image about 8GB in size; bump it up as needed, of course. Next, we need to put two partitions into the image using something like fdisk:

$ fdisk rootfs.img

Create two partitions -- a small, bootable FAT partition (~25-50MB), and the remainder an ext3 partition; I assume here I don't need to provide detailed steps for using fdisk. When you're done, it'll look something like this:

The ext3 partition is where all the fun stuff is -- it's the actual rootfs with all the interesting ARMv8 executables (not that the kernel is boring, mind you...). To recreate the image that one could have fetched, we can pull it from git and then use cpio to copy it in properly: