Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installed with no internet connection [SOLVED]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
hangglide
n00b
n00b


Joined: 01 Jun 2006
Posts: 17

PostPosted: Thu Jun 01, 2006 2:41 am    Post subject: Installed with no internet connection [SOLVED] Reply with quote

I am a new linux user. I am trying to switch from Windows. So far I have:

- Made a liveCD
- Run the install program (lots of times and it didn't work).
- Delete windows from my system.
- Finally I did a "GRP/networkless install" (it took over 36 hours!) and now I have a working system (almost).
- I am guessing that because I installed from a CD gentoo didn't think that I have an internet connection but I do. I have broadband.

So my question is can I get the internet working without having to go through that horrible install process again?

I didn't think it would be a problem because this page says:
Quote:
you are free to set your own USE flags in /etc/make.conf after you have rebooted into your finished system.


I am not really sure what that means but it was enough to make me feel like I could add stuff (like internet) after I had the operating system installed.

I hope some of you experts can guide me in the right direction.

Thanks.


Last edited by hangglide on Mon Jun 12, 2006 5:30 pm; edited 2 times in total
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Thu Jun 01, 2006 2:46 am    Post subject: Reply with quote

Quote:
So my question is can I get the internet working without having to go through that horrible install process again?


Try running dhcpcd and see if you get an ipaddress. You can check that with ifconfig.

Quote:
I am not really sure what that means but it was enough to make me feel like I could add stuff (like internet) after I had the operating system installed.


Absolutely. You install one time and never use the install cd again (unless you break something really bad!) After you have a booting system that has a working network all installs / upgrades are done via the internet and the emerge command...
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
hangglide
n00b
n00b


Joined: 01 Jun 2006
Posts: 17

PostPosted: Thu Jun 01, 2006 3:04 am    Post subject: Reply with quote

Quote:
Try running dhcpcd and see if you get an ipaddress. You can check that with ifconfig.


I tried typing both "dhcpcd" and "ifconfig" at a command prompt. It said "command unknown" or something like that (from memory). I am not sure if that is what you had in mind. Is there another way to run dhcpcd?
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Thu Jun 01, 2006 3:13 am    Post subject: Reply with quote

I was tring to see a starting point on what you had installed. If niether of these work you really have no networking installed and need to boot off the install cd and emerge dhcpcd which should pull in networking. I could tell you the manual (pre gentoo installer) way to accomplish this but possibly some people more familiar witrh the new installation method may show you a much simpler way. If you really want I could post my instructions though...
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
hangglide
n00b
n00b


Joined: 01 Jun 2006
Posts: 17

PostPosted: Thu Jun 01, 2006 3:24 am    Post subject: Reply with quote

Quote:
If you really want I could post my instructions though...


I am happy to read the instructions (manual) or learn from your instructions. I am finding I am learning a lot from making mistakes. :-) If installation went smooth maybe I would not learn as much.

If you could direct me to the appropriate manual (or your instructions) for emerging from a live CD to my hda that would be fine. Just keep in mind that my past experience is with windows so linux commands are a little alien to me. I can follow instructions though. :-)

Note: When I boot from LiveCD the internet works fine. When I boot from hda I get nothing.
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Thu Jun 01, 2006 3:24 am    Post subject: Reply with quote

Here goes:

boot off the install cd with the following command at the isolinux prompt

Code:
gentoo nox


Then after it finishes booting you should be at the livecd prompt.

Now try running ifconfig and see if you have an ipaddress. If so you can continue if not please write back...

At the livecd prompt mount your root folder to /mnt/gentoo. This should be something like:

Code:
mount /dev/sda2 /mnt/gentoo


This assumes your / was installed on /dev/sda2

Then if this succeeds run the following command

Code:
mount -t proc none /mnt/gentoo/proc


Then you can mount your root of your installed system...

Code:
chroot /mnt/gentoo /bin/bash


Now you are running inside your installed system and if all goes well the following command should work:

Code:
emerge dhcpcd


If this succeeds

type exit at the prompt and hit enter

then type reboot at the prompt and hit enter.

Remove the cd before it starts back up...
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Thu Jun 01, 2006 3:26 am    Post subject: Reply with quote

Quote:
If installation went smooth maybe I would not learn as much.


EXACTLY ! :D

This is the best way you will learn gentoo...
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
hangglide
n00b
n00b


Joined: 01 Jun 2006
Posts: 17

