Netboot hook is broken
It appears that since !3819 most UIs (all with NetworkManager?) you try to use with Netboot won't boot because networkmanager is resetting the networking connection, also breaking the nbd connection for the rootfs at the same time. This will make the boot hang somewhere in the openrc phase, and at some point failing with a bunch of I/O errors.
Reverting the before mentioned MR "resolves" the problem for now: 0001-Revert-main-postmarketos-base-ui-enable-USB-tetherin.patch
CC @dylanvanassche
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Administrator added status::confirmed type::bug labels · Imported
added status::confirmed type::bug labels
- Administrator mentioned in commit 5859042d · Imported
mentioned in commit 5859042d
By Alexey Min on 2023-09-01T10:08:23
- Author Owner
As an alternative workaround this seems to work:
diff --git a/main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-conf.d-50-tethering.conf b/main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-conf.d-50-tethering.conf index 020114579..22f42c664 100644 --- a/main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-conf.d-50-tethering.conf +++ b/main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-conf.d-50-tethering.conf @@ -6,5 +6,5 @@ no-auto-default=usb0 # Iface is configured in initfs, do not persist its NetworkManager connection [device-usb0] match-device=interface-name:usb0 -managed=true +managed=false keep-configuration=no
By Luca Weiss on 2023-09-01T16:40:11
Edited by Ghost User Collapse replies - Author Owner
In netboot mode we need to figure out how to set
managed=false
before NM is started.What do you think about supplying another config file with a higher priority if
netboot
hook is installed like with aninstall_if=
?By Dylan Van Assche on 2023-09-01T16:40:10
- Author Owner
Not sure we can easily do something with that, I think normally the rootfs is generated before the netbook hook is added, so something permanently in the rootfs would be better.
By Luca Weiss on 2023-09-03T09:32:57
- Author Owner
@dylanvanassche Any new ideas how to fix this?
By Luca Weiss on 2023-10-02T11:53:54
- Author Owner
A script to generate the .nmconnection file maybe? And set it to generate before NM starts?
By Dylan Van Assche on 2023-10-02T14:20:10
- Author Owner
pmbootstrap netboot serve
could do something to rootfs before "serving" it maybe?By Alexey Min on 2024-01-06T01:53:16
- Administrator assigned to @dylanvanassche · Imported
assigned to @dylanvanassche
By Luca Weiss on 2023-09-06T07:56:08
- Author Owner
Applying that patch fixed it for me, but what will be broken upon doing so?
By AceOfSpadesProduc100 on 2023-11-14T07:19:15
Edited by Ghost User Collapse replies - Author Owner
USB tethering might break, not sure.
By Dylan Van Assche on 2023-11-14T07:19:15
- Author Owner
networkmanager is resetting the networking connection
@z3ntu This happens in the dispatching script. I think we need some kind of configuration mode? In netboot mode you cannot use regular USB networking I think?
By Dylan Van Assche on 2024-01-05T19:44:24
- Administrator mentioned in issue #2541 · Imported
mentioned in issue #2541
By Dylan Van Assche on 2024-01-18T06:58:12
- Author Owner
The patch doesn't work anymore. Netboot still won't work no matter what.
By AceOfSpadesProduc100 on 2024-02-20T02:04:52
- Maintainer
I've been using netboot on-and-off still. Just removing
/usr/lib/NetworkManager/conf.d/50-tethering.conf
from the rootfs is required.If the rootfs has that file and you cannot boot, either boot into debug-shell, mount the rootfs from there and remove the file. Or mount the rootfs on your host and remove the file from that. https://wiki.postmarketos.org/wiki/Netboot#Mounting_the_rootfs_on_your_host
This is also required to do after the
postmarketos-base-ui-networkmanager-usb-tethering
has been updated since it'll recreate the file, so don't forget to runrm
from the booted system before rebooting, otherwise you have to remove it again more manually like described above.Edited by Luca Weiss 1