Ubuntu – Install Ubuntu including all drivers from the USB-Live system

live-usbsystem-installation

If I boot from a Ubuntu USB live stick, everything works perfect on our belinea o.book 1301, but if I install Ubuntu from this stick with completely wiping the harddrive I end up with no wifi, touchpad and no USB support. Not even a USB-Stick or Mouse is recognized. and the Network-card neither, so I cannot install new packages at all.

But all these things work in the Live-System from the USB Stick! I tried all Ubuntu 16.04, 17.10 (17.10 is worse: there is no correct display settings either although it is perfect in the live-stick too) and even 18.04 beta.

Why isn`t the USB stick installing the same version on the system?


Output of lspci |grep -i net:

Ethernet controller: Realtek Semiconductors Co., Ltd. RTL8101/2/6E PCI Express Fast/Gbit Ethernet Controller (rev 02)
Network controller: Realtek Semiconductors Co., Ltd. RTL8187SE Wireless LAN Controller (rev 02)

Output in the USB-live-system of modprobe -c|grep rtl818x

alias pci:v000010ECd00008180sv*sd*bc*sc*i* rtl818x_pci
alias pci:v000010ECd00008185sv*sd*bc*sc*i* rtl818x_pci
...

In the installed system I get no output so there seems there is no RTL drivers installed.

I found some hints on this page, but that seems really hard to install without internet connection.

On the Realtec drivers page, there is only a driver for the old kernel 4.7. ;(


Note: solving the problem for the laptop of my friend is one thing, but I'd rather find a solution how to solve this for everyone:

How do I copy all drivers from the USB live system on my computer?

Best Answer

I've encountered similar problems in the past. As ever in these situations, the details matter. One solution that has worked for me is to boot the live image, "change root" into the not-working installed image, and use the live-setup's networking to allow the normal update procedure to properly install things. The precise procedure below:

  1. Boot the live image (e.g., USB, CD)
  2. Install Ubuntu to the HDD/SSD as per usual. Two details:
    1. As an aside, consider making multiple partitions, at least one for / and one for /home. This will make future updates or installations much easier. However, unless you know what you're doing, I might suggest sticking with the ext4 filesystem on each partition (unlike the link).
    2. I've generally had better luck not installing updates during this part of the process. You're choice of course, but we'll be doing the updates below, and the whole process at least feels faster if done later.
  3. When the installation finishes "Continue Testing" and don't reboot.
  4. Mount the newly minted root (/) partition by clicking the icon (one of the new gray platter/HDD looking items on the vertical bar to the left)
  5. Open a terminal ("Ack! I know!") via Ctrl+Alt+t -> A purple-looking window will appear

    Terminal example (cropped), akin to Live-image Ubuntu

  6. By clicking on the icon in step 2, Ubuntu Live mounted the hard drive to a directory in /media/ubuntu/. It will potentially be a weird directory name (technically a GUID), like 2801b1ba-d7d4-22e1-a6e3-0abcab51f05a. Task: "Change Root" into that directory with:

    sudo chroot /media/ubuntu/<directory_name>
    
  7. At this point, the shell (terminal) will run all commands as if on the new system, but with access to the working networking of the running kernel (the Live image). So, try a simple update and dist-upgrade (the command line equivalent to what the GUI does when updating your packages) and with luck, the correct packages will install themselves It doesn't always work, but this has been a surprisingly "simple" fix to a number of Live-boot vs installed-boot issues I've encountered:

    apt-get update
    apt-get dist-upgrade
    

I may have missed a step in terms of getting networking setup; if so, please leave a comment, and I'll update this answer when I can more thoroughly confirm each step of this procedure ("I'm not at my desk right now." :-) ).

Related Question