PostPosted: Thu Jun 01, 2006 4:11 am    Post subject: Reply with quote

Thanks for those instructions. I followed them but when I got to:

Code:
mount /dev/sda2 /mnt/gentoo


The computer didnt like it. I guess my hda is different than "sda2"

This is what I used instead:

Code:
mount /dev/hda3 /mnt/gentoo


After that everything worked fine.

I typed "emerge dhcpcd" and the computer did a lot of things that looked like an installation. :-)

BTW ifconfig gave an ip address too.

I typed exit and it went back to a prompt. I couldnt figure out how to get it to shutdown the computer so I just turned it off (after typing "exit" a couple of times).

When I reboot from hda I still have no internet. Ifconfig now gives nothing. Did I miss something?
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Thu Jun 01, 2006 4:11 am    Post subject: Reply with quote

Hi.

hangglide wrote:
Quote:
Try running dhcpcd and see if you get an ipaddress. You can check that with ifconfig.

I tried typing both "dhcpcd" and "ifconfig" at a command prompt. It said "command unknown" or something like that (from memory). I am not sure if that is what you had in mind. Is there another way to run dhcpcd?

That probably means that you forgot to su to root. You should start by doing inside a terminal on gnome
Code:
# sudo su -

_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
hangglide
n00b
n00b


Joined: 01 Jun 2006
Posts: 17

PostPosted: Thu Jun 01, 2006 4:20 am    Post subject: Reply with quote

Thanks jmbsvicetto

I did ifconfig after typing su - and root password.

Now my machine can see "lo" but not "eth0" and "eth1." When I boot from liveCD the machine can see all three.
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Thu Jun 01, 2006 4:25 am    Post subject: Reply with quote

Try using ifconfig -a. If your nics aren't configured, they should still appear.
If that doesn't show your nics, that means that you didn't loaded the drivers or didn't built them on your kernel. Post the output of the following:
Code:
# lspci
# lsmod

_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
hangglide
n00b
n00b


Joined: 01 Jun 2006
Posts: 17

PostPosted: Thu Jun 01, 2006 4:44 am    Post subject: Reply with quote

When I do "ifconfig -a" I can see all three again:
eth0
eth1
lo

There is no IP though.

I ran lspci and the output was large so I can't retype it all.

it found two ethernet controllers though.
3com coorporation 3c905b 100 BaseTX [cyclone] (rev 30)
Linksys 100 networking everywhere fast ethernet 10/100 (rev 11)

I didnt write down the other stuff.

I also ran lsmod. That list was way too long for me to transcribe. Is there something particular I should be looking for? I can tell you if it is there.
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Thu Jun 01, 2006 4:54 am    Post subject: Reply with quote

The output from lspci and lsmod was only relevant in case ifconfig -a didn't show your nics. Since it does, that output doesn't matter. You've got support in the kernel for your nics, now you just need to configure them.
Do you want to use dhcp or do you use static ips? Look at /etc/conf.d/net.example for having an idea of how to create /etc/conf.d/net. If you want to use dhcp, don't forget to emerge a dhcp client: dhcp, dhcpcd, pump, dhclient are just a few of the available ones.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
hangglide
n00b
n00b


Joined: 01 Jun 2006
Posts: 17

PostPosted: Thu Jun 01, 2006 12:24 pm    Post subject: Reply with quote

I use dhcp.

I think I already emerged dhcpcd (see above).

From your reply it looks like I have to create /etc/conf.d/net. I will look into this when I get home (I am at work now).

Thanks for your help and suggestions.
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Thu Jun 01, 2006 2:31 pm    Post subject: Reply with quote

Quote:
When I reboot from hda I still have no internet. Ifconfig now gives nothing. Did I miss something?



No I wanted to get you to a point where I could give you the next steps...

Try running dhcpcd as root (sorry I did not think of this the first time) in the system. If that gives you an ipaddress you need to run the following command

Code:
rc-update add net.eth0 default


This should start the network on the next boot.

I see you said you had lo eth0 and eth1. If eth1 was the one with the ipaddress then you need to do this instead:

Code:
rc-update add net.eth1 default

_________________
John

My gentoo overlay
Instructons for overlay


Last edited by drescherjm on Thu Jun 01, 2006 2:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Thu Jun 01, 2006 2:35 pm    Post subject: Reply with quote

hangglide wrote:
Thanks for those instructions. I followed them but when I got to:

Code:
mount /dev/sda2 /mnt/gentoo


