1

How to disable ZFS kernel-module before boot in grub?

It is mentioned that some modules can be disabled through grub command line in similar question. Unfortunately this method is not working with zfs:

module_to_blacklist.blacklist=yes

With next message: unknown parameter 'blacklist' ignored

7
  • Hello BBK, would be nice to know why you are trying to do this. There might be alternatives to what you are trying to do. – Bruno Pereira Feb 6 '15 at 11:01
  • Unfortunately zfs some times need to be restored. When Ubuntu booted with zfs module it trying to load damaged zpool so in the end it hangs. I need to load the system without zfs, only then I'm able to restore zfs. This method for recovery is working well. – BBK Feb 7 '15 at 14:45
  • possible duplicate of Troubleshoot broken ZFS – Elder Geek Mar 2 '15 at 23:00
  • 1
    @ElderGeek this is not a dupe. The OP wants to blacklist a specific module, not troubleshoot one. – terdon Mar 3 '15 at 0:40
  • @terdon Vote retracted – Elder Geek Mar 3 '15 at 16:10
1

If I'm correct that you installed ZFS via dkms then it looks like you need to remove it via the same tool.

dkms remove [module/module-version] [-k kernel/arch] [--all]

       Removes a module/version or module/version/kernel/arch  combination
       from  the  tree.   If  the  module is currently installed, it first
       uninstalls  it  and  if  applicable,  will  replace  it  with   its
       original_module.   Use  the  --all  option  in  order to remove all
       instances for every kernel at once.

Source: http://manpages.ubuntu.com/manpages/trusty/man8/dkms.8.html

Note: You might wish to avoid using the --all option until you are certain that you have obtained the desired results.

2
  • Is there a way to disable it from grub loader before OS boot? – BBK Mar 4 '15 at 9:16
  • It looks like you can disable zfs from grub by removing "boot=zfs" or "boot=zfs rpool=rpool bootfs=rpool/ROOT/ubuntu" from your grub config whichever line is next to GRUB_CMDLINE_LINUX and updating grub. Source:github.com/zfsonlinux/pkg-zfs/wiki/…. – Elder Geek Mar 4 '15 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.