Alpine Extended 3.20.1 x86-64 won't boot from an ext2 root partition
This was noticed during a sys installation using an ext2
root partition, the target device was a usb flash drive (but seems not to be related, since the issue also happens when the target is a hard disk or a memory card), the newly installed system fails to boot and issues an error message that is similar to mount: mounting /dev/<DEVICE> on /sysroot failed: No such file or directory
. The installation process was started with the command line BOOT_SIZE=256 SWAP_SIZE=0 ROOTFS=ext2 setup-alpine
.
While investigating the issue, a similar issue for an earlier version was found and it seems that the changes were carried on with this merge request. The workaround that allowed the system to boot normally was to rebuild the initramfs after modifying the contents of /etc/mkinitfs/features.d/ext2.modules
.
The file before modification,
kernel/arch/*/crypto/crc32*
kernel/crypto/crc32*
kernel/fs/ext4
The file after modification,
kernel/fs/ext2
Additional investigations or attempts that were performed prior to adopting this solution,
-
setup-disk
, the script was verified and it seems to apply theext2
filesystem correctly for theROOTFS
environment variable set at the installation beginning. -
fstab
, the filesystem was correctly set toext2
UUID=<ROOT_PARTITION_UUID> / ext2 rw,relatime,errors=continue,user_xattr,acl 0 1
-
grub.cfg
, the filesystem was correctly set toext2
, but an attempt to change the lineinsmod ext2
toinsmod ext4
was performed (since the module included inext2.modules
wasext4
), resulting in a message on boot that the module ext4 wasn't found.
menuentry 'Alpine Linux v3.20 [...] {
[...]
insmod ext2
linux /boot/vmlinuz-lts root=UUID=<ROOT_PARTITION_UUID> ro modules=sd-mod,usb-storage,ext2 quiet rootfstype=ext2
I would open a merge request suggesting the change, but since that would in practice undo the previous one it was decided to report as an issue for further clarification and discussion. If additional information is required, please let me know.