View previous topic :: View next topic |
Author |
Message |
chris_andrew Apprentice


Joined: 19 Sep 2004 Posts: 291 Location: Wiltshire, UK
|
Posted: Mon Feb 28, 2005 2:18 pm Post subject: After install, can't get networking in order to do emerg syn |
|
|
Hi, all.
At last, i've just managed to install Gentoo on my UltraSparc
When I booted, I got a couple of error messages, but nothing that can't be ironed out.
Unfortunately one of them was to do with networking, so I can't do emerge sync, etc.
eth0 should be set to DHCP, as my computer goes through a router to my ISP.
When I do ifconfig, only my loopback is indicated.
The error on boot is:
Bringing eth0 up via dhcp /sbin/rc : line 109: /sbin/dhcpd no such file or directory.
I would scp my /etc/conf.d/net, so that I could post it, but as I say, the networking is down on the Sun box.
In the /etc/conf.d/net file, all is #'ed out apart from:
iface_eth0="192.............
and further down in the dhcp bit:
iface_eth0="DHCP"
Can anybody help, i'm just so pleased to get it up and running at last.
Cheers,
Chris. |
|
Back to top |
|
 |
lookinin Guru

Joined: 21 Jan 2005 Posts: 486
|
Posted: Mon Feb 28, 2005 2:23 pm Post subject: Re: After install, can't get networking in order to do emerg |
|
|
chris_andrew wrote: | Bringing eth0 up via dhcp /sbin/rc : line 109: /sbin/dhcpd no such file or directory.[/b] |
Reboot from the livecd, mount your partitions, chroot as you did for the install, emerge dhcpcd
chris_andrew wrote: | iface_eth0="192.............
and further down in the dhcp bit:
iface_eth0="DHCP" |
You'll only need the DHCP line, not both  |
|
Back to top |
|
 |
chris_andrew Apprentice


Joined: 19 Sep 2004 Posts: 291 Location: Wiltshire, UK
|
Posted: Mon Feb 28, 2005 4:37 pm Post subject: |
|
|
Lookinin,
Thanks for your extremely fast reply. I commented out the surplus if_eth0 line. I then made a note of my /etc/fstab, so that I could remount my partitions.
I've now rebooted, and mounted the partitions, when I try the chroot thing, it all goes wrong. Do I need to mount the partitions with /mnt/gentoo..., like in the install? Is there an easier way to check I have dhcp installed, or to install it. I know once this problem is sorted, it should get better, but I'm struggling at the mo, sorry .
Thanks,
Chris. |
|
Back to top |
|
 |
impz n00b


Joined: 24 Feb 2005 Posts: 28 Location: Germany
|
Posted: Mon Feb 28, 2005 5:05 pm Post subject: |
|
|
I guess you wouldn't need to emerge dhcpd, since you are not the server.
Just # out the iface_eth0="192.............. and go with the
iface_eth0="dhcp".
If that doesn't work I'd say you check out the dhcp-IP-range of your router
and set everything manually. But don't forget to tell gentoo your gateway.
# out everything except:
Code: |
iface_eth0="192.xxx.xxx.xxx broadcast 192.xxx.xxx.xxx netmask 255.255.255.0"
# define your IP-address and broadcast-address 255.255.255.0 is usually ok for netmask
gateway="eth0/192.xxx.xxx.xxx" #set router IP (router=gateway)
|
and modify your /etc/resolv.conf for DNS-support
Code: |
#/etc/resolv.conf
nameserver 192.xxx.xxx.xxx #router-IP (only thing that needs to be written in resolv.conf)
|
than do
Code: |
/etc/init.d/net.eth0 start
|
and to start eth0 on boot
Code: |
rc-update add net.eth0 default
|
and your done.
Check out if it works with ifconfig
Hope that helps you.
I did it this way, although my router auomatically defines IP-address for my boxes.
Linux-style  _________________ Risk everything, or gain nothing.
[Geoffrey de Charny] |
|
Back to top |
|
 |
