Raspberry Pi 4B - Ubuntu 19.10 - 有線網路非託管

Raspberry Pi 4B - Ubuntu 19.10 - 有線網路非託管

我成功安裝了ubuntu-19.10-preinstalled-server-armhf+raspi3.img,安裝了更新和 Ubuntu 桌面。

儘管我可以使用 Firefox,但有線網路顯示「不受管理」。由於沒有網絡,因此無法安裝軟體。我發現了一些有關如何啟用託管有線網路的建議,但說明不完整 - 就像它們是為知道如何執行概述的任務的人編寫的一樣。

有沒有可以下載的補丁來解決這個問題?如果沒有的話,會很快發布嗎?

答案1

我明白了這一點。

若要查看 netplan 配置,請執行以下命令。

$cd /etc/netplan
$sudo nano 50-cloud-init.yaml

如果 50-cloud-init.yaml 檔案為空,請執行以下命令。

^X
$sudo netplan generate
$sudo netplan apply

現在您可以編輯 50-cloud-init.yaml 來管理有線網路。

$sudo nano 50-cloud-init.yaml

這是終端機視窗中將顯示的內容。

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    version: 2

您可以透過新增渲染器來編輯 50-cloud-init.yaml:NetworkManager。您必須確保所有縮排都正確,否則檔案將無法運作。您可以使用空白鍵而不是製表符來設定縮排。完成後,50-cloud-init.yaml 將如下所示。我刪除了可選:true 行。

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following
# network: {config: disabled}
network:
    renderer: NetworkManager
    ethernets:
        eth0:
            dhcp4: true
    version: 2

現在您儲存編輯。

^X
# Save Modifed Buffer
Y
# File Name to Write: 50-cloud-init.yaml
# Press Enter Key

現在您套用修訂後的 50-cloud-init.yaml 檔案。

$sudo netplan apply

我重新啟動了 Raspberry Pi,有線網路就可以調整了。我第一次接觸 Linux 和 Ubuntu 是在一週前的今天早上。我很高興能夠整合線上資源來解決這個問題。希望此更新能讓其他人更輕鬆地完成這項任務。

相關內容