Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED} No wifi after minimal net-install

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
debbiethekiwi
Posts: 33
Joined: 2019-08-31 04:15
Has thanked: 1 time

[SOLVED} No wifi after minimal net-install

#1 Post by debbiethekiwi »

I have the Buster 10.1 Net-install iso, dd to a USB stick. I have a modern laptop with wifi only, no ethernet, and even if I had a USB ethernet dongle I've nowhere to plug the other end. The "non-free" iwl drivers for my intel system I have from the non-free firmware package, unpacked into a folder named firmware at the root of another FAT32 USB stick. Selecting "Graphical Install" all goes well, wifi network recognised, WPA2 PSK entered and accepted, apt updated, base system installed. Then the option is given to install a Desktop environment. All of those offered, even the default Debian, which I understand is a slimmed down Gnome, install a camel train of other baggage, Office suites, toys and trinkets. Following the general advice I install only "System utilities".

After grub is installed and the clock set, the installer pauses to tell you it will now reboot. At this stage a number of outdated posts around the net will say you should Alt-F2 to drop into a shell and use apt (or aptitude, or apt-get?) to install sudo, xorg and network-manager, and to backup the network configuration to /target/etc/network/interfaces. I can Alt-F2, or I can select a shell from the installer menu earlier in the process. Either way that tells me it is an ash shell from Busybox, and typing help for a list of commands shows a short list of things I would never use (but I'm not a hard-core terminal user). The list does not include ls, but ls works. su is not found, but the outdated advice above says you need to su to use apt. [apt | aptitude | apt-get] are not found.

Exit the shell, politely... Reboot. sudo is installed, but could this be because I had chosen during install to have no root account? There is no network. networkctl says so. The commands ifdown ifup iplink ifconfig iwconfig are not found.

Code: Select all

$ ip a 

auto lo
iface lo inet loopback
There are [generic | empty] config files at /etc/networks and /etc/network/interfaces. There is advice around the 'net that wifi config data should never appear in /etc/network/interfaces. There are empty folders at /etc/network/interfaces.d/ and /etc/NetworkManager/conf.d/ Contrary to the implication of the final 3 posts here the non-free iwl drivers appear to be installed at /lib/firmware. If I had chosen any desktop environment, even the minimal Debian/Gnome, wifi is available immediately on reboot, no fuss, no bother. This IMNSHO is an installer bug. At least it is a known problem, and continues the known problem from wired networks. In the meantime I guess I can add some *.deb to that firmware folder, mount it at /mnt/things, and manually install whatever is needed, but I'd welcome any suggestions as to how to find out what minimum I still need.
Last edited by debbiethekiwi on 2019-10-12 05:56, edited 1 time in total.
Solar powered - saving carbon

peer
Posts: 443
Joined: 2017-03-26 10:14
Has thanked: 8 times
Been thanked: 20 times

Re: No wifi after minimal net-install

#2 Post by peer »

install: "network-manager-gnome wireless-tools" in stead of network-manager.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: No wifi after minimal net-install

#3 Post by Head_on_a_Stick »

debbiethekiwi wrote:Then the option is given to install a Desktop environment. All of those offered, even the default Debian, which I understand is a slimmed down Gnome, install a camel train of other baggage, Office suites, toys and trinkets. Following the general advice I install only "System utilities".
Which "general advice" would this be then? Not selecting a desktop environment results in a *very* minimal system. I take it you didn't select the laptop task? That includes the relevant wireless utilities.
debbiethekiwi wrote:[apt | aptitude | apt-get] are not found.
The installer uses anna rather than APT (with udeb files instead of .debs).

Once the wireless tools are installed (via the laptop task) then connecting from the installed system should be fine. NetworkManager isn't needed at all, Debian has both ifupdown and systemd-networkd included in the system utilities & laptop task.
debbiethekiwi wrote:There is no network. networkctl says so.
The networkctl command would only say otherwise if you were using systemd-networkd. The installer does not do this, it has to be configured manually.
debbiethekiwi wrote:The commands ifdown ifup iplink ifconfig iwconfig are not found.
How are you trying to find them?

For example:

Code: Select all

E485:~$ ifconfig
loksh: ifconfig: not found
E485:~127$ which ifconfig
E485:~1$ sudo find / -name ifconfig
find: ‘/run/user/1000/gvfs’: Permission denied
/usr/sbin/ifconfig
E485:~1$
^ The command exists but it's not in my user's PATH. See also http://forums.debian.net/viewtopic.php?f=16&t=142973

Those commands should all be supplied by the laptop task.
debbiethekiwi wrote:

Code: Select all

$ ip a 

auto lo
iface lo inet loopback
You also need to install the iwlwifi firmware package (or copy the firmware over manually), you have no wireless interface at the moment.

Next time try the unofficial ISO image that includes the non-free firmware, it will install that package for you automatically (the official image will not because it is against Debian Policy).
debbiethekiwi wrote:There is advice around the 'net that wifi config data should never appear in /etc/network/interfaces.
Yes, there is a lot of dodgy advice on the interweb.

Try https://wiki.debian.org/WiFi/HowToUse#W ... d_WPA2-PSK or https://wiki.archlinux.org/index.php/Sy ... ss_adapter
deadbang

debbiethekiwi
Posts: 33
Joined: 2019-08-31 04:15
Has thanked: 1 time

Re: No wifi after minimal net-install

#4 Post by debbiethekiwi »

Head_on_a_Stick wrote:Not selecting a desktop environment results in a *very* minimal system.
Just the thing for getting a clean install of gnustep. I know what other user applications I want, and apt is very good at sorting dependencies for my environment. I've already tried installing a full KDE-non-free to look at whether I liked KDE. It looks nice but it's got some habits that don't need discussing here. I've installed LXDE, then tried to install gnustep and remove LXDE, but remove LXDE doesn't necessarily remove everything else (not needed for gnustep) that was installed, clogging launcher menus, and giving confusion.
Head_on_a_Stick wrote:I take it you didn't select the laptop task? That includes the relevant wireless utilities.
I didn't select it because it was never given as an option in the default Graphical Installer, [debian-10.1.0-amd64-netinst.ISO]. It is not presented to the user in "Advanced Options...", nor in the "Expert Install..." which looks AFAICT as simply a ncurses version of the Advanced Options. During the phase Install Base System amongst the words flashing along under the progress bar was something like "installing Detect if Laptop...", so I assumed it was done automagically. Interestingly what everyone else is calling wireless-tools is now in the Buster installer replaced by iw.
Head_on_a_Stick wrote:The installer uses anna rather than APT
That's not mentioned in the latest Install Manual, presumably because we don't need to know.
So last thing during install I went into the shell and did [ALE_L02 is my local network SSID]

Code: Select all

cp /etc/NetworkManager/system-connections/ALE_L02 /target/etc/network/interfaces.d/ALE_L02
After rebooting the new system

Code: Select all

$ sudo fdisk -l
Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
[omit details of 6 partions on SSD]

Disk /dev/sda: 14.9 GiB, 16005464064 bytes, 31260672 sectors
Disk model: Cruzer Blade    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9DCCB70A-5C4B-4335-A182-57886E25FD0E

Device      Start      End  Sectors  Size Type
/dev/sda1      40   409639   409600  200M EFI System
/dev/sda2  411648 31258623 30846976 14.7G Microsoft basic data

$ sudo mkdir /mnt/cruz 
$ sudo mount /dev/sda2  /mnt/cruz
$ sudo dpkg -i /mnt/cruz/firmware/firmware-iwlwifi_20190114-2_all.deb
No errors were reported.
Head_on_a_Stick wrote:
debbiethekiwi wrote:The commands ifdown ifup iplink ifconfig iwconfig are not found.
How are you trying to find them?
Sorry, silly me.

Code: Select all

ip a
1: lo: <LOOPBACK, UP, LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 
    inet 127.0.0.1/8  scope host lo
        valid_lft forever preferred_lft forever
    inet6  ::1/128  scope host
        valid_lft forever  preferred_lft forever
2: wlp0s20f3: <BROADCAST, MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether  xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff  # xx=my_wifi MAC_address

$ sudo ifup wlp0s20f3
ifup: /etc/network/interfaces.d/ALE_L02: 2: misplaced option
ifup: unknown interface wlp0s20f3

$ sudo less /etc/network/interfaces.d/ALE_L02

[connection]
id=ALE_L02
uuid=[8-4-4-12 hex digits]
type=802-11-wireless

[802-11-wireless]
ssid=ALE_L02
mode=infrastructure
security=802-11-wireless-security

[802-11-wireless-security]
key-mgmt=wpa-psk
psk=XXXXXXXX

[ipv4]
method=auto

[ipv6]
method=auto
ip6-privacy=2
Head_on_a_Stick wrote:Next time try the unofficial ISO image that includes the non-free firmware, it will install that package for you automatically (the official image will not because it is against Debian Policy).
Ah, politics, the installer can use the nonfree drivers, but the user can't. But I installed my non-free drivers, post-install. Will the unofficial ISO install some other magic sauce?

Code: Select all

$ sudo dmesg | grep firmware
[    0.161515] Spectre V2 : Enabling Restricted Speculation for firmware calls
[    1.773828] iwlwifi 0000:00:14.3: firmware: direct-loading firmware iwlwifi-9000-pu-b0-jf-b0-38.ucode
[    1.774576] iwlwifi 0000:00:14.3: loaded firmware version 38.755cfdd8.0 op_mode iwlmvm
[    1.857722] i915 0000:00:02.0: firmware: direct-loading firmware i915/kbl_dmc_ver1_04.bin
[    1.858227] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[    1.945451] nouveau 0000:01:00.0: firmware: direct-loading firmware nvidia/gp108/gr/sw_nonctx.bin
[    1.945534] nouveau 0000:01:00.0: firmware: direct-loading firmware nvidia/gp108/gr/sw_ctx.bin
[    1.945622] nouveau 0000:01:00.0: firmware: direct-loading firmware nvidia/gp108/gr/sw_bundle_init.bin
[    1.945712] nouveau 0000:01:00.0: firmware: direct-loading firmware nvidia/gp108/gr/sw_method_init.bin
Solar powered - saving carbon

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1389
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 66 times

Re: No wifi after minimal net-install

#5 Post by None1975 »

debbiethekiwi wrote:su is not found, sudo is installed, but could this be because I had chosen during install to have no root account?
According Debian buster -- Installation Guide:
In case you do not specify a password for the “root” user here, this account will be disabled but the sudo package will be installed later to enable administrative tasks to be carried out on the new system. By default, the first user created on the system will be allowed to use the sudo command to become root.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

debbiethekiwi
Posts: 33
Joined: 2019-08-31 04:15
Has thanked: 1 time

Re: No wifi after minimal net-install

#6 Post by debbiethekiwi »

Head_on_a_Stick wrote:Next time try the unofficial ISO image that includes the non-free firmware, it will install that package for you automatically (the official image will not because it is against Debian Policy).
So I've got the unofficial ISO and the performance is identical to when I use the official ISO with the nonfree firmware on a separate USB stick: in both cases it does install the iwlwifi firmware; in both cases it does not install the nvidia gp108, but I understand the backstory there; in both cases it does not install the i915 DMC firmware which is present in a firmware-misc-nonfree_YYYYMMDD_all.deb; but the machine works without these, and there's no problem manually installing them later. In both cases the result is identical that if no GUI desktop environment is chosen the nonfree iwlwifi drivers and wireless-tools in the form of libiw are installed, but wifi is dead on reboot. I've combed thru the installer logs and if the default minimal gnome/debian desktop is installed, this includes NetworkManager and glib-networking-services, and on reboot the wifi comes up like the sun in the morning. This is a known Bug #694068, sadly seven years old and no nearer resolution... Meanwhile the installer is a moving target, and now itself uses NetworkManager, writing its config in a format that must be hand translated into something useful for the simpler wireless-tools...
Solar powered - saving carbon

debbiethekiwi
Posts: 33
Joined: 2019-08-31 04:15
Has thanked: 1 time

Re: No wifi after minimal net-install

#7 Post by debbiethekiwi »

Cobbled together from scraps around the net:
Create a file at /etc/network/interfaces.d/MY_SSID. If the name of the file is the SSID of your local network, you can put other suitably named files in here for other networks. The contents of the file should be:

Code: Select all

# The loopback network interface
auto lo
iface lo inet loopback

 # The primary network interface
auto wlan0
iface wlan0 inet dhcp
    wpa-ssid MY_SSID
    wpa-psk SECRET_PASSPHRASE
Note that some new hardware versions with some new OS versions will not use wlan0.
The command ip a will give you the name of your wifi interface, possibly something a bit like wlp0s3n10
If you don't like the idea of your psk in plaintext here, you can instead put in the output from

Code: Select all

wpa_passphrase SSID PASSPHRASE
then lock it down

Code: Select all

sudo chmod 0400 /etc/network/interfaces.d/$SSID
NB Some instructions say to put the connection info in the file /etc/network/interfaces, but if you are roaming then you will need to edit this file for each new location :oops:
This fix has worked for me, with Debian Buster 10.1.0 in October 2019. I do not warrant it will work at all times in all places...
Solar powered - saving carbon

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: No wifi after minimal net-install

#8 Post by Head_on_a_Stick »

debbiethekiwi wrote:Cobbled together from scraps around the net
The link I posted earlier covered that, no need to scrap around.
deadbang

Post Reply