chris_andrew Apprentice


Joined: 19 Sep 2004 Posts: 291 Location: Wiltshire, UK
|
Posted: Mon Feb 28, 2005 5:30 pm Post subject: |
|
|
Impz,
Cheers, just got your reply. My router automatically allocates IP addresses, too. Would I have to set a gateway? My box is just one of four home computers that hangs off a router to the "outside world"
Thanks,
Chris. |
|
Back to top |
|
 |
chris_andrew Apprentice


Joined: 19 Sep 2004 Posts: 291 Location: Wiltshire, UK
|
Posted: Mon Feb 28, 2005 5:46 pm Post subject: |
|
|
Impz,
Thanks for your advice. Unfortunately, I still get exactly the same Line 109 error!! Damn.
Sorry,
Chris. |
|
Back to top |
|
 |
j-m Retired Dev

Joined: 31 Oct 2004 Posts: 975
|
Posted: Mon Feb 28, 2005 5:49 pm Post subject: |
|
|
chris_andrew wrote: |
Unfortunately, I still get exactly the same Line 109 error!! Damn.
|
Did you
 |
|
Back to top |
|
 |
chris_andrew Apprentice


Joined: 19 Sep 2004 Posts: 291 Location: Wiltshire, UK
|
Posted: Mon Feb 28, 2005 5:50 pm Post subject: |
|
|
Box just rebooting, will try that when it comes back-up. I know little about emerge at the moment, but I guess it will fail to download from the net, due to eth0 being down. I'll let you know.... |
|
Back to top |
|
 |
impz n00b


Joined: 24 Feb 2005 Posts: 28 Location: Germany
|
Posted: Mon Feb 28, 2005 5:50 pm Post subject: |
|
|
Glad to help you.
Jup, you have to set the gateway, otherwise your box wouldn't know where to go to find the www
Just make sure you don't double use an IP address.
Set your IP-address to an address the router doesn't allocate to any other computer.
e.g. If
Computer1 has 192.168.1.23
Computer2 has 192.168.1.24
Computer3 has 192.168.1.25
Computer4 has 192.168.1.26
you could set your linux-box's IP-address to any except those four above (e.g. 192.168.1.30). _________________ Risk everything, or gain nothing.
[Geoffrey de Charny] |
|
Back to top |
|
 |
chris_andrew Apprentice


Joined: 19 Sep 2004 Posts: 291 Location: Wiltshire, UK
|
Posted: Mon Feb 28, 2005 5:54 pm Post subject: |
|
|
J-M,
Tried this, with the message:
emerge: There were no ebuilds to satisfy "dhcpd"
Any thoughts?
Thanks,
Chris. |
|
Back to top |
|
 |
impz n00b


Joined: 24 Feb 2005 Posts: 28 Location: Germany
|
Posted: Mon Feb 28, 2005 5:54 pm Post subject: |
|
|
can you tell me the line 109 of your /sbin/rc ?
just do nano -w /sbin/rc , search for the /sbin/dhcpd string and
copy it down.
I'll see what i can do than. _________________ Risk everything, or gain nothing.
[Geoffrey de Charny] |
|
Back to top |
|
 |
j-m Retired Dev

Joined: 31 Oct 2004 Posts: 975
|
Posted: Mon Feb 28, 2005 5:55 pm Post subject: |
|
|
chris_andrew wrote: |
emerge: There were no ebuilds to satisfy "dhcpd"
|
dhcpcd
Code: |
$ qpkg -l dhcpcd
net-misc/dhcpcd-1.3.22_p4-r5 *
CONTENTS:
/etc
/usr
/usr/share
/usr/share/doc
/usr/share/doc/dhcpcd-1.3.22_p4-r5
/usr/share/doc/dhcpcd-1.3.22_p4-r5/README.gz
/usr/share/doc/dhcpcd-1.3.22_p4-r5/NEWS.gz
/usr/share/doc/dhcpcd-1.3.22_p4-r5/AUTHORS.gz
/usr/share/doc/dhcpcd-1.3.22_p4-r5/ChangeLog.gz
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/dhcpcd.8.gz
/sbin
/sbin/dhcpcd
|
So it´s either typo in /sbin/rc, or your own typo, or you don´t have DHCP client installed.
Last edited by j-m on Mon Feb 28, 2005 5:59 pm; edited 1 time in total |
|
Back to top |
|
 |