The computer didnt like it. I guess my hda is different than "sda2"


I was just guessing. As a fresh install on a new pc with sata will most likely put root on /dev/sda2 ...

Quote:

This is what I used instead:

Code:
mount /dev/hda3 /mnt/gentoo


After that everything worked fine.



Remember this proceedure! As anytime you can not get the system to boot or the networking does not work all the steps before the emerge dhcpcd command should be followed...
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Thu Jun 01, 2006 2:39 pm    Post subject: Reply with quote

Quote:
From your reply it looks like I have to create /etc/conf.d/net.


If you use dhcpcd you can get away without editing the default config. Here is my file on my new amd64 gentoo box:

Code:
jmd1 ~ # cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
jmd1 ~ #   

_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
rizzurant
Tux's lil' helper
Tux's lil' helper


Joined: 20 Feb 2006
Posts: 83
Location: Indonesia

PostPosted: Thu Jun 01, 2006 3:28 pm    Post subject: Reply with quote

dont forget to use

dhcpcd <yourinterface>
dhcpcd eth0 or
dhcpcd eth1

in mine, its work faster to get IP from the server using dhcpcd <interface>
i dont know why ??
Back to top
View user's profile Send private message
hangglide
n00b
n00b


Joined: 01 Jun 2006
Posts: 17

PostPosted: Thu Jun 01, 2006 3:32 pm    Post subject: Reply with quote

Quote:
dont forget to use

dhcpcd <yourinterface>
dhcpcd eth0


Sorry for the easy question but what is my <interface>? Where could I look that up?
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Thu Jun 01, 2006 3:40 pm    Post subject: Reply with quote

You can try either eth0 or eth1 it depends on what connector your have your cable plugged into. With that said I have never needed to specify this as dhcpcd usually did the right thing for me... Maybe it defaults to eth0... Not sure but I have done this quite a few times. As I have installed > 20 gentoo boxes at work and 5 at home (no I don't have all 5 running now only the fastest 2 of them)...
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
hangglide
n00b
n00b


Joined: 01 Jun 2006
Posts: 17

PostPosted: Fri Jun 02, 2006 1:19 am    Post subject: Reply with quote

Thanks for the help guys.

I tried
Code:
dhcpcd eth0
dhcpcd eht1
and dhcpcd


None of these commands did anything at all. I didn't even get a prompt. Nothing.
If I press enter then I get my prompt back.

I tried
Code:
rc-update add net.eth0 default

anyway.

On the next boot it said "starting eth0" but hung there for a long time. Then it said "problem starting service" (or something like that.. it was very fast).

(I am 99 percent sure that the netork is plugged into eth0 because that is where it is when I boot from livecd).

Still no internet.
Back to top
View user's profile Send private message
hangglide
n00b
n00b


Joined: 01 Jun 2006
Posts: 17

PostPosted: Fri Jun 02, 2006 1:22 am    Post subject: Reply with quote

Quote:
Look at /etc/conf.d/net.example for having an idea of how to create /etc/conf.d/net.


Also, I looked at /etc/conf.d/net.example. It said that if I was using dhcp I should not change anything.
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Fri Jun 02, 2006 1:53 am    Post subject: Reply with quote

hangglide wrote:
I tried
Code:
dhcpcd eth0
dhcpcd eht1
and dhcpcd

None of these commands did anything at all. I didn't even get a prompt. Nothing.

Those commands just make dhcpcd run and attach to the nic. They don't provide feedback. After you run dhcpcd on a nic, run ifconfig -a to check if you got an IP :wink:
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
hangglide
n00b
n00b


Joined: 01 Jun 2006
Posts: 17

PostPosted: Fri Jun 02, 2006 2:14 am    Post subject: Reply with quote

Thanks jmbsvicetto.

I just tried running dhcpcd then ifconfig -a.

ifconfig -a can see the nic devices but none have an IP.

It is puzzling for me as the internet works great from the liveCD.
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3065
Location: Korea

PostPosted: Fri Jun 02, 2006 2:16 am    Post subject: Reply with quote

hangglide wrote:
(I am 99 percent sure that the netork is plugged into eth0 because that is where it is when I boot from livecd).


What the livecd says isn't set in stone.

I've had install cds have my net at /dev/eth2 and then when I boot into the actual install it was /dev/eth0

Try it on both eth0 and eth1.
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
Goto page 1, 2  Next
Page 1 of 2

 
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