# [SOLVED] How to run the wireless from LiveCD?

## ONEEYEMAN

Hi, ALL,

I have a laptop that at the moment can run only from LiveCD.

In order to troubleshoot the issue I am trying to run the wireless network. And so I tried:

```

cd /etc/init.d

ln -s net.lo net.enp9s0

wpa_supplicant -c/etc/wpa_supplicant/spa_supplicant.conf -ienp9s0 -d

```

The output is:

```

wpa_supplicant v2.4

random: Trying to read entropy from /dev/random

Successfully initialized wpa_supplicant

Initializing interface 'enp9s0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'

Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'

Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'

ctrl_interface='DIR=/var/run/wpa_supplicant GROUP=wheel'

crl_interface_group='0'

ap_scan=1

Priority group 5

    id=0 ssid='IgorNetwork'

nl80211: Could not add multicast membership for vendor events: -2 (No such file or directory)

nl80211: Driver does not support authntication/association or connect commands

nl80211: deinit ifname=enp9s0 disabled_11b_rates=0

nl80211: Remove monitor interface: refcount=0

netlink: Operstate: ifindex=2 linkmode=0 (kernel-control), operastate=6 (IF_OPER_UP)

nl80211: Set mode 2 iftype 2 (STATION)

nl80211: Failed to set interface 2 to mode 2: -19 (No such device)

enp9s0: Failed to initialize driver interface

Failed to add interface enp9s0

enp9s0: Cancelling scan request

enp9s0: Cancelling authentication timeout

```

What am I missing?

I'm trying to use the generic interface driver, so that it wouldn't fail.

Thank you.Last edited by ONEEYEMAN on Fri Jul 10, 2015 4:29 am; edited 1 time in total

----------

## charles17

 *ONEEYEMAN wrote:*   

> Hi, ALL,
> 
> I have a laptop that at the moment can run only from LiveCD.
> 
> In order to troubleshoot the issue I am trying to run the wireless network. And so I tried:

 See https://wiki.gentoo.org/wiki/Wifi#Gentoo_Install_via_WIFI

----------

## ONEEYEMAN

charles17,

What I'm trying to do is boot from LiveCD, chroot into the install and run wpa_supplicant.

Everything is already installed.

Thank you.

----------

## charles17

 *ONEEYEMAN wrote:*   

> I'm trying to use the generic interface driver, so that it wouldn't fail.

 What if you tried with -Dnl80211 instead, which is actually the default for recent versions wpa_supplicant?

Also, I am confused by the crl_interface_group='0'  in your output. Is it from your config file?

----------

## ONEEYEMAN

charles17,

I got exactly same output.

Yes, that line is in my config file.

But I'm more interested in:

```

nl80211: Could not add multicast membership for vendor events: -2 (No such file or directory)

```

as this error shows when I try to boot from the hard-drive.

Thank you.

----------

## charles17

 *ONEEYEMAN wrote:*   

> Yes, that line is in my config file.

 Delete that line and try with the default set up as recommended.

 *ONEEYEMAN wrote:*   

> But I'm more interested in:
> 
> ```
> 
> nl80211: Could not add multicast membership for vendor events: -2 (No such file or directory)
> ...

 

Checking dmesg could be of help:

```
$ dmesg | grep -i 'enp9s0\|80211'
```

----------

## NeddySeagoon

ONEEYEMAN,

The Gentoo minimal liveCD has very limited wireless support.

Use System Rescue CD

It is Gentoo based, has much better WiFi support and an optional GUI.

----------

## dr_vic

ONEEYEMAN, 

You can try somehting like:

# ifconfig -a

# ip link set wlp4s0 up

# wpa_supplicant -B -i wlp4s0 -c <(wpa_passphrase "your_ssid" "your_password")

# dhcpcd wlp4s0 

# ping -c 3 gentoo.org

----------

## ONEEYEMAN

charles17,

Here is my dmesg when I boot from the harddrive.

I don't see any error messages coming from the wireless card...

Let me try without that line. I will let you know.

Thank you.

[EDIT]

I took that line off and tried. I got the same error message.

[/EDIT]

----------

## charles17

 *ONEEYEMAN wrote:*   

> Here is my dmesg when I boot from the harddrive.

 

So why at all did you put enp9s0  as from your OP?  I cannot see any reason why you chose that network interface name.

As already proposed by dr_vic, please post your output of ifconfig -a.

----------

## ONEEYEMAN

charles17,

This is my issue at hand.

When I try to boot the machine from the HDD it hangs right before asking for a login name. (See this thread). And so what I tried to do is to boot from the LiveCD, chroot and investigate. Apparently when booted from the LiveCD, chrooting and trying to run wpa_supplicant in order to investigate and post the log files over the wireless connection I see that wpa_supplicant gives the same error as in HDD boot and then gives even more errors after that. Google unfortunately does not produce anything to fix the error I see about the multicast.

Unfortunately it looks like running wpa_supplicant from the LiveCD is not an option as pointed out by NeddySeagoon.

So now what are my options?

I can probably burn the RescueCD as NeddySeagoon suggested, but in this case I will probably have to run wpa_supplicant from the CD itself. Besides I'm not too familiar with the LiveCD.

Or I can stay connected on the wire until the HDD boot issue is resolved.

Any option #3?

Or maybe you know what this error about the adding multicast is about and how to fix it?

Thank you.

----------

## dr_vic

Boot from LiveCD, do not chroot and  post your output of "ifconfig -a".

----------

## ONEEYEMAN

dr_vic,

Here it is:

```

