Set vm.nr_hugepages
too high in /etc/sysctl.conf
and the kernel panic during boot due to not having enough memory.
Is there a way to disable this via a boot parameter in grub menu?
Tried hugepages=0
, mem=16G
, vm.nr_hugepages=0
.
1 Answer
/etc/sysctl.conf
is loaded by a service during boot. If you boot into single user mode with the single
kernel parameter, you should be able to get to a point where you can fix it, before that service has run.
-
Thanks. I didn't mention, but earlier I tried single as well, but still had the same error.– AelianJul 18, 2018 at 22:54
-
@Jeevaka You are meant to fix the configuration while booted into single user mode. Are you saying that the sysctl was set even in single user mode? Jul 18, 2018 at 22:56
-
Even in the single user mode kernel paniced and the first two lines of the error complained about memory not being available and no processes to kill. Which, I assume, was caused by above config change. My system admin tried this as well. Later he managed to boot in a different way (network boot?) and commented out above line and the machine rebooted fine after that.– AelianJul 19, 2018 at 2:58
-
2A network boot would have worked. Another possible approach would have been booting with
init=/bin/bash
. That will skip anything outside initrd, so it will be necessary to remount the root filesystem to read/write mode manually withmount -o remount,rw /
before doing anything else.– telcoMJul 19, 2018 at 4:17