[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian 8.2 live "standard" install - how to set up wifi?



On Sat 28 Nov 2015 at 22:22:30 +0300, moxalt wrote:

> On Sat, 28 Nov 2015 12:36:35 +0000, Brian <ad44@cityscape.co.uk> wrote:
> 
> > On Sat 28 Nov 2015 at 10:52:46 +0300, moxalt wrote:
> > 
> > > On Fri, 27 Nov 2015 19:58:46 +0000, Brian <ad44@cityscape.co.uk> wrote:
> > > 
> > > > This bothers me. You install without any tasks (that's ok) and
> > > > networking is there when the new systam boots? Are you installing over a
> > > > wireless link? Just to emphasise - no wired connection is present.
> > > 
> > > Yes, networking is just there.
> > 
> > This still bothers me. :)
> > 
> > If networking is just there why, as you say later, do you have to bring
> > wlan0 up? Also, how do you manage to have eth0 in the output of
> > 'ifconfig' when the wireless interface has been chosen for installing?
> > It cannot be in /etc/network/interfaces.
> 
> Let me clarify what I meant by networking just being there. I did not say that
> a connection would be up and running straight away- just that all relevant
> network interfaces would be available for me to connect over. It is not the
> case that I am able to use internet straight away after booting- I have to
> actually connect to things with tools like wpa_supplicant, iwconfig, etc.

You have clarified the situation immensely. In fact, you have confirmed
that netcfg behaves as it is presently designed to, Without any selected
DE task and installing over a Wifi connection there is no connectivity
after finishing the install. You have to configure, as you say.  some
software.

When I first met this I was quite astounded; why no connectivity even
though it present during installation?

The thinking would appear to be that someone who does not install
network manager or install over a wired connection wants to set up
networking afterwards. This is what you actually did, without being
aware of netcfg's intentions. You used your initiative because you had
to if you wanted to connect to other machines.
 
> By the way, it seems I've been putting wlan0 up needlessly this whole time. I
> taught myself how to do command-line networking off some Ubuntu tutorial that
> said I should do it (probably just to cover all cases) and have been doing
> ifconfig <interface> up this whole time for no reason. After reading the
> ifconfig man page, it seems the kernel uses ifconfig to put all interfaces up
> at boot anyway, after which they are all up (as indicated by ifconfig run with
> no arguments).

How did you establish the connectivity that d-i did not provide? It
could only be through a wired connection or wpasupplicant using ifupdown
or NM (or wicd, I suppose). You are obviously connected now, so you must
have done something to rectify being unable to access the internet.

> What is strange, though, is that when I boot using the 'text'
> LINUX_CMDLINE_DEFAULT GRUB kernel parameter, and then type ifconfig wlan0 up in
> the tty, a dmesg message appears declaring 'Link not ready' or something to
> that effect- and then it goes on working just fine. Does anyone else see this
> happening?
> 
> After I investigated, your second point sent shivers of spooky down my spleen.
> The contents of /etc/network/interfaces are as follows:
> 
> -------------------------------------------------------------------------------
> # This file describes the network interfaces available on your system
> # and how to activate them. For more information, see interfaces(5).
> 
> source /etc/network/interfaces.d/*
> 
> # The loopback network interface
> auto lo
> iface lo inet loopback
> -------------------------------------------------------------------------------
> 
> Neither eth nor wlan are there!? You were right when you said they couldn't be
> in /etc/network/interfaces. However, the mystery continues- ifconfig reports
> the following:
> 
> -------------------------------------------------------------------------------
> eth0      Link encap:Ethernet  HWaddr f4:6d:04:89:e3:01  
>           UP BROADCAST MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000 
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
> 
> lo        Link encap:Local Loopback  
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           inet6 addr: ::1/128 Scope:Host
>           UP LOOPBACK RUNNING  MTU:65536  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0 
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
> 
> wlan0     Link encap:Ethernet  HWaddr e0:b9:a5:22:b9:43  
>           inet addr:192.168.1.109  Bcast:192.168.1.255  Mask:255.255.255.0
>           inet6 addr: fe80::e2b9:a5ff:fe22:b943/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:6373 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:2862 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000 
>           RX bytes:4755201 (4.5 MiB)  TX bytes:400106 (390.7 KiB)
> ------------------------------------------------------------------------------

At a guess (which I dislike doing) you have network manager (or some
other wireless package) installed.

> lo, wlan0, and eth0 are all there! I am but a humble luser, and have no idea
> what is going on.
> 
> > > I boot with a netinstall USB, select my wireless interface for the
> > > installation, and networking just works after I've rebooted. Both eth0,
> > > wlan0, and lo appear in my ifconfig list. The firmware is correctly
> > > installed and everything works. All that remains is to put wlan0 up,
> > > connect to my router with wpa_supplicant, and get an IP with dhclient.
> > > After that, I'm good to go.

But you cannot be good to go. You have no connectivity; networking
doesn't "just work. You had to have done something to make it work. You
said as much earlier on.
 
> > I'd better say why I am bothered.
> > 
> > D-I sets up networking with netcfg. The file
> > 
> >   /usr/lib/finish-install.d/55netcfg-copy-config
> > 
> > in the package has
> > 
> >   # Check for preseeding. If the value of the question is empty then set
> >   # default options. Document automatic selection changes in the template.
> >   if [ -z "$RET" ]; then
> >           if $NM_IS_INSTALLED; then
> >                  db_set netcfg/target_network_config $CONFIG_NM
> >           else
> >                  if [ "$NETCFG_CONNECTION_TYPE" = "wired" ]; then
> >                          db_set netcfg/target_network_config
> > $CONFIG_INTERFACES else # wireless
> >                          db_set netcfg/target_network_config $CONFIG_LOOPBACK
> >                  fi
> >           fi
> > fi
> > 
> > If NM is not installed (which is what would happen with no tasks) and no
> > wired install the only stanza written to /e/n/i at the end of the
> > install is a loopback one. That is, metworking is not there after first
> > boot.
> 
> My installation appears to have thus defied the laws of physics, Debian
> installation, and bash scripting.
> 
> I installed a completely minimal setup with no tasks selected, using wlan0 as
> my installation network interface. Lo and behold, upon boot everything works as
> described.
> 
> Can someone else try installing like I did and see if the same occurs?

We'll see. 


Reply to: