You are not logged in.

#1 2016-05-20 23:58:01

user023
Member
Registered: 2016-05-20
Posts: 3

Systemd boot time error: failed to start Apply Kernel Variables

Community of ArchLinux.org,

I have been recently experiencing an issue in regards to systemd as follows:

[term@localhost ~]$ sudo systemctl status systemd-sysctl.service  
* systemd-sysctl.service - Apply Kernel Variables
   Loaded: loaded (/usr/lib/systemd/system/systemd-sysctl.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2016-05-20 19:23:02 UTC; 16min ago
     Docs: man:systemd-sysctl.service(8)
           man:sysctl.d(5)
  Process: 959 ExecStart=/usr/lib/systemd/systemd-sysctl (code=exited, status=1/FAILURE)
 Main PID: 959 (code=exited, status=1/FAILURE)

May 20 19:23:02 localhost systemd[1]: Starting Apply Kernel Variables...
May 20 19:23:02 localhost systemd-sysctl[959]: Couldn't write '1' to 'kernel/kptr_restrict', ignoring: Invalid argument
May 20 19:23:02 localhost systemd-sysctl[959]: Couldn't write '1' to 'net/ipv6/conf/all/rp_filter', ignoring: No such file or directory
May 20 19:23:02 localhost systemd[1]: systemd-sysctl.service: Main process exited, code=exited, status=1/FAILURE
May 20 19:23:02 localhost systemd[1]: Failed to start Apply Kernel Variables.
May 20 19:23:02 localhost systemd[1]: systemd-sysctl.service: Unit entered failed state.
May 20 19:23:02 localhost systemd[1]: systemd-sysctl.service: Failed with result 'exit-code'.

I could use some assistance in troubleshooting this issue, as I have read over many threads and bug submissions in seeking a resolution to this issue.

Regards,

Offline

#2 2016-05-21 00:12:08

user023
Member
Registered: 2016-05-20
Posts: 3

Re: Systemd boot time error: failed to start Apply Kernel Variables

Community,

Apparently, there were some configuration files I had created which were empty; whereas, I meant to add a few lines to harden the kernel.
A simple deletion of the files and a reboot fixed the issue; however, I will attempt to add the configurations once again.
I will keep you fellow Arch users informed with an update.

--UPDATE--

Issue has returned with the creation of:

File: /etc/sysctl.d/50-kptr-restrict.conf 
kernel.kptr_restrict = 1

I am running the latest grsec kernel. Is it possible that this configuration is conflicting with the kernel?

Regards,

Last edited by user023 (2016-05-21 00:17:04)

Offline

#3 2016-05-21 00:33:29

user023
Member
Registered: 2016-05-20
Posts: 3

Re: Systemd boot time error: failed to start Apply Kernel Variables

Community,

Is it true that the latest Grsec kernel includes kptr and dmesg restriction by default?

I followed the wiki here: https://wiki.archlinux.org/index.php/sy … _hardening

Under TCP/IP Stack Hardening, I created a file: /etc/sysctl.d/90-override.conf and placed those configurations in here.

I am now wondering why the error occurs in my first post:

May 20 19:23:02 localhost systemd-sysctl[959]: Couldn't write '1' to 'net/ipv6/conf/all/rp_filter', ignoring: No such file or directory

Pleasre review my questions in the previous posts for objective correspondence.

Thank you,

Last edited by user023 (2016-05-21 00:46:24)

Offline

#4 2016-05-21 01:41:20

Irok
Member
Registered: 2015-10-10
Posts: 56

Re: Systemd boot time error: failed to start Apply Kernel Variables

user023 wrote:

Community,

Apparently, there were some configuration files I had created which were empty; whereas, I meant to add a few lines to harden the kernel.
A simple deletion of the files and a reboot fixed the issue; however, I will attempt to add the configurations once again.
I will keep you fellow Arch users informed with an update.

--UPDATE--

Issue has returned with the creation of:

File: /etc/sysctl.d/50-kptr-restrict.conf 
kernel.kptr_restrict = 1

I am running the latest grsec kernel. Is it possible that this configuration is conflicting with the kernel?

Regards,

Hi, if is the precompile kernel you can not use it, also is useless. you can use without problem  the kernel.dmesg_restrict flag. Are you using your system as router ?, if not undo the job you did about TCP/IP stack hardening and read the warning improving performance. This should solve the problem.

I guess you are using the precompile cause you are asking.

Last edited by Irok (2016-05-21 02:46:20)

Offline

#5 2019-06-25 16:03:53

datapioneer
Member
Registered: 2019-01-31
Posts: 6

Re: Systemd boot time error: failed to start Apply Kernel Variables

Running Arch Linux rolling release with latest kernel 5.1.14-arch1-1-ARCH and started receiving the message "Failed to start Apply Kernel Variables". To fix this issue, I renamed /etc/sysctl.d/99-sysctl.conf file to /etc/sysctl.d/99-sysctl.conf.orig then rebooted the system. Error was eliminated. I renamed my 99-sysctl.conf file just in case it was necessary to restore it. System seems to be running just fine without the file and boots normally now. Problem solved.

Offline

#6 2019-06-25 16:09:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,736

Re: Systemd boot time error: failed to start Apply Kernel Variables

Files don't magically materialise at that location for no reason, so instead of bandaiding over it ignoring the contents, you should know why and for what reason the files was there in the first place.

In any case, it's unlikely that your case has any relation to the one being discussed here which is about a kernel no longer available in the repos, please don't necrobump.

Closing.

Last edited by V1del (2019-06-25 16:09:59)

Offline

Board footer

Powered by FluxBB