我在臥室裡設置了一個個人 Web 開發伺服器,並且更改了網路的 DHCP 設置,為機器提供靜態本地 IP 位址。有一段時間一切都還好,然後混沌之神出現了。我正在從 comp 啟動到伺服器的 SSH 會話。當貓走過客廳的電源板時,電源板連接電腦和顯示器、燈、路由器/數據機和印表機。電源板是內建電湧保護器的電源板之一,所以當然所有東西都會斷電幾秒鐘。伺服器很好,因為它位於不同的電路上。
當我透過翻轉條帶上的開關恢復電源並且路由器最終完成啟動後,我嘗試重新啟動 SSH 會話,但無法連接。跳過很多不必要的故事,這就是我現在的位置:
伺服器確實連接到網絡,如盒子背面的活動 LED 所示。伺服器無法與網路通信,網路也無法與伺服器通訊。 「# lshw」將乙太網路介面設備顯示為橋接類別而非網路。它實際上不會顯示任何網路級設備。
nobody
description: Desktop Computer
product: HP Compaq dx2450 Microtower PC (KR612UT#ABA)
vendor: Hewlett-Packard
version: Chassis Version
serial: MXL85019JL
width: 64 bits
capabilities: smbios-2.4 dmi-2.4 vsyscall32
configuration: boot=normal chassis=desktop family=103C_53307F sku=KR612UT#ABA uuid=006E0D58-1216-1310-A14D-9130BC8BB186
*-core
description: Motherboard
product: 2A72h
vendor: OEM_MB
physical id: 0
version: 3.02
serial: MS1C89R60403872
*-firmware
description: BIOS
vendor: Phoenix Technologies, LTD
physical id: 0
version: 5.19
date: 11/03/2008
size: 128KiB
capacity: 960KiB
capabilities: pci pnp apm upgrade shadowing cdboot bootselect socketedrom edd int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb ls120boot zipboot biosbootspecification netboot
*-cpu
description: CPU
product: AMD Sempron(tm) Processor LE-1200
vendor: Advanced Micro Devices [AMD]
physical id: 3
bus info: cpu@0
version: AMD Sempron(tm) Processor LE-1200
slot: Socket AM2
size: 2100MHz
capacity: 3700MHz
width: 64 bits
clock: 200MHz
capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt rdtscp x86-64 3dnowext 3dnow rep_good nopl cpuid extd_apicid pni cx16 lahf_lm extapic cr8_legacy 3dnowprefetch vmmcall cpufreq
*-cache:0
description: L1 cache
physical id: 5
slot: L1 Cache
size: 128KiB
capacity: 128KiB
capabilities: synchronous internal write-back data
configuration: level=1
*-cache:1
description: L2 cache
physical id: 6
slot: L2 Cache
size: 512KiB
capacity: 512KiB
capabilities: synchronous internal write-back unified
configuration: level=2
*-memory:0
description: System Memory
physical id: 4
slot: System board or motherboard
size: 2GiB
*-bank:0
description: DIMM DDR2 667 MHz (1.5 ns)
product: HYMP112U64CP8-S6
vendor: Hynix Semiconductor (Hyundai Electronics)
physical id: 0
serial: None
slot: A0
size: 1GiB
width: 64 bits
clock: 667MHz (1.5ns)
*-bank:1
description: DIMM DDR2 667 MHz (1.5 ns)
product: 1G-UDIMM
vendor: Kingston
physical id: 1
serial: None
slot: A1
size: 1GiB
width: 64 bits
clock: 667MHz (1.5ns)
*-bank:2
description: DIMM [empty]
product: None
vendor: None
physical id: 2
serial: None
slot: A2
width: 64 bits
*-bank:3
description: DIMM [empty]
product: None
vendor: None
physical id: 3
serial: None
slot: A3
width: 64 bits
*-memory:1 UNCLAIMED
description: RAM memory
product: MCP61 Memory Controller
vendor: NVIDIA Corporation
physical id: 6
bus info: pci@0000:00:00.0
version: a1
width: 32 bits
clock: 66MHz (15.2ns)
capabilities: ht bus_master cap_list
configuration: latency=0
*-isa
description: ISA bridge
product: MCP61 LPC Bridge
vendor: NVIDIA Corporation
physical id: 1
bus info: pci@0000:00:01.0
version: a2
width: 32 bits
clock: 66MHz
capabilities: isa bus_master
configuration: latency=0
*-serial
description: SMBus
product: MCP61 SMBus
vendor: NVIDIA Corporation
physical id: 1.1
bus info: pci@0000:00:01.1
version: a2
width: 32 bits
clock: 66MHz
capabilities: pm cap_list
configuration: driver=nForce2_smbus latency=0
resources: irq:10 ioport:ff00(size=64) ioport:1c00(size=64) ioport:1c40(size=64)
*-memory:2 UNCLAIMED
description: RAM memory
product: MCP61 Memory Controller
vendor: NVIDIA Corporation
physical id: 1.2
bus info: pci@0000:00:01.2
version: a2
width: 32 bits
clock: 66MHz (15.2ns)
configuration: latency=0
*-usb:0
description: USB controller
product: MCP61 USB 1.1 Controller
vendor: NVIDIA Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: a3
width: 32 bits
clock: 66MHz
capabilities: pm ohci bus_master cap_list
configuration: driver=ohci-pci latency=0 maxlatency=1 mingnt=3
resources: irq:23 memory:fe02f000-fe02ffff
*-usbhost
product: OHCI PCI host controller
vendor: Linux 4.15.0-66-generic ohci_hcd
physical id: 1
bus info: usb@2
logical name: usb2
version: 4.15
capabilities: usb-1.10
configuration: driver=hub slots=10 speed=12Mbit/s
*-usb:1
description: USB controller
product: MCP61 USB 2.0 Controller
vendor: NVIDIA Corporation
physical id: 2.1
bus info: pci@0000:00:02.1
version: a3
width: 32 bits
clock: 66MHz
capabilities: debug pm ehci bus_master cap_list
configuration: driver=ehci-pci latency=0 maxlatency=1 mingnt=3
resources: irq:22 memory:fe02e000-fe02e0ff
*-usbhost
product: EHCI Host Controller
vendor: Linux 4.15.0-66-generic ehci_hcd
physical id: 1
bus info: usb@1
logical name: usb1
version: 4.15
capabilities: usb-2.00
configuration: driver=hub slots=10 speed=480Mbit/s
*-usb
description: Mass storage device
product: Cruzer Glide
vendor: SanDisk
physical id: 6
bus info: usb@1:6
logical name: scsi4
version: 2.01
serial: 200512339111BA611C6F
capabilities: usb-2.00 scsi emulated scsi-host
configuration: driver=usb-storage maxpower=200mA speed=480Mbit/s
*-disk
description: SCSI Disk
product: Cruzer Glide
vendor: SanDisk
physical id: 0.0.0
bus info: scsi@4:0.0.0
logical name: /dev/sdb
version: 2.01
serial: 200512339111BA611C6F
size: 59GiB (64GB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: ansiversion=6 guid=93f49ea3-3531-429d-a512-39d1addafce7 logicalsectorsize=512 sectorsize=512
*-volume:0
description: reserved partition
vendor: Windows
physical id: 1
bus info: scsi@4:0.0.0,1
logical name: /dev/sdb1
serial: 3e37eaab-911e-463d-88a0-f8b954a73b1a
capacity: 15MiB
capabilities: nofs
configuration: name=Microsoft reserved partition
*-volume:1
description: Windows NTFS volume
vendor: Windows
physical id: 2
bus info: scsi@4:0.0.0,2
logical name: /dev/sdb2
logical name: /mnt
version: 3.1
serial: 6658-8c32
size: 59GiB
capacity: 59GiB
capabilities: ntfs initialized
configuration: clustersize=4096 created=2019-11-13 22:04:29 filesystem=ntfs label=Flash Drive modified_by_chkdsk=true mount.fstype=fuseblk mount.options=rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096 mounted_on_nt4=true name=Basic data partition resize_log_file=true state=mounted upgrade_on_mount=true
*-pci:0
description: PCI bridge
product: MCP61 PCI bridge
vendor: NVIDIA Corporation
physical id: 100
bus info: pci@0000:00:04.0
version: a1
width: 32 bits
clock: 66MHz
capabilities: pci ht subtractive_decode bus_master cap_list
resources: ioport:e000(size=4096) memory:fd700000-fd7fffff memory:fde00000-fdefffff
*-multimedia
description: Audio device
product: MCP61 High Definition Audio
vendor: NVIDIA Corporation
physical id: 5
bus info: pci@0000:00:05.0
version: a2
width: 32 bits
clock: 66MHz
capabilities: pm msi ht bus_master cap_list
configuration: driver=snd_hda_intel latency=0 maxlatency=5 mingnt=2
resources: irq:23 memory:fe024000-fe027fff
*-bridge
description: Ethernet interface
product: MCP61 Ethernet
vendor: NVIDIA Corporation
physical id: 7
bus info: pci@0000:00:07.0
logical name: enp0s7
version: a2
serial: 00:22:64:25:cf:14
capacity: 1000000000
width: 32 bits
clock: 66MHz
capabilities: bridge pm msi ht bus_master cap_list ethernet physical mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=forcedeth driverversion=0.64 latency=0 link=no maxlatency=20 mingnt=1 multicast=yes port=MII
resources: irq:24 memory:fe02d000-fe02dfff ioport:fc00(size=8)
*-ide:0
description: IDE interface
product: MCP61 SATA Controller
vendor: NVIDIA Corporation
physical id: 8
bus info: pci@0000:00:08.0
version: a2
width: 32 bits
clock: 66MHz
capabilities: ide pm msi ht pci_native_mode-only_controller__supports_bus_mastering bus_master cap_list
configuration: driver=sata_nv latency=0 maxlatency=1 mingnt=3
resources: irq:20 ioport:9f0(size=8) ioport:bf0(size=4) ioport:970(size=8) ioport:b70(size=4) ioport:f700(size=16) memory:fe02c000-fe02cfff
*-ide:1
description: IDE interface
product: MCP61 SATA Controller
vendor: NVIDIA Corporation
physical id: 8.1
bus info: pci@0000:00:08.1
version: a2
width: 32 bits
clock: 66MHz
capabilities: ide pm msi ht pci_native_mode-only_controller__supports_bus_mastering bus_master cap_list
configuration: driver=sata_nv latency=0 maxlatency=1 mingnt=3
resources: irq:21 ioport:9e0(size=8) ioport:be0(size=4) ioport:960(size=8) ioport:b60(size=4) ioport:f200(size=16) memory:fe02b000-fe02bfff
*-pci:1
description: PCI bridge
product: MCP61 PCI Express bridge
vendor: NVIDIA Corporation
physical id: 9
bus info: pci@0000:00:09.0
version: a2
width: 32 bits
clock: 33MHz
capabilities: pci pm msi ht pciexpress normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:0 ioport:d000(size=4096) memory:fdd00000-fddfffff ioport:fdc00000(size=1048576)
*-pci:2
description: PCI bridge
product: MCP61 PCI Express bridge
vendor: NVIDIA Corporation
physical id: b
bus info: pci@0000:00:0b.0
version: a2
width: 32 bits
clock: 33MHz
capabilities: pci pm msi ht pciexpress normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:0 ioport:c000(size=4096) memory:fdb00000-fdbfffff ioport:fda00000(size=1048576)
*-pci:3
description: PCI bridge
product: MCP61 PCI Express bridge
vendor: NVIDIA Corporation
physical id: 101
bus info: pci@0000:00:0c.0
version: a2
width: 32 bits
clock: 33MHz
capabilities: pci pm msi ht pciexpress normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:0 ioport:b000(size=4096) memory:fd900000-fd9fffff ioport:fd800000(size=1048576)
*-display
description: VGA compatible controller
product: C61 [GeForce 6150SE nForce 430]
vendor: NVIDIA Corporation
physical id: d
bus info: pci@0000:00:0d.0
version: a2
width: 64 bits
clock: 66MHz
capabilities: pm msi vga_controller bus_master cap_list rom
configuration: driver=nouveau latency=0
resources: irq:22 memory:fb000000-fbffffff memory:e0000000-efffffff memory:fc000000-fcffffff memory:c0000-dffff
*-pci:4
description: Host bridge
product: K8 [Athlon64/Opteron] HyperTransport Technology Configuration
vendor: Advanced Micro Devices, Inc. [AMD]
physical id: 102
bus info: pci@0000:00:18.0
version: 00
width: 32 bits
clock: 33MHz
*-pci:5
description: Host bridge
product: K8 [Athlon64/Opteron] Address Map
vendor: Advanced Micro Devices, Inc. [AMD]
physical id: 103
bus info: pci@0000:00:18.1
version: 00
width: 32 bits
clock: 33MHz
*-pci:6
description: Host bridge
product: K8 [Athlon64/Opteron] DRAM Controller
vendor: Advanced Micro Devices, Inc. [AMD]
physical id: 104
bus info: pci@0000:00:18.2
version: 00
width: 32 bits
clock: 33MHz
*-pci:7
description: Host bridge
product: K8 [Athlon64/Opteron] Miscellaneous Control
vendor: Advanced Micro Devices, Inc. [AMD]
physical id: 105
bus info: pci@0000:00:18.3
version: 00
width: 32 bits
clock: 33MHz
configuration: driver=k8temp
resources: irq:0
*-scsi:0
physical id: a
logical name: scsi0
capabilities: emulated
*-disk
description: ATA Disk
product: WDC WD2500AAKX-0
vendor: Western Digital
physical id: 0.0.0
bus info: scsi@0:0.0.0
logical name: /dev/sda
version: 1H15
serial: WD-WCC2EP529232
size: 232GiB (250GB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: ansiversion=5 guid=319aec2e-22a3-406f-894b-c7bc21206b53 logicalsectorsize=512 sectorsize=512
*-volume:0
description: BIOS Boot partition
vendor: EFI
physical id: 1
bus info: scsi@0:0.0.0,1
logical name: /dev/sda1
serial: 65de594a-0d7a-4eb6-9022-aba32dcd45e9
capacity: 1023KiB
capabilities: nofs
*-volume:1
description: EXT4 volume
vendor: Linux
physical id: 2
bus info: scsi@0:0.0.0,2
logical name: /dev/sda2
logical name: /
version: 1.0
serial: dfd79953-3e29-4d6e-aff3-bb06fc6b6d82
size: 232GiB
capabilities: journaled extended_attributes large_files huge_files dir_nlink 64bit extents ext4 ext2 initialized
configuration: created=2019-08-30 19:04:01 filesystem=ext4 lastmountpoint=/ modified=2019-08-30 19:12:06 mount.fstype=ext4 mount.options=rw,relatime,data=ordered mounted=2019-11-21 19:24:47 state=mounted
*-scsi:1
physical id: c
logical name: scsi1
capabilities: emulated
*-cdrom
description: DVD reader
product: DVD-ROM TS-H353B
vendor: TSSTcorp
physical id: 0.0.0
bus info: scsi@1:0.0.0
logical name: /dev/cdrom
logical name: /dev/dvd
logical name: /dev/sr0
version: bc03
capabilities: removable audio dvd
configuration: ansiversion=5 status=nodisc
我認為此時我需要將設備重新配置為網路級,但我不知道從哪裡開始。
答案1
我花了更多的猜測和網路論壇的建議,但我設法再次將其上線。板載網路適配器仍然被列為橋接設備並且仍然被停用。我發現了一個乙太網路 <-> USB 轉接器,是我在一家真正的垃圾店購買的。我將其插入並打開機器,它識別了適配器,但本身沒有啟用它。所以然後我猜測配置 netplan 來使用它(不知道設備名稱使用什麼)。它不起作用,所以我重新啟動以防萬一。啟動畫面(必須打開啟動日誌,因為速度太快)給了我一個新的東西來放入 netplan 配置中。我嘗試了一下,立刻就起作用了。