I want to to create a (kind of) preset image for raspberry that will include some application set up that I'm working on a project of mine.
So, let's start with a simple problem so that from this point I can start building more complex setups on my own.
Suppose that I took the original partition that is included on the raspberry pi image (the one with the running system, not the one with the bootloader stuff) and I squashed it with mksquashfs. And now I want to put it on a newly formatted memory card.
So.... let's say I take this card, I create a vfat partition on it that can hold all of the bootloader files plus the squashfs file which is some 1.6 GBs (say.... the vfat partition will be 2 GBs), I copy all the files from the original raspberry pi bootloader partition into the newly created partition of the new memory card, I also place the squashfs file there. Now.... I would have to modify the cmdline.txt file so that the rootfs is not actually root=PARTUUID=15ca46a5-02 but something like (I'm guessing) root=/boot/the-squashedfs-file.sqsh, also rootfstype=squashfs. At this point, the kernel should be able to boot, right?
Well.... it doesn't. I was able to see the raspberries that show up when booting but there's no text output so I'm more than sure that something went wrong. At what point did my hack break?
It's a pi2, by the way.