I upgraded to 22.04 from 20.04 and now I don't have a wifi adapter and cannot connect to the internet

I tried to upgrade from 20.04 to 22.04 on an HP envy and after the installation there is no wifi adapter and no bluetooth either.

The kernel I’m booting into is 5.13 if I’m not mistaken. I was hoping to connect to the internet and run some version of apt update && apt upgrade but I don’t know how to connect. The laptop doesn’t have an ethernet port and I tried bluetooth tethering but the bluetooth adapter also doesn’t work and finally usb tethering didn’t do anything either (ie the computer didn’t recognize a new network or smth similar).

I was thinking that I can somehow fix this if I boot from a live USB maybe I could fix this but not sure how or if I can somehow download .deb packages that might be missing and install them. I tried to download the 6.2 kernel download link (the ones under this line "Test amd64/build succeeded (rc=0, on=amd64, time=0:13:06, log=amd64/log)" but this failed to install)

I’m somewhat familiar with linux / ubuntu but not enough to go further. Let me know what further info would be helpful.

Asked By: evan54


There are ways to fix a non-functional system via built-in options like booting into an older kernel or tools like rescue/recovery mode … etc. … However, oftentimes, those builtin mechanisms might fail to fulfill your maintenance needs and an external help is needed … In which case you can "metaphorically" but actually hook up your dying system to life support and open its gut to fix what’s damaged and then bring it back to life … For that you’ll need a boot-able USB stick or other media containing a live Ubuntu system i.e. the kind you used to install Ubuntu on your machine in the first time … Then, follow the instructions below.


Boot into the live system then connect to Internet from the live system and open a terminal then find your root partition (the one that on which your system’s root directory / resides) … You can list partitions with e.g.:

sudo fdisk -l

… identify your root partition … It could be something like /dev/sda2 … Or it could be a logical volume or a ZFS pool that you need to scan for and prepare or even an encrypted disk/partition/volume that you need to decrypt first … Whatever it is, you need to get it mounted at e.g. /mnt like so:

sudo mount /dev/sda2 /mnt/

Notice that if you have a separate /boot partition, then you need to mount it at /mnt/boot/ and likewise if you have a separate /home partition, then you need to mount it as well at /mnt/home/.

Then, only if you have the UEFI GRUB boot loader version, you’ll need to mount the EFI partition under /mnt/boot like so:

sudo mount /dev/sda1 /mnt/boot/efi/

Then, "bind" mount healthy needed system directories from the live system over their equivalents in the damaged system under /mnt … First, /proc:

sudo mount --bind /proc/ /mnt/proc/

… Then, /sys:

sudo mount --bind /sys/ /mnt/sys/

… Then, /dev:

sudo mount --rbind /dev/ /mnt/dev/

Notice the recursive bind mount with --rbind for /dev in order to also include the sub-mount of /dev/pts that might be needed for some commands like e.g. sudo and su to work (see why).

Now, run:

sudo cp /etc/resolv.conf /mnt/etc/resolv.conf

… That will copy your currently configured search domains from the live system to the chroot environment so that applications that rely on it to resolve DNS will work e.g. resolving repositories URIs from /etc/apt/sources.list when you do e.g. apt update from the terminal … That change, however, will not persist after booting from the system on disk as that file is actually symlinked to /run/systemd/resolve/stub-resolv.conf which is dynamically managed by systemd-resolved.



sudo chroot /mnt/

… and voila … Now, you are operating on the original system on the disk, connected to Internet, with the root user’s privileges and every command that you run from now on will be executed in this context … So, fix your system as needed … A good start (Set of maintenance commands) is almost always:

dpkg --configure -a && apt update && apt upgrade

… and when done run:



Unmount previous mounts like so:

sudo umount /mnt/dev/

… then:

sudo umount /mnt/sys/

… then:

sudo umount /mnt/proc/

… and any others you mounted in the reverse order and you’re done.

Answered By: Raffa