Linux Troubleshooting

Structure needs cleaning.

First you need to find files that cause this issue. this is very simple - in ls -l listing they will be shown like

????????? ? ? ? 1.7K Jun  8 13:49 filename

then, you need to run debugfs and delete inode of this file

debugfs -w /dev/sda5

-w says that partition will be opened in read-write mode.

In debugfs prompt you need to type

clri path/to/file

File path should be absolute for this partition. If your partition mounted to /mnt and file you need to delete is /mnt/folder/filename, you should use just folder/filename.

After deleting inodes of all broken files you can leave debugfs and run fsck on partition. It will automatically remove files without inodes and fix your partition.


Depmod Warning!

If you install any apps that build modules against the kernel, you may come up against the following warnings at the end of the compile.  This is a result of an option within the kernel that needs to be disabled.

>> Installing (1 of 1) net-firewall/xtables-addons-2.8::gentoo
 * Removing net-firewall/xtables-addons-2.8 from moduledb.
 * Updating module dependencies for 4.8.2-gentoo ...
depmod: WARNING: //lib/modules/4.8.2-gentoo/xtables_addons/xt_geoip.ko needs unknown symbol _raw_spin_lock
depmod: WARNING: //lib/modules/4.8.2-gentoo/xtables_addons/xt_geoip.ko needs unknown symbol xt_unregister_matches
depmod: WARNING: //lib/modules/4.8.2-gentoo/xtables_addons/xt_geoip.ko needs unknown symbol synchronize_sched
depmod: WARNING: //lib/modules/4.8.2-gentoo/xtables_addons/xt_geoip.ko needs unknown symbol vfree
depmod: WARNING: //lib/modules/4.8.2-gentoo/xtables_addons/xt_geoip.ko needs unknown symbol xt_register_matches
depmod: WARNING: //lib/modules/4.8.2-gentoo/xtables_addons/xt_geoip.ko needs unknown symbol vmalloc [ ok ]
 * Adding module to moduledb.

The fix is to disable the Trim option:

[*] Enable loadable module support  --->
    [ ]   Trim unused exported kernel symbols