The following guide will help you create a linux root filesystem image that can be flashed to a storage medium of your choosing.
Note
The rootfs creation process is generic and should work for any of the distros listed here but this guide will use ARMtix as an example.
This guide only creates a generic rootfs, You will still need a bootfs, bootloader, kernel, modules, firmware, etc...
A script to automate all of this is planned but for now you'll have to do this manually
- An machine running linux with the same architecture of the desired rootfs (Or set up binfmt)
- Your desired distro's rootfs
- 4GB or more of storage
-
Create root.img
truncate -s 4G rootfs.img
-
Format it with btrfs
mkfs.btrfs rootfs.img -qL rootfs
-
Create a mount dir
mkdir /tmp/mount
3.1. Mount the root
mount rootfs.img /tmp/mount -o rw,noatime,compress=zstd
-
Start downloading your rootfs to the mount
curl -#L "https://armtixlinux.org/images/armtix-dinit-20241207.tar.xz" --keepalive-time 120 | bsdtar -xpC /tmp/mount/
-
(Optional) Chroot into the rootfs
mount -t proc /proc /tmp/mount/proc/
mount -t sysfs /sys /tmp/mount/sys/
mount --rbind /dev /tmp/mount/dev/
chroot /tmp/mount
-
Cleanup
umount -fR /tmp/mount/{proc,sys,dev}
umount -fR /tmp/mount
sync
And that's it!
You can now flash your rootfs to your target device.