enp9s0:  flags=4099<UP,BROADCAST,MULTICAST>   mtu 1500

              ether 00:25:64:43:08:8f  txqueuelen 1000 (Ethernet)

              RX packets 0    bytes 0 (0.0 B)

              RX errors   0     dropped 0 overruns 0 frame 0

              TX packets 0    bytes 0 (0.0 B)

              TX errors   0     dropped 0 overruns 0 carrier 0 collisions

lo:  flags=73<UP,LOOPBACK,RUNNING>   mtu 65536

              inet  127.0.0.1   netmask  255.0.0.0

              inet6  ::1   prefixlen  128   scopeid  0x10<host>

              loop  txqueuelen 0 (Local Loopback)

              RX packets 2    bytes 140 (140.0 B)

              RX errors   0     dropped 0 overruns 0 frame 0

              TX packets 2    bytes 140 (0.0 B)

              TX errors   0     dropped 0 overruns 0 carrier 0 collisions

```

Thank you.

----------

## dr_vic

Please  post your output of lspci.

----------

## ONEEYEMAN

dr_vic,

Available here.

Thank you.

----------

## NeddySeagoon

ONEEYEMAN,

enp9s0 is your wired interface. Your WiFi is not listed.

Boot the liveCD, mount your partitions but do not chroot.

Look at /mnt/gentoo/etc/rc.conf.

Check the following - commented out is ok. 

```
rc_parallel="NO"

rc_interactive="YES"
```

Fix the settings if needed.  These are the defaults.  

Reboot normally.  When you see the message about OpenRC starting Gentoo ... press the "i" key.

This takes you into "Interactive" boot mode, where you can choose to start individual services.

The first time through, say Y to all services and see which one causes the hang.

Next time say N to that one. If you get to the prompt, you know where to look.

None of this applies to systemd.

----------

## ONEEYEMAN

NeddySeagoon,

I verified the file and those lines are just commented out.

Now, trying to reboot, I don't see a prompt for pressing "I" to get to the interactive reboot.

Therefore pressing "i" or "I" does not do anything.

Thank you.

----------

## NeddySeagoon

ONEEYEMAN,

Bummer.  The comments in the file are incorrect.

Set 

```
rc_parallel="NO"

rc_interactive="YES"
```

explicitly in /etc/rc.conf

I'm not sure I ever got a prompt but it works for me now.

----------

## ONEEYEMAN

NeddySeagoon,

I modified the file as you suggested and kept rebooting.

Unfortunately as it stands every single process starts without any issues.

Meaning that the system hangs even if nothing is started - just the kernel.

```

/proc is already mounted

Mounting /run

/run/openrc: creating directory

/run/lock: creating directory

/run/lock: correcting owner

Caching service dependencies...

About to start service devfs

1) Start the service           2) Skip the service

3) Continue boot process   4) Exit to shell

-------KEEP PRESSING 2 TO SKIP THE SERVICE-------

This is (none).

