Overview
I had to build a kernel and an image for trying CorJail. But the building was not completed in my environment (WSL2 on Windows 11). I think I will be comfortable if I have a linux VM for a building linux kernel, file system image, and etc.
Step
- Select Ubuntu version and download its image on here
- Install
cloud-init,cloud-utilsandqemu-system- You can install them by
sudo apt install -y cloud-init cloud-utils qemu-systemon Debian/Ubuntu.
- You can install them by
- Generate a RSA key using
ssh-keygen -t rsa - Set up config file and create seed.img
- To create config files, see config files section
- Create seed.img via
cloud-localds seed.img user-data.yaml metadata.yaml
- Set shared foldder and run qemu
- In guest OS, add
shared /shared 9p trans=virtio,version=9p2000.L,access=any 0 0to/etc/fstab- After addition type
sudo systemctl daemon-reload && sudo systemctl restart local-fs.target && sudo mount -a.
- After addition type
Then if you need more space for a qemu drive, use qemu-img resize.