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

 

 

 

Wifi worked for netboot installation. NOT inside Debian?

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
tgftw
Posts: 4
Joined: 2018-02-23 02:15

Wifi worked for netboot installation. NOT inside Debian?

#1 Post by tgftw »

I'm using a USB wifi adapter, I've used it on this machine with Debian before, installed through a different method though.

During the Debian installer, I'm prompted to insert the disk containing the firmware for my wireless card. I did that, it was detected fine, it allowed me to choose my network and enter my passphrase.

It proceeded to download the installation files and everything as per normal. (I chose an absolute bare minimum installation, no GUI. Sid repositories)

Once I finish the installation, my first action inside of Debian was:

Code: Select all

sudo apt-get update
which failed because it couldn't connect to the mirror. I did:

Code: Select all

ip a
which revealed that my connection was down on my wifi card, so I did:

Code: Select all

sudo ifup wlx9cefd5fe52a5
which is indeed the name of my wifi card, rather than wlanX or something... I triple checked this, since the procedurally generated characters left room for error... I'm sure I'm typing the interface name correctly.

So I now issue:

Code: Select all

sudo nano /etc/network/interfaces
To find out that my wifi information was never stored here, there's nothing at all about my
network devices actually.

So currently I'm about to go learn the syntax for adding my devices. I'm sure once I manually put them in here they will respond accordingly and everything will work fine.

But what really bothers me is, why could the installer communicate without issue, but now the installed distribution can't? I feel like I must have done something wrong along the way, but I'm not sure where or what.

I've done this exact same thing before and it worked just fine that time. I think I know how to correct it now, but it seems like I shouldn't have had to do all this, if I had the firmware and wpasupplicant working on the installer. (by the way, wpasupplicant is indeed installed)

I know it's in the nature of an intentionally minimalist Debian Linux install not to come with all the bells and whistles... but this doesn't seem like intended behavior!

Thanks in advance :)

EDIT: I currently have other devices working on the network, so my SSID is being broadcast and my network itself is working well.

EDIT 2: Actually, I continued along the troubleshooting advice I was given... I modified the /etc/network/interfaces file appropriately, now I'm told "ifup: couldn't read interfaces file "/etc/network/interfaces"" so I opened the file in vi to be sure there wasn't any strange newline characters, and I didn't see anything crazy. I tried commenting out the "source" line, because somebody had suggested it for a similar issue I found via Google search results... and that had no effect at all. Currently I'm a little annoyed with it, I'm going to step away for a bit and attack it after dinner.

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: Wifi worked for netboot installation. NOT inside Debian?

#2 Post by dilberts_left_nut »

Don't know - I haven't done an install for a while and always use a wired connection when I do.

To sort out your setup now, this is a good reference:
https://wiki.debian.org/WiFi
AdrianTM wrote:There's no hacker in my grandma...

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Wifi worked for netboot installation. NOT inside Debian?

#3 Post by bw123 »

tgftw wrote: (I chose an absolute bare minimum installation, no GUI. Sid repositories)
good luck with sid. I have never used it, but I think I would setup a stable system first, then move to sid to help figure out what is and isn't unstable.

I usually do offline install with the first disk, so the network isn't setup for me either. I have read about this "problem" many times, and not sure what the correct behavior is. People obviously assume that the installer should save their settings somewhere, but with several methods of using wifi, what should the default method be?

Do you want ifupdown? networkd? You want auto? You want dhcp? You want static? How many questions should be added to the installer? Are there any security issues to consider with wireless?
resigned by AI ChatGPT

tgftw
Posts: 4
Joined: 2018-02-23 02:15

Re: Wifi worked for netboot installation. NOT inside Debian?

#4 Post by tgftw »

dilberts_left_nut wrote:Don't know - I haven't done an install for a while and always use a wired connection when I do.

To sort out your setup now, this is a good reference:
https://wiki.debian.org/WiFi
Thank you, that's the primary source I've been using for information so far, unless handling specific errors that aren't addressed there. Also, I don't have the ability to use a wired connection unfortunately, I'm positive that would work great though.
bw123 wrote:good luck with sid. I have never used it, but I think I would setup a stable system first, then move to sid to help figure out what is and isn't unstable.
I took your advice to some extent. I tried using the stable netboot ISO rather than the mini ISO. Same result so far. I can definitely try to use an even more complete image... but I suspect the results will be the same. And honestly, it's beginning to seem like this behavior is expected. My original post was less about "how do I get my wifi working?" and more about "why doesn't it remember that we already configured wifi?" which I guess looking back isn't exactly helpful. Perhaps I should see if I can make a positive contribution to the distro myself! I'd love to have a more smooth transition, given that I've already loaded my firmware and established connection pre-installation, it really shouldn't be a problem to do the same shortly thereafter.
dilberts_left_nut wrote: People obviously assume that the installer should save their settings somewhere, but with several methods of using wifi, what should the default method be?Do you want ifupdown? networkd? You want auto? You want dhcp? You want static? How many questions should be added to the installer? Are there any security issues to consider with wireless?
I understand the point you're trying to make. However, I believe something is better than nothing. Perhaps you would get a dialog similar to the kernel selection screen in the expert install. The installer already asked me about DHCP, a binary toggle could handle auto-connection.

