I have download Alpine netboot distribution from this URL:
https://dl-cdn.alpinelinux.org/alpine/v3.16/releases/x86/alpine-netboot-3.16.1-x86.tar.gz
I have run a virtual machine with QEMU this way:
qemu-system-i386 -m 256 -kernel boot/vmlinuz-lts -initrd boot/initramfs-lts -append "console=ttyS0 ip=dhcp alpine_repo=http://dl-cdn.alpinelinux.org/alpine/edge/main/"
With this command, a virtual machine is created and 22 apk pacakges are installed.
I am able to install additionnal apk packages, but I have to do it by hand (apk add
command).
How can I script packages installation in QEMU command line ?
Please note: I can replace http://dl-cdn.alpinelinux.org/ by a local mirror. So, I can also change files on the repository.