- Fixed build system to clone source repositories instead of downloading binaries - Enhanced scripts/fetch-github.sh with proper git repo cloning and branch handling - Updated scripts/compile-components.sh for RFS compilation with build-binary feature - Added minimal firmware installation for essential network drivers (73 modules) - Created comprehensive zinit configuration set (15 config files including getty) - Added util-linux package for getty/agetty console support - Optimized package selection for minimal 27MB initramfs footprint - Successfully builds bootable vmlinuz.efi with embedded initramfs - Confirmed working: VM boot, console login, network drivers, zinit init system Components: - initramfs.cpio.xz: 27MB compressed minimal Zero-OS image - vmlinuz.efi: 35MB bootable kernel with embedded initramfs - Complete Zero-OS toolchain: zinit, rfs, mycelium compiled from source
1.5 KiB
1.5 KiB
Generate an flist using ZDB
Deploy a vm
- Deploy a vm with a public IP
- add docker (don't forget to add a disk for it with mountpoint = "/var/lib/docker")
- add caddy
Install zdb and run an instance of it
-
Execute
git clone -b development-v2 https://github.com/threefoldtech/0-db /zdbthencd /zdb -
Build
cd libzdb make cd .. cd zdbd make STATIC=1 cd .. make -
Install
make install -
run
zdb --listen 0.0.0.0 -
The result info you should know
zdbEndpoint = "<vm public IP>:<port>" zdbNameSpace = "default" zdbPassword = "default"
Install rfs
-
Execute
git clone -b development-v2 https://github.com/threefoldtech/rfsthencd /rfs -
Execute
rustup target add x86_64-unknown-linux-musl` cargo build --features build-binary --release --target=x86_64-unknown-linux-musl mv ./target/x86_64-unknown-linux-musl/release/rfs /usr/bin/
Convert docker image to an fl
- Try an image for example
threefolddev/ubuntu:22.04image - Executing
rfs docker -i threefolddev/ubuntu:22.04 -s "zdb://<vm public IP>:<port>/default" -d - You will end up having
threefolddev-ubuntu-22.04.fl(flist)
Serve the flist using caddy
- In the directory includes the output flist, you can run
caddy file-server --listen 0.0.0.0:2015 --browse - The flist will be available as
http://<vm public IP>:2015/threefolddev-ubuntu-22.04.fl - Use the flist to deploy any virtual machine.