Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lost network connectivity after chrooting[Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
c0der935
n00b
n00b


Joined: 23 Aug 2013
Posts: 17
Location: Auckland,NewZealand

PostPosted: Sat Aug 24, 2013 10:12 am    Post subject: lost network connectivity after chrooting[Solved] Reply with quote

I got my wireless working using the net-setup command. I then got the tarball, portage etc...
I followed the guide and copied the /etc/resolv.conf file to /mnt/gentoo/etc/.
I then chrooted into the new environment and lost connectivity.

The contents of resolv.conf are:
Code:
#Generated by dhcpcd from wlp0s18f2u6
# /etc/resolv.conf.head can replace this line
nameserver 192.168.0.1
# /etc/resolv.conf.tail can replace this line



relevant output from ifconfig
Code:

wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
           inet 192.168.0.15 netmask 255.255.255.0 broadcast 192.168.0.255
           ether 84:c9:b2:73:5a:3d 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 0


I do not know why the interface changed from wlp0s18f2u6(really weird) to wlan0(normal) but it was working as wlp0s18f2u6 in livecd mode.
The wireless network uses WEP 128bit encryption. My wireless USB adapter is D-link DWA-125.

I would like to know how to restore connectivity without restarting the installation process, as it is quite long. In the chrooted environment I do not have access to the net-setup/iwconfig commands I used to configure the network in the first place.

If I have stupidly forgot to include some information do not hesitate to let me know.

Any help on how to reconnect or to get access to the net-setup/iwconfig commands would be greatly appreciated.
_________________
Windows is great - I used it to download Linux


Last edited by c0der935 on Sun Aug 25, 2013 7:55 am; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13867

PostPosted: Sat Aug 24, 2013 2:55 pm    Post subject: Reply with quote

You do not need to restart the installation process in full, even if you have turned off the machine since when you posted. Steps which change machine state (making partitions, making filesystems, unpacking tarballs, etc.) persist as long as the machine's storage persists. Steps which change your operating environment (chroot, exporting variables, hand configuring the network) will need to be repeated, but those are quick to run. You will spend more time retyping the command than it will spend running. On many installation environments, you can have one shell in a chroot working with the staged Gentoo image and a separate shell outside the chroot for access to any host tools you may need.

It is very weird that the interface name changed when you used chroot. Do you mean that you ran ifconfig -a, saw the udev-renamed interface, ran chroot /mnt/gentoo, ran ifconfig -a inside the chroot, and saw the canonical wlan0?

Could you elaborate on why you think you lost connectivity? Many people who report a connectivity loss are actually affected by some other problem, such as misconfigured DNS. It looks like that is not your problem, but if you provide the specific error messages, we may be able to identify what happened.
Back to top
View user's profile Send private message
c0der935
n00b
n00b


Joined: 23 Aug 2013
Posts: 17
Location: Auckland,NewZealand

PostPosted: Sat Aug 24, 2013 7:04 pm    Post subject: Reply with quote

The interface started as wlp..... then when I came back later I noticed it had changed to wlan0 the change in the network interface, I don't think had anything to do with chrooting. However chrooting made me lose connectivity.

I don't know what error messages would be helpful but this is what happens when I try to ping google.
Code:
ping: unknown host www.google.com


If I started the installation process again what would I need to do to ensure this doesn't happen again.

Thank-you for your time
_________________
Windows is great - I used it to download Linux
Back to top
View user's profile Send private message
hika
Apprentice
Apprentice


Joined: 13 Mar 2009
Posts: 234
Location: Utrecht

PostPosted: Sat Aug 24, 2013 7:46 pm    Post subject: Reply with quote

First go to another terminal with F1 - F6 (the present is F1) and check out there your network outside the chroot environment.
If it works there you probably forgot to copy your resolv.conf to the chrooted environment.
If you mounted your new install on /mnt/gentoo, then do
Code:
cp /etc/resolv.conf /mnt/gentoo/etc

and go back to F1
It probably will work then.

Hika
Back to top
View user's profile Send private message
c0der935
n00b
n00b


Joined: 23 Aug 2013
Posts: 17
Location: Auckland,NewZealand

PostPosted: Sun Aug 25, 2013 7:55 am    Post subject: Reply with quote

Thank you so much Hika, Worked perfectly.
The problem in the original setup was the incorrect name of the wireless network interface in /etc/resolv.conf.
_________________
Windows is great - I used it to download Linux
Back to top
View user's profile Send private message
hika
Apprentice
Apprentice


Joined: 13 Mar 2009
Posts: 234
Location: Utrecht

PostPosted: Sun Aug 25, 2013 1:51 pm    Post subject: Reply with quote

Still stands the weird renaming of your interface from modern to legacy. The older isos use the old naming, but I asume you have a fresh one.
If you search in here udev and networknames you'll find some info on those changed network naming with the latest udev and how to chose one or the other.

Hika
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum