No more network interface

This afternoon I wanted to experiment with how I can connect the Gosund WiFi electrical sockets to HomeKit. Unfortunately while I was attempting to do so, I installed packages that corrupted my Linux kernel and removed my network interface.

This is of course a huge inconvenience. After a reboot, I found the media server to not have any networking. The only network interface that it recognized was lo (the loop back interface 127.0.0.1).

When I performed a:

sudo lshw -C network

The network card was recognized but was UNCLAIMED. This obviously raised alarm bells and indicated to me that the kernel was some how not recognizing the card.

I had to download a version of Ubuntu Desktop 18.04 LTS on a USB drive and proceeded to live boot from it. Luckily the live boot recognize the network card and I was able to get networking.

Before I can perform any rescue activities, I had to mount the old root file system and chroot to it by taking the following steps:

# Boot the Ubuntu Live CD.
# Press Ctrl-Alt-F1

sudo mount /dev/sda1 /mnt

sudo mount --bind /dev /mnt/dev

sudo mount --bind /proc /mnt/proc

sudo mount --bind /sys /mnt/sys

sudo chroot /mnt

# Add the following lines into /etc/resolv.conf after you use chroot:

nameserver 208.67.222.222
nameserver 208.67.220.220

I then needed to restore the kernel by executing the following:

sudo apt-get install --install-recommends linux-generic-hwe-18.04

After another reboot, the server is back to its old self.

Leave a Reply

Your email address will not be published. Required fields are marked *