You are not logged in.

#1 2016-04-10 00:55:02

redmaw
Member
Registered: 2016-04-10
Posts: 14

[SOVLED] error when enabling dhcpd for an interface

Hi,

I was following the Beginners' Guide to get familiar with Arch and everything was going smoothly until I tried to bind the dhcpd to my network interface. I have reviewed the dhcpd and Network Configuration wiki pages and forums but I just can't figure out why I am getting this error. Can someone help me figure out what I am doing wrong? The details are below.

FYI this is running on VirtualBox.

[root@archiso /]# ls /sys/class/net
enp0s3    lo

[root@archiso /]# systemctl enable dhcpcd@enp0s3.service
Operation falied: No such file or directory

Thanks,
redmaw

EDIT:
Changed old title from ""No such file or directory"  error when enabling dhcpd for an interface" in order to mark it as solved.

Root Cause: Must have been user error as the actual install works and it did not reproduce on the first try.

Last edited by redmaw (2016-04-10 21:02:55)

Offline

#2 2016-04-10 01:14:15

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: [SOVLED] error when enabling dhcpd for an interface

Does:

ip link

Give the same adapter name?  Link is how I always get it.

Offline

#3 2016-04-10 01:50:11

redmaw
Member
Registered: 2016-04-10
Posts: 14

Re: [SOVLED] error when enabling dhcpd for an interface

Yes, same name.

[root@archiso /]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 08:00:27:85:55:37 brd ff:ff:ff:ff:ff:ff

Last edited by redmaw (2016-04-10 01:51:49)

Offline

#4 2016-04-10 03:06:18

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: [SOVLED] error when enabling dhcpd for an interface

What is the output of:

ping -c 3 www.google.com

?  If you have a wired connection and are booted into the Arch installation medium then it should automatically establish an internet connection and you do not enable the interface until later when you are arch-chroot'ed into your actual installation.

Trying to enable the interface with systemctl is an error until after you are chroot'ed.

Offline

#5 2016-04-10 03:18:47

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,541
Website

Re: [SOVLED] error when enabling dhcpd for an interface

There very well may be some things missing from the iso that are in a normal persistent install.  In this case enabling a service doesn't make any sense as it can't have any effect as any change you make in the iso does not remain after a reboot, and "enable" only has an effect after a reboot.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2016-04-10 04:24:57

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,433

Re: [SOVLED] error when enabling dhcpd for an interface

can you run this successfully,

dhcpcd enp0s3

before enabling the service

Offline

#7 2016-04-10 12:24:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,541
Website

Re: [SOVLED] error when enabling dhcpd for an interface

erm ... again: enabling services in the iso is pointless.   Whatever the problem is here, enabling anything in the iso is not the solution.  To that end, redmaw, it looks like you have a connection already on your ethernet device, so is there a problem at all?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2016-04-10 20:59:33

redmaw
Member
Registered: 2016-04-10
Posts: 14

Re: [SOVLED] error when enabling dhcpd for an interface

Hi all, thanks for the suggestions. I had network connection and I was chrooted into the new install (as per the guide's instructions) so as far as I understand I was not trying to enable the service on the iso. Rebooting and logging into the actual install did work however so there is no real problem. I created another VM this morning to see if I could reproduce the issue however it did not so this was most likely user error, though I have no idea what I might have done differently.

Thanks for the help and apologies for making a thread over something like this.

Offline

#9 2016-04-10 21:11:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,541
Website

Re: [SOVLED] error when enabling dhcpd for an interface

redmaw wrote:

I was chrooted into the new install (as per the guide's instructions) so as far as I understand I was not trying to enable the service on the iso.

Not according to the output in your initial post:

[root@archiso /]#

You must have exited the chroot before those commands.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2016-04-10 21:49:56

redmaw
Member
Registered: 2016-04-10
Posts: 14

Re: [SOVLED] error when enabling dhcpd for an interface

For me the prompt on the arch iso is

root@archiso ~ #

and when chrooted

root@archiso ~ # arch-chroot /mnt /bin/bash
[root@archiso /]#
root@archiso ~ # arch-chroot /mnt
sh-4.3#

I tried to get a script to show this better but it did not work well: http://pastie.org/private/tyxffp4iuguu74gjuwluiw

Offline

#11 2016-04-10 23:48:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,541
Website

Re: [SOVLED] error when enabling dhcpd for an interface

Ah, that could be - sorry.  I've never specified bash for the chroot shell.  But once you set your hostname - which comes before setting up network services - that prompt should change.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#12 2016-10-18 23:30:32

PierreG27
Member
From: Granby,Québec,Canada
Registered: 2016-10-18
Posts: 3

Re: [SOVLED] error when enabling dhcpd for an interface

Hello,
I just want to say thank you.
As Redmaw did, i read all the istalation guide.
But i must have miss something, because i always have to restart the dhcpcd service, each time.

i must have not done 'systemctl enable dhcpcd@enp0s3.service', because, i just did it, and this solved my problem!

Thank!

Offline

Board footer

Powered by FluxBB