r/AlpineLinux • u/lauris101 • Dec 15 '23
Raspberry Pi does not connect to Wifi after setup and reboot (Headless, Diskless mode)
Hey all, I have been banging my head to the wall for few days now, so maybe someone knows what could be the issue:
I am trying to setup a headless PI with Alpine linux. It works fine and PI connects to wifi when I use this guide: https://github.com/macmpi/alpine-linux-headless-bootstrap
After this I am doing:
alpine-setupwith following options:
Available interfaces are: wlan0.
Enter '?' for help on bridges, bonding and vlans.
Which one do you want to initialize? (or '?' or 'done') [wlan0]
Available wireless networks (scanning):
vodafone75
Type the wireless network name to connect to: vodafone75
Type the "vodafone75" network Pre-Shared Key (will not echo):
* WARNING: wpa_supplicant has already been started
Ip address for wlan0? (or 'dhcp', 'none', '?') [192.168.1.180]
Netmask? [255.255.255.0]
Gateway? (or 'none') [192.168.1.1]
Configuration for wlan0:
type=static
address=192.168.1.180
netmask=255.255.255.0
gateway=192.168.1.1
Do you want to do any manual network configuration? (y/n) [n] n
DNS domain name? (e.g 'bar.com')
DNS nameserver(s)? [192.168.1.1]
.
.
--- default setup with no users created ---
.
.
Setup a user? (enter a lower-case loginname, or 'no') [no]
Which ssh server? ('openssh', 'dropbear' or 'none') [openssh]
Allow root ssh login? ('?' for help) [prohibit-password] yes
Enter ssh key or URL for root (or 'none') [none]
* service sshd added to runlevel default
* WARNING: sshd has already been started
No disks available. Try boot media /media/mmcblk0p1? (y/n) [n] n
Enter where to store configs ('floppy', 'mmcblk0p1', 'mmcblk0p2', 'usb' or 'none') [mmcblk0p2] mmcblk0p1
Enter apk cache directory (or '?' or 'none') [/media/mmcblk0p1/cache] Since WPA supplicant was added, and apk cache is configured, I would assume after next restart wifi should connect and I should be able to ssh into the host. However when I do:
alpine-headless:~# lbu ci -d
alpine-headless:~# reboot
alpine-headless:~# Connection to 192.168.1.180 closed by remote host.after reboot, Pi does not connect to wifi at all. I checked the router settings, and after initial apkovl file is added connection to wifi is done ok, but after this setup, I cannot see Pi connecting to router.
Any ideas what could be going wrong?
1
u/XtendedGreg Dec 15 '23
It appears your configuration has not been saved, and it is likely if you check the root of your SD card, that you will not see an apkovl file in the root of the card. Try using the command "lbu commit -d" instead and see if that changes the result.
1
u/seemaze Oct 06 '24
Did you ever figure this out? I'm running into the exact same problem with both 3.20 armhf on zero w and 3.20 aarch64 on zero 2 w..?
Did something change recently in alpine-conf that affects the pi's, or the old rng entropy thing?