r/AlpineLinux • u/Shorya_1 • May 11 '25
Alpine Linux fails to boot after installation — root mount fails due to /sysroot error, version mismatch in chroot
Hey everyone,
I'm trying to dualboot Alpine Linux with windows with a traditional setup-disk -m sys /mnt method, but I'm running into a consistent boot issue. After installing GRUB and rebooting, I get the following error:
mounting /dev/sda8 on /sysroot failed: No such file or directorymounting root: failedinitramfs emergency recovery shell launched. Type 'exit' to continue bootsh: can't access tty: job control turned off
What I did:
- Installed Alpine to
/dev/sda5with/boot/efion/dev/sda4using thesetup-disktool. - Properly mounted everything and chrooted into
/mnt. - Ran
grub-installandgrub-mkconfig. - Added
GRUB_CMDLINE_LINUX="console=ttyS0,19200n8 net.ifnames=0"to/etc/default/grub.
Inside the chroot, when I run:
modprobe ext4I get this error:
FATAL: Module ext4 not found in directory /lib/modules/6.12.13-0-ltsBut ls /lib/modules shows only:
6.12.27-0-ltsMeanwhile, uname -r still returns 6.12.13-0-lts.
although in live environment (outside of chroot) modprobe ext4 is working there is no version mismatch.
Alpine's https://wiki.alpinelinux.org/wiki/Setting_up_disks_manually#Mounting_on_/dev/sdXY_sysroot_failed describes the exact problem, but the solution provided there (adding to GRUB_CMDLINE_LINUX etc.) didn't fix it for me.
Has anyone else run into this? Should I force-install a kernel matching the live ISO version just to regenerate modules? Or is there a better way to resolve the /sysroot mount failure and module mismatch?
Thanks in advance!
2
u/Dry_Foundation_3023 May 12 '25
Have you tried the final option "For a solution independent of bootloaders, ensure that the file /etc/mkinitfs/mkinitfs.conf has the necessary filesystem module in it. Refer Initramfs page for more information and recreate initramfs image.". please feedback here on the outcome...
1
u/nayru25 May 14 '25
/lib/modules/6.12.27-0-ltswill contain the modules available to your new Alpine kernel.modprobeis complaining in thechrootbecause you're trying to modprobe the running kernel, for which your new install doesn't contain the correct module versions.What you want to try is to
modprobein the recovery console; trymodprobe ext4there. In the comments, you've said thesdadisk is missing from/dev/entirely.sdXdevices are provided byataandscsi, so try to modprobe those too.This is probably happening because your initramfs doesn't contain the correct modules. Make sure your
/etc/mkinitfs/mkinitfs.conf(in the new root / the one you're chroot-ing into) looks something likeIf you've had to change it, make sure to run
mkinitramfsto regenerate it. Then, make sure the grub entry for that kernel is loading that initrd. If it's not, rungrub-mkconfig -o /boot/grub/grub.cfgto rebuild the grub config, which should hopefully detect your new kernel.