It's also possible that since I've omitted all optional packages, I've hindered that functionality. I'm going to do a more robust installation this time.

I'll update the main post with results when I get them and clean up the formatting, so if anybody else runs into this they can make sense of it.

It seems to me either it's just user error or perhaps the installer could use a tiny tweak just to make things more smooth. I'm going to pay more close attention to the packages I'm installing this time, there may be something in the initial offerings that would help facilitate this. Will report back with more!

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Wifi worked for netboot installation. NOT inside Debian?

#5 Post by bw123 »

tgftw wrote:
My original post was less about "how do I get my wifi working?" and more about "why doesn't it remember that we already configured wifi?" which I guess looking back isn't exactly helpful. Perhaps I should see if I can make a positive contribution to the distro myself!
I think that's a really great attitude. Maybe one thing you could do is after getting your system setup, use reportbug to file a bug against installation-report pkg, and let people know what you think of the installer. Be real specific about how you think it should work, don't just describe the problem, offer your own solution if you find one. People do pay attention to these reports.
resigned by AI ChatGPT

tgftw
Posts: 4
Joined: 2018-02-23 02:15

Re: Wifi worked for netboot installation. NOT inside Debian?

#6 Post by tgftw »

tgftw wrote:I'll update the main post with results when I get them and clean up the formatting, so if anybody else runs into this they can make sense of it.
I haven't abandoned this, I simply haven't had any good results yet.

Yesterday I tried replacing my wifi adapter, I've got three different chipsets, all of which I have the appropriate firmware for... one of which is even a free chipset. I've tried mini.iso, *-netinst*.iso, the Debian XFCE flavored CD ISO... I've tried Sid repos, I've tried standard Stretch... firmware from each...I've tried robust installations (CLI only though) and minimal installations, with and without excess drivers, with and without "standard system utilities" or whatever it's called... I've followed directions step-by-step from the Debian wiki, even tried the advice on the Arch wiki since it's so well documented and often times mostly interchangable.

In the end, I'm not able to take a system from CLI to the internet without an ethernet cable or GUI under any circumstances.

If I install xorg, openbox, and wicd, everything works as expected, with all of the network devices. But I really didn't want a GUI on this system, it only has 1GB of RAM and has plenty of tasks to perform without the UI. So now my problem has evolved from "The installer doesn't remember my wireless settings" to "I can't connect wirelessly under any circumstances from the command line."

I know my circumstances aren't desirable but I figured it should be possible. I'm sure it is, the installer can do it...

The best I've done so far is get the firmware installed, get connected to my network. But then, I can't get DHCP, and setting static doesn't work either. There are multiple other devices on my network, so lack of a DHCP server is not the case, I have a router handling that. Internet is working on everything but this.

My most recent attempt went like this:

Code: Select all

