This series is to explore the feasibility of using Alpine Linux in embedded systems.
Testing Alpine Linux a bit using quickemu:
quickget alpine 3.15` quickemu --vm alpine-3.15.conf
The install iso was only 50MB! The installed size was about 95MB.
After the system booted, I ran
setup-alpine and went with mostly defaults. The one confusing part was the keyboard to use – I ended up with
us-alt-intl. After rebooting, I was able to log in.
With quickemu, I could not get a bridged network to work, so ended up port forwarding the ssh port:
From there I could add a user, install sudo, add a user to wheel group, and enable the wheel group in
/etc/sudoers – then I could ssh as the new user and run sudo.
Updating to the latest release was pretty simple:
- replace version with
Update was very fast and now
3.18.3 and kernel is
Alpine uses OpenRC for an initsystem – most of the rest of the world uses systems. I must admit I have mixed feelings about this – systems does provide some nice features, but it is also becoming quite a hog.
I then installed the Caddy webserver to get a feel for init.
sudo apk add caddy sudo rc-update add caddy
I like that OpenRC uses run levels like
default, manual, etc instead of numbers. After rebooting, it does appear that Caddy is running:
localhost:~$ service caddy status * status: started localhost:~$ ps -A | grep caddy 2461 root 0:00 supervise-daemon caddy --start --respawn-delay 2 --respawn-max 5 --respawn-period 1800 --user caddy caddy /usr/sbin/caddy -- run --config /etc/caddy/Caddyfile --adapter caddyfile 2462 caddy 0:00 /usr/sbin/caddy run --config /etc/caddy/Caddyfile --adapter caddyfile 2594 cbrake 0:00 grep caddy
apk add man-db man-pages