stec-inc / EnhanceIO

EnhanceIO Open Source for Linux
Other
420 stars 176 forks source link

Enhanceio Cache breaks after each kernel update #99

Open f3bruary opened 9 years ago

f3bruary commented 9 years ago

To solve:

  1. remove enhanceio from hooks in /etc/mkinitcpio.conf
  2. mkinitcpio -p linux to regenerate
  3. Uninstall enhanceio-dkms-git (arch linux)
  4. reboot
  5. find / -iname 'enhanceio' -exec rm -rf {} \; <-- to remove all leftover files
  6. reboot
  7. redo initial setup according to arch linux wiki

The problem is that the new kernel won't load the modules and booting gives fsck errors. Reinstalling the package will recompile the modules.

hydranix commented 8 years ago

You should utilize systemd to auto-recompile the modules whenever the kernel is updated. /usr/lib/systemd/system/enhanceio.path

[Unit]
Description=Auto rebuild enhanceio modules on kernel updates.

[Path]
PathChanged=/boot/initramfs-linux.img

[Install]
WantedBy=multi-user.target

With /usr/lib/systemd/system/enhanceio.service

[Unit]
Description=Auto rebuild enhanceio modules on kernel updates.

[Service]
Type=oneshot
ExecStart=/usr/lib/enhanceio/rebuild.sh

/usr/lib/enhanceio/rebuild.sh

#!/bin/bash
Kernel_Version="$(file /boot/vmlinuz-linux|awk '{print $9}')"
Module_Version="$(pacman -Q enhanceio-dkms-git|head -n 1|awk '{print $2}')"
dkms remove -m enhanceio -v $Module_Version --all
dkms install -m enhanceio -k $Kernel_Version -v $Module_Version

systemctl enable enhanceio-build.path

or something to that effect

onlyjob commented 8 years ago

Just wondering, what kind of GNU/Linux distribution is not re-building DKMS kernel module on kernel upgrade??

f3bruary commented 8 years ago

dksm tries to rebuild but can't find the .so files and errors out.

onlyjob commented 8 years ago

Which makes it a packaging issue, isn't it?

f3bruary commented 8 years ago

iirc it tried to look in the new kernel's directory for the modules, which aren't there. How is this a packaging error exactly ?