How to create a persistent file system?
-
- Offline
- 2 months 23 hours ago
- 2018-01-30
Hi,
I would like to use Alpine as the OS for some VMs I use to run some e2e integration tests. That's why, I downloaded the VIRTUAL Alpine Linux 3.7.0 and then started it as a VM. I ran setup-alpine and provided vda as the place to store configs. For my tests, I need the VMs to have python and tcpdump. I installed those packages correctly using 'apk add', downloaded the tests scripts and I ran the tests successfully. Great!
Then, I took the qcow2 image and migrated it to another environment. Unfortunately, when I started the VM in the other environment, python and tcpdump packages were gone, the scripts were gone, etc. It was as if I had a fresh Alpine VM again. After investigating a bit, I realized that /dev/vda, which is my persistent storage, is in read-only mode which I suspect might be the problem. I have been reading the wiki, and I think I have done everything correctly as I chose vda as the place to store configs. Can anybody help me to understand what I am doing wrongly?
Yes, it's possible to install Alpine on your file system.
You need to install Alpine in sys mode, you can select sys mode while you are in setup-alpine.
sys mode:
This is a traditional hard-disk install (see link for details). Both the boot system and your modifications are written to the hard disk, in a standard Linux hierarchy.
Note: The setup-alpine script handles installing Alpine in this mode, too, when you supply a writable partition instead of "none", and request mode "sys". By default, it will create three partions on your disk, for /boot, /, and swap; however you can also partition your disk manually.