AlpineLinux netboot initrd missing ext4 module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download firecracker | |
latest=$(basename $(curl -fsSLI -o /dev/null -w %{url_effective} https://github.com/firecracker-microvm/firecracker/releases/latest)) | |
curl -LOJ https://github.com/firecracker-microvm/firecracker/releases/download/${latest}/firecracker-${latest}-$(uname -m) | |
mv firecracker-${latest}-$(uname -m) firecracker | |
chmod +x firecracker | |
# download netbook kernel and initrd | |
curl --remote-name-all -LC- https://mirrors.aliyun.com/alpine/v3.12/releases/x86_64/netboot/{modloop,vmlinuz,config,initramfs}-virt | |
# vmlinux | |
curl -LOC- https://raw.githubusercontent.com/torvalds/linux/master/scripts/extract-vmlinux | |
chmod +x extract-vmlinux | |
./extract-vmlinux $PWD/vmlinuz-virt > vmlinux-virt | |
# rootfs - invalid rootfs to check the initrd modules | |
fallocate -l 1G alpine.rootfs.ext4 | |
# conf | |
cat <<CONF > alpine.json | |
{ | |
"boot-source": { | |
"initrd_path":"initramfs-virt", | |
"kernel_image_path": "vmlinux-virt", | |
"boot_args": "console=ttyS0 reboot=k panic=1 pci=off modules=virtio_mmio,ext4 rootfstype=ext4" | |
}, | |
"drives": [ | |
{ | |
"drive_id": "rootfs", | |
"path_on_host": "ubuntu.rootfs.ext4", | |
"is_root_device": true, | |
"is_read_only": false | |
} | |
], | |
"machine-config": { | |
"vcpu_count": 1, | |
"mem_size_mib": 1024, | |
"ht_enabled": false | |
} | |
} | |
CONF | |
# start | |
rm /tmp/firecracker.socket;./firecracker --api-sock /tmp/firecracker.socket --config-file alpine.json | |
# missing ext4 | |
cat /proc/filesystems | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment