/media/sda as rw
- edit fstab to use
/media/sda instead of
setup-lbu to use
setup-apkcache to use
Background and longer answer:
Apparently alpine mounts the available partitions (and r/o at that) before
/etc/fstab is parsed. And in case an fstab entry overlaps with one of the partitions, it fails to mount.
I have not been able to find the exact spot where it happens in alpine source code, but found that the behaviour is mentioned here: https://oscillate.gr/words/router-pt2/
Quote from that link:
For example if the formatted device is sda1 mount it under /media/sda1. It seems that alpine’s initrd scripts mount every available filesystem under /media using the device name, ignoring your fstab. This kind of makes sense since fstab is not available in the pre-boot environment. So in order to avoid any further complications I recommend that we stick to that convention.
The answer by Francesco Colista cannot really be used when booting from cdrom iso as was my case (VirtualBox) and I assume the OP's as well (ESXi).
However, it seems that
setup-lbu detects the available mounts in
/media directory, so the simplest way is to use the automatic mount and run
setup-lbu to specify
sda as the lbu storage device.
Enter where to store configs ('floppy', 'sda', 'usb' or 'none') [usb]: sda
The same applies to
setup-apkcache which can also be configured to use
If you start from a clean boot, just configure the mount this way from the start and
setup-alpine will pick it up for the initial setup
# mount /dev/sda /media/sda
# grep /dev/sda /proc/mount >> /etc/fstab