To try the kernel module execute the following steps:
- Open a terminal
git clone https://github.com/BjoernDaase/vfs-FATx.gitcd modulemake(if there are any libraries missing, try installing linux kernel headers, e.g. on Debian: apt-get install linux-headers-$(uname -r) ).sudo insmod FATx-vfs.ko(this will load the LKM)- Information about the module can be seen by taping
modinfo FATx-vfs.ko - If step 4 was executed correctly you should see a FATx_vfs entry when typing
lsmod - Now we can remoce the LKM again using
sudo rmmod FATx_vfs.ko - If all the steps before were executed corretly using
sudo tail -f /var/log/kern.log(or if you do not sse anythingcat /var/log/kern.log | grep LKM) should see entries like (timestamps and metainfo could differ)
Jun 1 09:02:07 bjoerns-HP kernel: [13446.920585] Hello from the FATxvfs LKM!
Jun 1 09:02:17 bjoerns-HP kernel: [13457.138484] Goodbye from the FATxvfs LKM!
To mount an image into an directory do the following (DO NOT DO THIS ON YOUR WORKING COMPUTER)
- Insert the module as shown above first
- Run
sudo mount -o loop -t fatx ./image ./dir. This will fail (and is inteded to do so), you will recieve an output likeKilled - Now have a look at the kernel messages and run
dmesg, you will see a lot of errors (beacuse the mount fails). But especially you will see a[ 455.049283] fatx mounted, which means that the mountng was 'successfull' - Unounting via
sudo umount ./dirwon't work, beacuse the directory is not mounted - You WILL NOT BE ABLE TO EASILY UNMOUNT THE MODULE with
sudo rmmod FATx_vfs.ko, becuse it's in use now (seelsmod) - Restart and everything is fine again