```

So what do I do next? Did Samba screw up my kernel?

Now I'm able to press 4 on that first prompt and get to the maintenance mode by providing the root password.

Thank you.

----------

## dr_vic

Does "lsmod | grep b43" show that b43 is loaded?  If not try "modprobe b43" then rerun the ifconfig -a.

----------

## NeddySeagoon

ONEEYEMAN,

From the bootCD, run 

```
fsck -f /dev/...
```

 whatever your root is.

If root has an error, it will stay read only ond lots of things will fail to start.  Worse, there will be no logs.

I don't think samba has damaged anything, its more likely that this is a coincidence.

After rootfsck runs, root should be mounted read/write and you can usefully get into the shell to look around.

From your 

```
This is (none).
```

it appears that the hostname service never runs, which is in the boot runlevel.

What do you have in /etc/runlevels/ ?

Post the output of 

```
ls -Rl /etc/runlevels/
```

please.

Each runlevel is a list of symbolic links. If any of the links are not pale bule, that indicates a problem

----------

## ONEEYEMAN

NeddySeagoon,

This what I did:

Boot from LiveCD, then run:

```

mount /dev/sda4 /mnt/gentoo

mount /dev/sda2 /mnt/gentoo/boot

mount -t proc proc /mnt/gentoo/proc

mount --rbind /dev /mnt/gentoo/dev

mount --rbind /sys /mnt/gentoo/sys

fsck -f /dev

```

and this is what I got:

```

fsck from util-linux 2.24.1

e2fsck 1.42.7 (21-Jan-2013)

/dev is mounted.

WARNING!!!!   The filesystem is mounted.    If you continue you ****WILL****

cause ***SEVERE**** filesystem damage.

Do you really want to continue<n>?

```

at which point I just answered "n".

So how do I run this?

Maybe I don't need to mount those partitions?

Thank you.

----------

## NeddySeagoon

ONEEYEMAN,

Correct. You do not fsck a mounted filesystem. 

```
fsck -f /dev/sda4
```

while sda4 is not mounted.

----------

## ONEEYEMAN

NeddySeagoon,

```

[color=red]livecd[/color] [color=blue]~#[/color] fsck -f /dev/sda4

fsck from util-linux 2.24.1

e2fsck 1.42.7 (21-Jan-2013)

Pass 1: Checking inodes, blocks and sizes

Pass 2: Checking directory structure

Pass 3: Checking directory connectivity

Pass 4: Checking reference counts

Pass 5: Checking group summary  information

/dev/sda4:  722805/15876096 files (0.1% non-contiguos), 23710490/63488000 blocks

```

There is no errors during the fsck run...

Thank you.

----------

## ONEEYEMAN

 *ONEEYEMAN wrote:*   

> 
> 
> NeddySeagoon,
> 
> ```
> ...

 

[EDIT]

I see that my update brought in the newer kernel version. Maybe this is all I need?

[/EDIT]

----------

## NeddySeagoon

ONEEYEMAN,

That rules that out then.

Check that you hawe a /dev/shm

Check that  /tmp is. mounted as drwxrwxrwt - notice the t

Boot into your read only system and use wgetpaste to post dmesg and /etc/fstab

If wgetpaste needs some write space, run 

```
mount -o rw,remount /
```

 and try again.

----------

## ONEEYEMAN

NeddySeagoon,

Following:

```

mount /dev/sda4 /mnt/gentoo

ls -la /mnt/gentoo/dev | grep shm

```

does not produce anything when booted from LiveCD.

So how do I fix it? Is this a symlink to something?

Thank you.

----------

## NeddySeagoon

ONEEYEMAN,

/dev is managed by a mix of DEVTMPFS in the kernel and udev.  Its not a real filesystem.

You need to do the test when you are booted into your own system.

----------

## ONEEYEMAN

NeddySeagoon,

I guess what I can do is to boot from the hard drive in the interactive mode and right before starting "locals" exit to the shell and do the checks.

WIll it be good?

Thank you.

----------

## NeddySeagoon

ONEEYEMAN,

That works.  Anytime after /dev is mounted and udev is started.

----------

## ONEEYEMAN

 *NeddySeagoon wrote:*   

> 
> 
> ONEEYEMAN,
> 
> That rules that out then.
> ...

 

Yes I do.

 *NeddySeagoon wrote:*   

> 
> 
> Check that  /tmp is. mounted as drwxrwxrwt - notice the t
> 
> 

 

Yup, there is a 't' at the end.

 *NeddySeagoon wrote:*   

> 
> 
> Boot into your read only system and use wgetpaste to post dmesg and /etc/fstab
> 
> If wgetpaste needs some write space, run 
> ...

 

I booted from HDD, went to "Interactive" mode, and before starting local went off to the shell.

The dmesg output is here.

An /etc/fstab output is here.

Thank you.

----------

## NeddySeagoon

ONEEYEMAN,

Here is root being mounted read only so that rootfsck can be run.

```
[    9.373236] EXT3-fs (sda4): error: couldn't mount because of unsupported optional features (240)

[    9.373403] EXT2-fs (sda4): error: couldn't mount because of unsupported optional features (240)

[    9.404125] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)
```

