Ask Your Question
1

Problem with service network restart - Fedora 29

asked 2018-11-16 03:50:13 -0600

Trev gravatar image

updated 2018-11-16 07:20:05 -0600

I freshly installed Fedora 29 on my X86 workstation and changed to static networking then run service network restart to refresh it. But it wont work. The error message is:

service network restart
Redirecting to /bin/systemctl restart network.service
Failed to restart network.service: Unit network.service not found.

cat /etc/sysconfig/network-scripts/ifcfg-enp0s25
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s25
UUID=eb420339-d723-3263-9386-9bba4bb750be
AUTOCONNECT_PRIORITY=-999
DEVICE=enp0s25
ONBOOT=yes
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.2
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=192.168.1.1

/bin/systemctl enable network.service
Failed to enable unit: Unit file network.service does not exist.

chkconfig --list

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

      If you want to list systemd services use 'systemctl list-unit-files'.
      To see services enabled on particular target use
      'systemctl list-dependencies [target]'.

livesys         0:off   1:off   2:off   3:on    4:on    5:on    6:off
livesys-late    0:off   1:off   2:off   3:on    4:on    5:on    6:off

My investigation showed network.service does not exist. I googled for solutions but no useful information was found. Any idea why?

Well, I prefer using the network service so I can use a static IP address on my workstation. I am aware of NetworkManager being installed by default.

I have stopped and disabled NetworkManager successfully, updated /etc/sysconfig/network-scripts/ifcfg-enp0s25 etc and enabled network.service. But here is the issue... "Unit network.service could not be found" which means Fedora must have not installed the unit file to support the network.service option.

systemctl stop  NetworkManager.service 
[root@leopard ~]# systemctl disable  NetworkManager.service 
Removed /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
Removed /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service.
Removed /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.
Removed /etc/systemd/system/multi-user.target.wants/NetworkManager.service.

[root@leopard ~]# systemctl list-unit-files | grep NetworkManager
NetworkManager-dispatcher.service          disabled       
NetworkManager-wait-online.service         disabled       
NetworkManager.service                     disabled       

cat /etc/sysconfig/network-scripts/ifcfg-enp0s25
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s25
UUID=eb420339-d723-3263-9386-9bba4bb750be
AUTOCONNECT_PRIORITY=-999
DEVICE=enp0s25
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.2
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=192.168.1.1
NM_CONTROLLED=no

systemctl enable network.service
Failed to enable unit: Unit file network.service does not exist.
[root@leopard ~]# systemctl start network.service
Failed to start network.service: Unit network.service not found.

The problem is that Fedora would not create a new unit file to support the network service. Any idea how to make it right?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2018-11-16 07:33:58 -0600

Phoenix_masshhad gravatar image

hi The first step Find the WiFi model

sudo lshw -c network | grep 'product:'|grep 'Wireless'

Second step For example, the name of the wifi QCA9377 You have to replace your model

sudo modprobe -r QCA9377

The third step

sudo modprobe  QCA9377
edit flag offensive delete link more

Comments

There is no wifi in use.

lshw -c network | grep 'product:'|grep 'Wireless'

But I got it -

lshw -c network | grep 'product:'
       product: 82566DM-2 Gigabit Network Connection

Does it mean I need to run modprobe -r 82566DM-2 in root?

Trev gravatar imageTrev ( 2018-11-16 07:57:55 -0600 )edit

It wouldn't help with the network.service, and, as you wrote in another comment, the network does work with NetworkManager, then you have no problem with any device driver.

villykruse gravatar imagevillykruse ( 2018-11-17 01:21:21 -0600 )edit
0

answered 2018-11-17 01:18:11 -0600

villykruse gravatar image

Based on your mentioned that the network.service is not found, you would need to check the following:

ls -dl /etc/init.d/network
rpm -Vf /etc/init.d/network
ls -dl /run/systemd/generator.late/network.service

You may need to install or re-install the package network-scripts which on fedora29 is the package which provides the network.service. The network.service is actually generated at boot time when the file /etc/init.d/network is found on your system.

edit flag offensive delete link more

Comments

You are right. The package network-scripts was NOT installed by Fedora 29 Workstation. Based on your suggested commands above, it confirmed the fact it wasn't deployed when installing the OS. However, I successfully installed the network.service with dnf and everything worked fine. Thank you for pointing it out. I was unaware the network.service package was deprecated. No wonder it wasn't installed by default.

Trev gravatar imageTrev ( 2018-11-18 01:45:46 -0600 )edit
0

answered 2018-11-16 05:28:04 -0600

ed209 gravatar image

Why you aren't using NetworkManager? How did you set network in first place? You have to disable NetworkManager service first in order to enable network service.

edit flag offensive delete link more

Comments

Please see my answer above as this field cant hold more than 600 characters.

Trev gravatar imageTrev ( 2018-11-16 07:20:01 -0600 )edit

First of all, you can use a static IP with NetworkManager since long, long time. No need to complicate simple things. Then, you have not explained at all how did you setup your network, did you wrote ifcfg-enp0s25 by hand or whatever. I'm sure you are missing vital parts but of course I cannot guess which one. Last, if you have all the relevant programs configured and installed, have disabled networkmanager and yet cannot start network service, then file a bug to bugzilla. I would reinstall networkmanager and assign static ip. When it works, and it will, feel free to experiment afterwards.

ed209 gravatar imageed209 ( 2018-11-16 11:42:51 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-11-16 03:50:13 -0600

Seen: 341 times

Last updated: Nov 17