Custom small size installation

2 posts / 0 new
Last post
#1 Fri, 2017-02-03 15:40
repvik
  • repvik's picture
  • Offline
  • Last seen: 1 year 1 month ago
  • Joined: 2017-02-03

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.

Sun, 2017-02-26 11:57
jstuyts
  • jstuyts's picture
  • Offline
  • Last seen: 1 year 3 weeks ago
  • Joined: 2017-01-22

I am not an expert, but I guess a good place to start would be the kernel voor virtual machines. This kernel includes very few modules. See config-virtgrsec.x86_64 at: http://git.alpinelinux.org/cgit/aports/tree/main/linux-grsec

Once you have a custom kernel, you can find the build configuration for the virtual machine installation ISO here: http://git.alpinelinux.org/cgit/alpine-iso/tree/

Log in or register to post comments