## Problem - Manual network configuration using the dracut boot options is not easy ## Solution - Added new boot option `live.net_config_tui=1` to interactively configure network settings using the `nmtui` tool. - Additional features: - Allow configuring the HTTP proxy - Display the network configuration summary - Added network test button which tries connecting to www.suse.com to check that the network setup is correct. ## Testing - Tested manually ## Notes - It turned out that configuring the Wifi network is not possible because the drivers are missing in the initrd. In theory after adding the Wifi drivers (and firmware if required) it should be possible to configure also the Wifi cards and use them for downloading the self-updates. ## Screenshots The initial summary screen: <img width="1280" height="800" alt="agama-net-config-summary-devices" src="https://github.com/user-attachments/assets/35ab0b0e-6907-4c9b-b60d-b3e2fc04ccde" /> After pressing "Edit" button the `nmtui` tool is started <img width="1280" height="800" alt="agama-net-config-edit" src="https://github.com/user-attachments/assets/5cbc7a82-8a7e-46b1-8e8e-0a43af2554c9" /> Then the user is asked to optionally configure the HTTP proxy: <img width="1280" height="800" alt="agama-net-config-proxy" src="https://github.com/user-attachments/assets/bd2fac93-a908-406f-87c9-7016e622b721" /> Then the summary dialog is displayed again. After pressing the "Test connection" button a request to `https://www.suse.com` is sent and the result is displayed on the screen: <img width="1280" height="800" alt="agama-net-config-test" src="https://github.com/user-attachments/assets/ba49d61e-295c-48f7-a421-d8a7241a0974" /> When the "Continue" button is pressed in the summary the boot process continues as usually. A proof that the configured network proxy is used in the self-update step later: <img width="1280" height="800" alt="nmtui7" src="https://github.com/user-attachments/assets/476e54db-4f4d-480b-964c-b0b0009397af" />
41 lines
1.1 KiB
Desktop File
41 lines
1.1 KiB
Desktop File
[Unit]
|
|
Description=Interactive network configuration in initrd
|
|
DefaultDependencies=no
|
|
|
|
# see https://man7.org/linux/man-pages/man7/dracut.bootup.7.html
|
|
# for the dependency order of the dracut services
|
|
|
|
# after NetworkManager is started and network configured
|
|
After=network-online.target
|
|
# after the console is initialized
|
|
After=systemd-vconsole-setup.service
|
|
# before running the pre-pivot dracut hooks (before the driver update),
|
|
# before the self-update and before displaying the Plymouth splash screen
|
|
Before=dracut-pre-pivot.service live-self-update.service plymouth-start.service
|
|
|
|
ConditionKernelCommandLine=live.net_config_tui=1
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
|
|
# disable the kernel output on the console
|
|
ExecStartPre=dmesg --console-off
|
|
# disable the systemd status messages on the console
|
|
ExecStartPre=kill -SIGRTMIN+21 1
|
|
|
|
ExecStart=initrd-network-setup.sh
|
|
|
|
# enable back the kernel output on the console
|
|
ExecStartPost=dmesg --console-on
|
|
# enable back the systemd status messages on the console
|
|
ExecStartPost=kill -SIGRTMIN+20 1
|
|
|
|
Environment=TERM=linux
|
|
|
|
StandardInput=tty
|
|
StandardOutput=tty
|
|
TimeoutStartSec=infinity
|
|
RemainAfterExit=true
|
|
|
|
[Install]
|
|
WantedBy=initrd.target
|