Как исправить неправильно удаленное программное обеспечение на Raspberry Pi (Buster)

Для Clevis+Tang я счел полезным:

  1. разрешить dracut настраивать сеть для разблокировки корневого тома LUKS
  2. указать dracut пропустить создание файлов ifcfg -*и
  3. удалить установленные IP-адреса, что позволяет NetworkManager настроить интерфейс (с ).
[root@clevis ~]# cat /etc/dracut.conf.d/clevis-nbde.conf
# DHCP for a specific interface
kernel_cmdline="ip=eth0:dhcp"

# Static IP for a specific interface
# man dracut.cmdline
#   ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|ibft}[:[<dns1>][:<dns2>]]
#kernel_cmdline="ip=192.168.0.221::192.168.0.1:255.255.255.0::eth0:none:192.168.0.99"

# Don't create /etc/sysconfig/network-scripts/ifcfg-* files during boot
omit_dracutmodules+="ifcfg"
[root@clevis ~]# cat /etc/systemd/system/flush-dracut-network\@.service 
# Remove Dracut's network configuration
# https://access.redhat.com/solutions/3017441
# https://unix.stackexchange.com/questions/506331/networkmanager-doesnt-change-ip-address-when-dracut-cmdline-provided-static-ip

[Unit]
Description=Remove dracut's network configuration for %I
Before=network-pre.target
Wants=network-pre.target

[Service]
ExecStartPre=/usr/sbin/ip address show %i
ExecStart=/usr/sbin/ip -statistics address flush dev %i

[Install]
WantedBy=default.target
[root@clevis ~]# systemctl daemon-reload

[root@clevis ~]# systemctl enable flush-dracut-network@eth0
Created symlink from /etc/systemd/system/default.target.wants/flush-dracut-network@eth0.service to /usr/lib/systemd/system/flush-dracut-network@.service.
0
22.11.2021, 20:36
0 ответов

Теги

Похожие вопросы