Custom small size installation
- 1 year 2 weeks ago
I want to build an iso to install on the internal flash on several ReadyNAS Ultra 4 (RNDU4000). This device has a (TTL) serial port, no VGA x86_64-capable Atom CPU, 1GB RAM and 119.5MB flash.
I installed a minimal image in a VM to see how much space would be required, and was impressed by Alpine. The only issue with space is kernel modules and firmware, which alone take up more space than is available.
Since Alpine is unknown to me, and it's been ages since I last did any embedded-like development, I don't quite know where to start. So I'm looking for some help getting a rough idea of how to proceed.
I know I have to recompile the kernel and disable the vast majority of modules (and firmware). https://wiki.alpinelinux.org/wiki/Custom_Kernel seems pretty empty?
The list of modules loaded on the RNDU4000 is pretty short, and can be reduced further (eg. there's an unused VGA chipset). Are there any modules that Alpine requires regardless of hardware? (I would assume anything absolutely required would be compiled-in, but you never know)
Then I have to select a minimal set of packages. Sounds pretty easy, but since I really don't know Alpine, which packages are absolutely required is unknown to me (Eg. do I need bkeymaps when the device won't have a keyboard attached?). Dropbear is necessary, as are a few disk/filesystem-related tools (and fs kmods).
At that point, I assume making the iso is the next step. Bootloader and kernel both need config to use serial console (9600,8n1), other than that I don't know how much modification is necessary. Unattended install would be nice, but isn't strictly necessary. The hardware config is static (flash is always /dev/sda, and the BIOS _always_ boots from flash, unless a button is held during boot)
Any pointers, experiences, ideas and suggestions are welcome.