Headless/unattended setup supporting.
There are two kinds of usage while using Alpinelinux as the OS for bare metal. One, boot Alpinelinux in someway (e.g. USB, netboot) then install to internal HDD. Two, boot Alpinelinux and use the stage2 OS (e.g. for IoT like thinclient or RPi).
But for now, I think Alpinelinux initrd lacks functions that are needed for both case. I know all items I would say below could be done via a second time development. But I think Alpinelinux could provide the platform, letting end user focus on his goal. Instead of “do it ALL on your own”.
So from simpler, case two, I can think of a few things.
- Bring up network for image other than netboot.
- Bring up sshd.
- More ways to setup passwordless ssh authentication.
Current network way is fine, with a little trouble (Bug #10031). But “string” way does not work mostly due to boot loader could not pass kernel parameter with space correctly (Bug #9504 (closed)). I’d suggest adding a “file://” protocol to support loading data from local media.
- Setup repos.
As my thread in email-list, `setup-apkrepos -f` is not quite ideal.
- Setup keymap, timezone, etc.
- Lock root account.
By “lock”, I mean no way to auth via password.
- Add necessary user account.
`setup-alpine` has an answer file feature. But the functions are not quite enough. I am OK to enhance it. But there is not existing way to use it automatically at boot yet.
For case one, not only some of the above needs to be persisted to installed OS. But also a way to specify how to partition is needed. This can be complex, since Redhat kickstart file is kind of huge.
Most of the above requirements can be done via packages (addons) without heavily modifying current initrd. And for a minimal implementation, I am thinking network + sshd is a must.
Your opinions are welcomed.
(from redmine: issue id 10119, created on 2019-03-16)