BASH
15
loop aes
Guest on 11th June 2022 05:25:25 PM
To patch the kernel with loop-AES :
1) copy (hard link) a recent kernel to a new location, and remove the files
"drivers/block/loop.c" and "include/linux/loop.h" before patching.
# cp -al linux-2.4.27 linux-2.4.27-loop-AES-v2.1c
# rm -vf linux-2.4.27-loop-AES-v2.1c/{drivers/block/loop.c,include/linux/loop.h}
2) download the most recent version from the master site :
http://loop-aes.sourceforge.net/loop-AES-latest.tar.bz2
3) download potential updates from the same site, eg :
http://loop-aes.sourceforge.net/updates/loop-AES-v2.1c-20040813.diff.bz2
4) extract the package into a temporary directory. Let's say it will create
loop-AES-v2.1c. Check that a recent kernel patch is provided (eg:
kernel-2.4.27-rc3.diff). Then check if the update patch touches this file
or not. If it only touches loop.c-2.4.patched (most likely), it might be
interesting to check whether the kernel's loop.c will have to be patched
or not (probably by hand).
# tar jxf loop-AES-v2.1c.tar.bz2
# bzcat loop-AES-v2.1c-20040813.diff.bz2 | grep ^+++
+++ loop.c-2.4.patched Tue Aug 10 17:27:18 2004
# cd linux-2.4.27-loop-AES-v2.1c
# patch -p1 < ../loop-AES-v2.1c/kernel-2.4.27-rc3.diff
apply a few fixes according to the update
# vi drivers/block/loop.c
# make distclean
5) diff the two kernel trees to rebuild the patch, then remove the directories.