r/AlpineLinux • • 1d ago

Raspberry Zero 2W installation failed

Hi,

I flashed a 32bit Alpine image (ver. 3.25.0) with Raspberry imager to an sd card, but setup-alpine seems fails.

I prepared a headless installation method followed macmpi's guide: https://github.com/macmpi/alpine-linux-headless-bootstrap

I successfully booted it up with his headless.apkovl.tar.gz but it seems after that setup-alpine is failing at Disk,Install step and it doesn't recognize sd card as a disk, so it seems normal installation fails at this step and . I got this:

 Disk & Install
----------------
No disks available. Try boot media /media/mmcblk0p1? (y/n) [n] y
 * WARNING: you are stopping a sysinit service
 * Unmounting /.modloop ...                                                            [ ok ]
rm: can't remove '/lib/modules': No such file or directory
No disks available. Try boot media /media/mmcblk0p1? (y/n) [n]

I tried to create the dir with command "mkdir -p /lib/modules" but that didn't help.

Tried to remount "/' with littlebit bigger size, but didn't help either.

Tried to give answer with no disk, where I can choose cache etc after that, but that didn't help at all in the installation process.

I had to force exit setup-alpine or it just ended by own while I tried different answers.
So I ran out of ideas now.

The initial mounts:

alpine-headless:~# df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                 10.0M         0     10.0M   0% /dev
shm                     212.6M         0    212.6M   0% /dev/shm
/dev/mmcblk0p1          128.8M     75.2M     53.6M  58% /media/mmcblk0p1
tmpfs                   212.6M     11.4M    201.2M   5% /
tmpfs                    85.0M    152.0K     84.9M   0% /run
/dev/loop0               37.1M     37.1M         0 100% /.modloop
2 Upvotes

6 comments sorted by

View all comments

Show parent comment

2

u/macmpi 1h ago edited 47m ago

hum...indeed seems sth broken on SD disk-install: did replicate the issue.
Will investigate further...

1

u/Csipotle 30m ago edited 26m ago

AI gave that explanation of the install script issue, without uploading those scripts for analyzing them tho:

This error occurs because setup-alpine tries to unmount the boot media (mmcblk0p1) to reformat the SD card, which stops the modloop service and deletes the /lib/modules symlink while the installer still needs kernel modules to detect storage disks.

On a Raspberry Pi, Alpine Linux boots from the SD card into RAM. Because the SD card is currently mounted as your live boot media, setup-alpine hides it from the available disks list (No disks available) and asks to unmount it (Try boot media /media/mmcblk0p1?). When you answer y, it unmounts /.modloop, breaking /lib/modules and preventing the script from partitioning or recognizing the card.

.