chris_andrew Apprentice


Joined: 19 Sep 2004 Posts: 291 Location: Wiltshire, UK
|
Posted: Mon Feb 28, 2005 5:59 pm Post subject: |
|
|
Forgive my oversight. My eyes read what they expected, not what you wrote...I'll let you know  |
|
Back to top |
|
 |
impz n00b


Joined: 24 Feb 2005 Posts: 28 Location: Germany
|
Posted: Mon Feb 28, 2005 5:59 pm Post subject: |
|
|
ahhh dhcpcd that makes some things more clear.
I thought it was looking for a dhcp-daemon. But emerge wants a client.....
Well # out the iface_eth0="dhcp". line and do as i suggested it should work, bc
you don't need the dhcpdc then, bc you set ip-address and stuff manually. _________________ Risk everything, or gain nothing.
[Geoffrey de Charny] |
|
Back to top |
|
 |
chris_andrew Apprentice


Joined: 19 Sep 2004 Posts: 291 Location: Wiltshire, UK
|
Posted: Mon Feb 28, 2005 6:01 pm Post subject: |
|
|
Aaaaaghhh!
Temporary failure in resolution. It tries, but can't download. Can I somehow get it from the Live CD that I installed from (painful)? |
|
Back to top |
|
 |
j-m Retired Dev

Joined: 31 Oct 2004 Posts: 975
|
Posted: Mon Feb 28, 2005 6:01 pm Post subject: |
|
|
impz wrote: |
you don't need the dhcpdc then, bc you set ip-address and stuff manually. |
Huh? He does need it
chris_andrew wrote: |
eth0 should be set to DHCP, as my computer goes through a router to my ISP.
|
|
|
Back to top |
|
 |
chris_andrew Apprentice


Joined: 19 Sep 2004 Posts: 291 Location: Wiltshire, UK
|
Posted: Mon Feb 28, 2005 6:33 pm Post subject: |
|
|
Guys,
I have got eth0 to work. Unfortunately, it has the same address as another box on my home network. I'm assuming it didn't get a DHCP address from my router, then.
In my /etc/conf.d/net, the only lines not # out are:
iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"
and
gateway="eth0/192.168.0.1"
Nearly working, but not quite.
Chris |
|
Back to top |
|
 |
j-m Retired Dev

Joined: 31 Oct 2004 Posts: 975
|
Posted: Mon Feb 28, 2005 6:34 pm Post subject: |
|
|
chris_andrew wrote: | Guys,
In my /etc/conf.d/net, the only lines not # out are:
iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"
|
This is wrong! You are not using DHCP at all. You have assigned a static IP address. Please read the docs and examples in that file.  |
|
Back to top |
|
 |
impz n00b


Joined: 24 Feb 2005 Posts: 28 Location: Germany
|
Posted: Mon Feb 28, 2005 6:37 pm Post subject: |
|
|
I have a router that allocates IP-address automatically and I set everything manually.
just # out iface_eth0="dhcp" and i guarantee it will work, bc the computer will not
ask for dhcpcd anymore.
At least it works with my two linux boxes, and i have three windows pcs
running in our household, too.
Quote: |
Temporary failure in resolution
|
this is propably bc you didn't set your router ip in the /etc/resolv.conf
your resolv.conf should look somewhat like this
Code: |
nameserver 192.xxx.xxx.xxx #router-ip (important to resolve urls to ips)
|
your /etc/conf.d/net is set rigth, just try another ip. e.g. 192.168.0.12 _________________ Risk everything, or gain nothing.
[Geoffrey de Charny] |
|
Back to top |
|
 |
