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-manu...
Any better ideas?
Best regards, Dmitry Mikhailov.
Hi,
First I suggest to move this thread over to centos list instead of centos-devel. I think it's more appropriate there.
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.
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
On 7/13/20 7:03 PM, Simon Matter via CentOS-devel wrote:
Hi,
First I suggest to move this thread over to centos list instead of centos-devel. I think it's more appropriate there.
Thank you. Got it.
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.
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
CentOS-devel mailing list CentOS-devel@centos.org https://lists.centos.org/mailman/listinfo/centos-devel
On Mon, 13 Jul 2020, Simon Matter via CentOS-devel wrote:
Guess what? Upon termination, wpa-supplicant brings the wireless interface down and the system hangs being unable to unmount now-defunct NFSroot.
This sounds like a use case for a 'unit' file. See man 5 systemd.unit
wpa-supplicant is providing 'network' and being shut down 'too early
I use the following unit file, to mount a NFS point after the network is up (wotjh tje 'After'), and systemd will retain the network in an up state so loong as the mount point it up (with the 'Wants')
# less /etc/systemd/system/var-ftp-pub-nfs-mirror.mount
[Unit] Description=var-ftp-pub-nfs-mirror devices Wants=network-online.target After=network-online.target Conflicts=umount.target [Mount] What=nas1.first.owlriver.net:/Mirror Where=/var/ftp/pub/nfs/mirror Type=nfs
[Install] WantedBy=machines.target
#######################
Rename the unit file with the mount point name, and drop it in the indicated directory path [it is unclear to me if this needs to be in the datastick you are initially booting from, or in the filesystem once active .. some experimentation needed here. It may well be both ;) You may find more guidance in a writeup on a wired PXE / TFTP boot ] (see: man 5 systemd.unit )
and one assumes wpa-supplicant is already designated as part of the 'network' service, and so will be retrained in an active state unti the umount of listed NFS mounts are completed
-- Russ herrold