later, there is  

```
[   30.740362] EXT4-fs (sda4): re-mounted. Opts: (null)
```

which should be root being mounted read write.

Your fstab looks good and there are no errors in dmesg.

Both your WiFi and Wired ethernet interfaces are starting too.

----------

## ONEEYEMAN

NeddySeagoon,

How do I fix it Is this something known?

----------

## NeddySeagoon

ONEEYEMAN,

I'm out of ideas ... almost.

Please post the output of 

```
ls -Rl /etc/runlevels/
```

from your own install.

Drop to the shell before the local service starts.

This is a list of symbolic links. They should all be pale blue.

Tell about any links that are not pale blue as that indicates a problem.

----------

## ONEEYEMAN

 *NeddySeagoon wrote:*   

> 
> 
> ONEEYEMAN,
> 
> I'm out of ideas ... almost.
> ...

 

Output is here.

But I was actually referring to those error messages from dmesg...

Thank you.

----------

## NeddySeagoon

ONEEYEMAN,

Those error messages in dmesg are harmless. Its the kernel trying ext3, ext2 and finally ext4 to mount root.

Until root is mounted, the kernel cannot read /etc/fstab to discover what fs is on root, so it tries all the filesystems it knows.

If you add 

```
rootfs=ext4
```

to the kernel lines in your bootloader configuration file, the kernel will try ext4 first and the messages will vanish.

Why do you have 

```
 lrwxrwxrwx 1 root root 20 May 29  2014 netmount -> /etc/init.d/netmount
```

in your default runlevel?

Its used for mounting remote filesystems over NFS.  From your /etc/fstab, you don't use that.  It should be harmless but you could remove it from the runlevel.

What colour is 

```
lrwxrwxrwx 1 root root 22 May 29  2014 udev-mount -> /etc/init.d/udev-mount
```

Its not needed in recent udev.

If its not pale blue remove it.  Mine is white text on a red background, which indicates the link is broken.

Depending on your udev version and a few other things, you may need

```
lrwxrwxrwx 1 root root 24 Jun 27 08:36 udev-trigger -> /etc/init.d/udev-trigger
```

in the sysinit runlevel.

If you don't have /etc/init.d/udev-trigger, you don't need it, your udev is not new enough.

Is your system time correct?  

I see you do not run ntpd to get time from the internet. If time goes backwards, such as if you were to have a flat BIOS battery, odd things happen.

----------

## ONEEYEMAN

 *NeddySeagoon wrote:*   

> 
> 
> ONEEYEMAN,
> 
> Those error messages in dmesg are harmless. Its the kernel trying ext3, ext2 and finally ext4 to mount root.
> ...

 

Well, it says "error", and error is not good.  :Wink: 

 *NeddySeagoon wrote:*   

> 
> 
> Why do you have 
> 
> ```
> ...

 

That's probably samba addition. I can remove it for now.

 *NeddySeagoon wrote:*   

> 
> 
> What colour is 
> 
> ```
> ...

 

No, it is not and my udev version is 216. I will remove it.

 *NeddySeagoon wrote:*   

> 
> 
> Depending on your udev version and a few other things, you may need
> 
> ```
> ...

 

The version is 216. Do I need it?

 *NeddySeagoon wrote:*   

> 
> 
> Is your system time correct?  
> 
> I see you do not run ntpd to get time from the internet. If time goes backwards, such as if you were to have a flat BIOS battery, odd things happen.
> ...

 

Let me confirm..

Thank you.

----------

## NeddySeagoon

ONEEYEMAN,

You may need udev-trigger in the sysinit runlevel.  I have it with udev-215-r1

Its harmless to test.

----------

## ONEEYEMAN

NeddySeagoon,

So, in the /etc/default/grub file I change the line to read:

```

GRUB_CMDLINE_LINUX="net.ifnames=0 rootfs=ext4"

```

or I need a semi-colon as a separator?

Then re-run:

```

grub2-mkconfig -o /boot/grub/grub.cfg

```

to get rid of those errors.

Am I right?

Thank you.

----------

## ONEEYEMAN

NeddySeagoon,

Surprisingly enough, after I added:

```

;rootfs=ext4

```

to the grub configuration file, rebuild the grub configuration with grub2-mkconfig and rebooted I was able to get to the login prompt.

And now I have a working system!!!

Problem is - I don't have slightest idea what fixed it and what broke it.  :Wink: 

Thank you.

----------