ip a
[revealed the name of my wifi adapter, wlx9cefd5fe52a5 and the fact that it's currently state DOWN]

Code: Select all

sudo ip link set wlx9cefd5fe52a5 up
[i'm assuming this is supposed to set the link status to UP, just following along with the wiki]

Code: Select all

ip a
[no changes here though, still reported as DOWN]

Code: Select all

sudo iwlist scan
[my wifi network was found here, had to use shift+pgup and shift+pgdn to find it - noted exact ESSID, it's in quotations, one of the lines that starts with IE: specified encryption type, in my case it looked like:]

IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK

[This tells me I'm using WPA2-PSK encryption]

[this is where things went wrong last time.]

Code: Select all

sudo chmod 0600 /etc/network/interfaces
[restrict permissions, to keep psk private]

Code: Select all

wpa_passphrase {ssid} {passphrase}
[generated my encrypted key - i suspect if your ssid has any spaces in it you have to use quotations]

Code: Select all

sudo nano /etc/network/interfaces
[used the format below, appended to the end, tried ssid with and without quotes]

Code: Select all

iface wlan0 inet dhcp
        wpa-ssid myssid
        wpa-psk superlongencryptedpassphraseasgeneratedbytheprevioussteps
Ctrl+x to exit, y to save, enter to choose filename

Code: Select all

sudo ifup [wlan]
Only to arrive firmly at:

No DHCPOFFERS received.
No working leases in persistent database - sleeping.


To fix this, I was lead to try editing dhconfig.conf, only to "find / dhconfig.conf" had 'No such file or directory,' seems like I must not have that software.

On reboot, my startup procedure gives me:

A start job is running for Raise network interfaces... [forever]


It's a long shot but somebody recommended adding irqpoll to the boot arguments, but it was for a seemingly different issue.

'e' on the Grub screen, I added 'irqpoll' before quiet, no change to symptoms.

Tried manually configuring IP as described on the Debian wiki, no results.

Arch wiki described doing all these same steps through the wpa-cli interface. I figure why not, lets try it. I followed their directions appropriately, and ended up exactly at the same dead end.

ping 8.8.8.8 <- no longer tells me the network is unreachable, it just stalls out forever and the packets never come back. This is the case using DHCP or Static settings.

when I do ifup on my interface, it attempts DHCP handshaking six or eight times, then gives up. Curiously, it seems to be using the hostmask 255.255.255.255 which seems incorrect, I've always used 255.255.255.0 for my networks in the past, but it's possible that what I'm seeing there isn't actually the hostmask.

So, that's where I'm at currently. I don't really expect anybody to pop up with a solution, I actually feel like this is something really easy that everybody should know how to do, especially considering the vast quantity of resources available on the topic.

I followed all the top Google results for my most recent error message, which is in bold above... did all the suggested things, to no avail.

But again, if I use any ISO to install on a wired interface (which I can't do anymore sadly, different environment) and then just download wicd, it takes care of all the background stuff and I end up with a working connection.

Maybe I should run a VM on another machine, and start wicd from the console, it might output information along the way to guide me in the proper direction? Honestly, I'm feeling very lost at the moment. Not to mention unproductive, three days ago I was supposed to have started a project... can't even get my OS installed, haha. Classic PEBCAK error, I'm sure.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Wifi worked for netboot installation. NOT inside Debian?

#7 Post by bw123 »

It's a decent how-to but I don't understand why you started out using interface named wlx9cefd5fe52a5, but later put wlan0 into your interfaces file?

I guess I can understand why really. Used to be we could ALWAYS count on the first network device to be eth0/wlan0 but things have changed.
resigned by AI ChatGPT

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 461 times

Re: Wifi worked for netboot installation. NOT inside Debian?

#8 Post by sunrat »

bw123 wrote:It's a decent how-to but I don't understand why you started out using interface named wlx9cefd5fe52a5, but later put wlan0 into your interfaces file?
That would only work if OP disabled predictable network interfaces, something which they should have mentioned.
It would help to know exactly what USB wifi adapter is being used which will be shown in

Code: Select all

lsusb
Some adapters have drivers in the kernel, those that don't may have drivers available which need to be built. I have one which needs a driver from Github as the manufacturers supplied one doesn't work with newer kernels. Nearly all of them require additional firmware.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

tgftw
Posts: 4
Joined: 2018-02-23 02:15

Re: Wifi worked for netboot installation. NOT inside Debian?

#9 Post by tgftw »

bw123 wrote:It's a decent how-to but I don't understand why you started out using interface named wlx9cefd5fe52a5, but later put wlan0 into your interfaces file?
It's actually been a couple days since I did that, and have since made other attempts at getting it to work that way, but as I recall, I actually used the explicit name. When I referred to wlan0, I was just illustrating the formatting I used. At least, that's the way I recall it - possibly I made a mistake there.
sunrat wrote:That would only work if OP disabled predictable network interfaces, something which they should have mentioned.
It would help to know exactly what USB wifi adapter is being used which will be shown in

lsusb

Some adapters have drivers in the kernel, those that don't may have drivers available which need to be built. I have one which needs a driver from Github as the manufacturers supplied one doesn't work with newer kernels. Nearly all of them require additional firmware.
Again, I've nuked the system so I can't pull that information directly right now - but I will say that I have all of the non-free firmwares provided in Debian package form, there's a zip file that contains them which I found through the wiki. I had the ones for Stretch and also for Sid. To be sure what specific package I needed, I first checked lsusb which told me the chipset, which I followed to a Debian package, and can confirm that all of my chipsets had their appropriate packages available - to the best of my knowledge, clearly I'm not infallible or I wouldn't be in this situation.

After numerous attempts and continuing to hit a brick wall with a "wifi only, CLI only" setup, regardless of the specific adapter or firmware or installation media I chose. I hate to just accept that "it's not possible," because I'm sure it actually is... the network installers downloaded everything... I'm just dumb.

The way I eventually got it to work was to install DD-WRT on an old Netgear router and turn it into a wireless bridge which I then was able to use to netinstall Debian via ethernet. Works perfect, as you'd expect.

I really can't say that the problem is solved, but I was able to find a workaround that will allow me to become productive rather than fret over it for eternity and never get any work done.

But however I can assist in correcting this problem for future installations, I'd like to.

n_hologram
Posts: 459
Joined: 2013-06-16 00:10

Re: Wifi worked for netboot installation. NOT inside Debian?

#10 Post by n_hologram »

OP: you mentioned that you found success with wicd. If I recall, wicd uses wpa_supplicant as its wifi backend. Instead of network/interfaces, why don't you try wpa_supplicant directly? You could just pipe your wpa_passphrase command output to a file, use that file for the config, and connect using dhclient.

Something like:

Code: Select all

wpa_passphrase [ssid] [yoursuperlongpassphrase] > /wherever/wifi.conf
wpa_supplicant -Dnl80211 -i[interface] -c/wherever/wifi.conf -B
dhclient [interface]
(The .conf suffix is arbitrary and unnecessary)
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
the crunkbong project: scripts, operating system, the list goes on...

Post Reply