I tried an experiment, this is a little tool that allows you to create tmpfs based ramdisks with Arch Linux installed on them. This script depends on `arch-install-scripts' as it uses pacstrap.

You can for example do:

sudo ./rvm create arch /home/bla/arch-mnt

This will essentially install arch in `/home/bla/arch-mnt' (base and base-devel so far). The target dir `arch-mnt' will automatically be mounted as tmpfs (2G at the moment, although a command line option for the preferred size would be useful). On top of this a .tgz of the installation will be created and placed in RVM_VOLUMES_PATH (which needs to be set manually in the shell script for now, typically `/home/<user>/.rvm').

We can then do:

sudo ./rvm start arch /home/bla/arch-mnt

This will unpack the `arch.tgz' from RVM_VOLUMES_PATH into the mount point. We can then use `arch-chroot'.

Similarly to stop the ramdisk we do:

sudo ./rvm stop arch /home/bla/arch-mnt

This will backup everything from the mount point to a .tgz and copy it back to RVM_VOLUMES_PATH.

There are a couple of things that could be done better and will be, this is just a barebones version of the script. We could for example have rc.d/systemd scripts to start/stop etc.