elementary / installer

Installer front-end for Linux-based OSes
https://elementary.io
GNU General Public License v3.0
172 stars 43 forks source link

Installation can fail when additional drivers need to be installed but there's no Internet connection #723

Closed lenemter closed 10 months ago

lenemter commented 11 months ago

What Happened?

Installation can fail when additional drivers are needed but these drivers are not present on the installation media. However, in some cases (like with WiFi drivers), the install can succeed with the drivers available on the iso.

Steps to Reproduce

  1. Try to install daily build elementary OS on VMware without internet with additional drivers checkbox active

Expected Behavior

If there's no internet connection and the checkbox is checked, we should warn that it's recommended to have an internet connection if possible and inform the user that if the installation fails with this checkbox checked, they should either try again with an internet connection (if possible), or uncheck the box.

OS Version

7.x (Horus)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

davidmhewitt commented 11 months ago

That shouldn't always be the case. I guess it depends on the drivers and whether they're included on the iso.

Which drivers were needed for your install?

davidmhewitt commented 11 months ago

Think about the case where the required drivers are the broadcom WiFi drivers. You may not have an internet connection because you don't have WiFi drivers.

But it should be possible for the installer to install them without an internet connection because they're on the install media.

I'll try and test out an ISO on a machine with a broadcom card this weekend.

lenemter commented 11 months ago

Which drivers were needed for your install?

I installed OS in VMware. The package Installer tries to install is open-vm-tools-desktop

davidmhewitt commented 11 months ago

Ah, I wonder if this is something we should include on the iso too for potentially better vm support.

davidmhewitt commented 11 months ago

Okay, I've just tried this on my machine with a Broadcom WiFi card and the installation didn't fail without an internet connection and it successfully installed the bcmwl-kernel-source package.

But... WiFi still didn't work after installation because the bcmwl-kernel-source package doesn't depend on the kernel headers package, even though it does actually need kernel headers to work.

So far, this feature is 100% broken :sweat_smile:

lenemter commented 11 months ago

@davidmhewitt Can we ship just kernel headers then?

@danirabbit And about the original issue, can we show the same "Connect to Internet" view as in the Initial Setup and explain that it requires to install additional drivers? Or maybe we can disable the "install drivers" checkbox and explain bellow how to connect to the Internet?

davidmhewitt commented 11 months ago

You mean have the kernel headers pre-installed on every system? They're already available on the iso, just the broadcom driver doesn't depend on them so they don't get installed by this feature.

And I think Ubuntu don't package drivers with a dependency on kernel headers on purpose because you might be running a different kernel version (OEM, HWE, custom, etc).

Kernel headers take up quite a bit of space on an installed system, but having them pre-installed would probably solve this issue and probably a lot of issues with Nvidia and other proprietary drivers.

Also, for your second point, an internet connection is not required here. But it might be required for some drivers. If I have some hardware where I can't get an internet connection because I need the broadcom driver, being told I need to connect to the internet to install the driver would be annoying 😂

My test install showed I didn't need an internet connection for this feature to work. It just didn't install a working driver for a different reason.

lenemter commented 11 months ago

@davidmhewitt I mean if user has an Nvidia graphics card then it should install the Nvidia driver, but AFAIK iso doesn't contain it and in this case the installation will fail, right?

davidmhewitt commented 11 months ago

If you have an Nvidia GPU, are not connected to the internet, and try to use this feature, yes, the installation will probably fail.

I'm just saying that this feature should not force you to have an internet connection.

It might be impossible for a user to have an internet connection without installing the driver for their WiFi card. And this feature can possibly install the driver for their WiFi card without an internet connection.

danirabbit commented 11 months ago

Should/can we have the nvidia driver in the pool then as well?

davidmhewitt commented 11 months ago

Should/can we have the nvidia driver in the pool then as well?

Maybe... but it would increase the size of the iso considerably and there are multiple versions of the nvidia driver (and we'd probably have to ship all of them to cover all the offline install cases), the older drivers tend to get selected for older cards. And if the iso gets out of date, then we're not shipping the latest driver which potentially doesn't work for people with the latest and greatest hardware...

I don't think we do enough testing with nvidia hardware to risk trying to support it a bit better without actually testing it regularly.

I've opened a PR against distinst to not fail the whole install when one of these optional drivers fails to install. That way, we can just update the copy on this page to say something like "an internet connection is recommended to install drivers if possible".

danirabbit commented 10 months ago

Linking the PR here for easier tracking: https://github.com/pop-os/distinst/pull/319

Looks like it was assigned to someone yesterday :)

danirabbit commented 10 months ago

And it was merged! @davidmhewitt Do we just need to copy that version of distinst into our PPA?

davidmhewitt commented 10 months ago

In theory, yeah. Nothing needed on this side.

Not sure how frequently distinst is published to a Pop PPA though and what version we currently have.

I.e. do we need to be wary of any other changes that may have happened?

danirabbit commented 10 months ago

Looks like this is the diff between the last commit we imported: https://github.com/pop-os/distinst/compare/6118d7e...c6d65568701bf8dbc116153acb330d76b1c32f63

davidmhewitt commented 10 months ago

The ESP size change looked problematic at first but it doesn't really affect us. That's just the default size for auto partitioning, it won't further enforce a bigger size on the ESP for custom partitioning which we already have an open issue report about.

So, I think we just go for it and test it out.

danirabbit commented 10 months ago

New distinst is published, so closing as "fixed" in combination with https://github.com/elementary/installer/pull/726