0

I'm running Debian on a custom Chromium OS (cros) kernel on a Chromebook. Cros kernel has disk-based swap file disabled by default (since it prefers zram), and to enable it sysctl variable vm.disk_based_swap must be set to 1, otherwise mounting the swap file would fail. However, adding vm.disk_based_swap=1 to a .conf file in /etc/sysctl.d seems to work only about half of the time; the remaining times swap fails to mount even though post-boot vm.disk_based_swap can be verified to be set to 1, and my guess is that the kernel boot parameter was not applied fast enough in these cases. Based on this specific scenario, the generalized question is how to ensure that a kernel boot parameter is set prior to a dependent process is executed, through either of the following means:

  • The kernel boot parameter be raised to sufficient priority by any available method (by the way, putting sysctl.vm.disk_based_swap=1 on the kernel command line in GRUB doesn't work)
  • The dependent process be sufficiently delayed by any available method (some systemd tinkering, maybe?)
seamux
  • 31
  • 1
  • 3

0 Answers0