Dmitry E. Mikhailov
2020-Aug-03 12:56 UTC
[CentOS] NFSroot over wifi in CentOS 7 - graceful shutdown problem
Hi, I've got a task to have a small number of laptops netboot Linux over WiFi. The kernel is loaded off the USB stick of cource, it's off topic for now. The WPA-supplicant daemon is started early by dracut off initrd. It works. Mostly. The problem is that upon shutdown systemd terminates all the processes FIRST and unmounts filesystems NEXT. Guess what? Upon termination, wpa-supplicant brings the wireless interface down and the system hangs being unable to unmount now-defunct NFSroot. There were some discussions regarding similar matter and there's even the RH Errata: https://access.redhat.com/errata/RHBA-2018:2447 But I'm woking on a fully updated CentOS Linux release 7.8.2003 and nevertheless I've got the problem. I don't have rights to see the BZ. https://bugzilla.redhat.com/show_bug.cgi?id=1593649 I'm deciding to use a quick and dirty hack to do a totally ungraceful shutdown/reboot: https://unix.stackexchange.com/questions/533307/systemd-fails-to-umount-manually-mounted-nfs-shares-in-initramfs Any better ideas? Best regards, Dmitry Mikhailov.
Simon Matter
2020-Aug-03 13:50 UTC
[CentOS] NFSroot over wifi in CentOS 7 - graceful shutdown problem
> Hi, > > I've got a task to have a small number of laptops netboot Linux over > WiFi. The kernel is loaded off the USB stick of cource, it's off topic > for now. > > The WPA-supplicant daemon is started early by dracut off initrd. It > works. Mostly. > > The problem is that upon shutdown systemd terminates all the processes > FIRST and unmounts filesystems NEXT. > > Guess what? Upon termination, wpa-supplicant brings the wireless > interface down and the system hangs being unable to unmount now-defunct > NFSroot. > > There were some discussions regarding similar matter and there's even > the RH Errata: > https://access.redhat.com/errata/RHBA-2018:2447 > But I'm woking on a fully updated CentOS Linux release 7.8.2003 and > nevertheless I've got the problem. > > I don't have rights to see the BZ. > https://bugzilla.redhat.com/show_bug.cgi?id=1593649 > > I'm deciding to use a quick and dirty hack to do a totally ungraceful > shutdown/reboot: > https://unix.stackexchange.com/questions/533307/systemd-fails-to-umount-manually-mounted-nfs-shares-in-initramfs > > Any better ideas?Short answer: Looks like this should be fixed in systemd or its configuration. Long answer is the one I already gave you on centos-devel. I post it here because someone may have deeper knowledge of what exactly goes on: What I'm wondering here is, do you see the hangs because of wpa_supplicant was terminated and therefore also the wireless interface is down, or do you see the hangs because networking is already completely down. If it is because wpa_supplicant gets terminated, then maybe it would be possible to terminate wpa_supplicant in a way that it lets the wireless interface still up and functional at least for a certain amount of time. I don't know wpa_supplicant good enough but I think maybe it is not always needed to be alive for the wireless interface to work. Otherwise, I guess it's more a question for the systemd developers than for CentOS or Linux in general. Regards, Simon
Dmitry E. Mikhailov
2020-Aug-13 07:33 UTC
[CentOS] Solved: NFSroot over wifi in CentOS 7 - graceful shutdown problem
On 8/3/20 6:50 PM, Simon Matter via CentOS wrote:>> Hi, >> >> I've got a task to have a small number of laptops netboot Linux over >> WiFi. The kernel is loaded off the USB stick of cource, it's off topic >> for now. >> >> The WPA-supplicant daemon is started early by dracut off initrd. It >> works. Mostly. >> >> The problem is that upon shutdown systemd terminates all the processes >> FIRST and unmounts filesystems NEXT. >> >> Guess what? Upon termination, wpa-supplicant brings the wireless >> interface down and the system hangs being unable to unmount now-defunct >> NFSroot. > Short answer: > > Looks like this should be fixed in systemd or its configuration. > > Long answer is the one I already gave you on centos-devel. I post it here > because someone may have deeper knowledge of what exactly goes on: > > What I'm wondering here is, do you see the hangs because of wpa_supplicant > was terminated and therefore also the wireless interface is down, or do > you see the hangs because networking is already completely down.It's because of wpa_supplicant. When I run the same config over wired network, it shuts down gracefully. A dirty solution I found is to kill (-9) wpa_supplicant daemon right before shutdown. WiFi keeps running for a second it requires to do a graceful NFS unmount. Best regards, Dmitry Mikhailov
Reasonably Related Threads
- NFSroot over wifi in CentOS 7 - graceful shutdown problem
- wifi (ipw2200) stoped working after upgrade to 4.4
- ipw3945 wireless not working
- Centos6.5 -- Broadcom BCM4313 -- having trouble connecting
- how to get ASUS USB-N13 802.11n net adapter working on 5.5?