impz n00b


Joined: 24 Feb 2005 Posts: 28 Location: Germany
|
Posted: Mon Feb 28, 2005 6:41 pm Post subject: |
|
|
Quote: | This is wrong! You are not using DHCP at all. You have assigned a static IP address. |
That's the point. He can't get an IP from the router, bc he doesn't have the dhcp client installed and
thus cannot get into the www and download the client
To solve this you set static ip addresses....and gateway and stuff. Once you have emerged the dhcpcd
you can change your /etc/conf.d/net again, to retrieve ip adresses from the router.
See my point....
No dhcpcd, no auto-ip-conf over router's dhcp-daemon
--> no inet
Static IP-address
--> inet
(you trick the router into thinking it has allocated you an ip address) _________________ Risk everything, or gain nothing.
[Geoffrey de Charny] |
|
Back to top |
|
 |
j-m Retired Dev

Joined: 31 Oct 2004 Posts: 975
|
Posted: Mon Feb 28, 2005 6:42 pm Post subject: |
|
|
Please, Read the Handbook!
Basically, you need only one single line for DHCP.
That´s it. |
|
Back to top |
|
 |
chris_andrew Apprentice


Joined: 19 Sep 2004 Posts: 291 Location: Wiltshire, UK
|
Posted: Mon Feb 28, 2005 6:43 pm Post subject: |
|
|
I'm really sorry. I do know the difference between DHCP and static IP address. I am just having problems with getting them to work with Gentoo. I want a dynamic address from my router, and that's it. How difficult can it be?
I've read the docs, and am still not sure. Sorry i've wasted your time.
Impz, I appreciate that your router automatically allocates addressers, as does mine, but this is what I want it to do, not allocate a static address, as you have.
Thanks,
Chris. |
|
Back to top |
|
 |
j-m Retired Dev

Joined: 31 Oct 2004 Posts: 975
|
Posted: Mon Feb 28, 2005 6:47 pm Post subject: |
|
|
impz wrote: | Quote: | This is wrong! You are not using DHCP at all. You have assigned a static IP address. |
That's the point. He can't get an IP from the router, bc he doesn't have the dhcp client installed and
thus cannot get into the www and download the client
|
Uh, now I understand what you have been trying to say. I´d really suggest following the handbook next time, it could have saved us a lot of time.
Chris: You cannot use DHCP without the client. First set the correct static IP, gateway and DNS, emerge dhcpcd, set your network to use DHCP server after you are done. |
|
Back to top |
|
 |
impz n00b


Joined: 24 Feb 2005 Posts: 28 Location: Germany
|
Posted: Mon Feb 28, 2005 7:02 pm Post subject: |
|
|
ok....now that this issue is cleared out.
chris_andrew. do you know the ip of your router?
If so please tell me I will then to try and write you a /etc/conf.d/net
configured to fit your machine.
If you can then access the inet you will do emerge dhcpcd and then i can help you
change your configs to fit for dhcp use. _________________ Risk everything, or gain nothing.
[Geoffrey de Charny] |
|
Back to top |
|
 |
chris_andrew Apprentice


Joined: 19 Sep 2004 Posts: 291 Location: Wiltshire, UK
|
Posted: Mon Feb 28, 2005 7:12 pm Post subject: |
|
|
Ahh, I see what you were trying to do, now.
I managed to download dhcpcd, and have adjusted my /etc/conf.d/net fiel to dhcp. This now works correctly and I have booted from scratchand all is ok.
I don't know why this happened, I must have overlooked installing dhcpcd during initial set-up.
Thankyou both for your time.
Now onto a keyboard problem..... |
|
Back to top |
|
 |
|