Replacing a kernel module in initrd
- Use Rox to find the location of initrd (usually at the root directory where you installed Fatdog64).
- Make a backup of this initrd file, in case you make a mistake.
- Click the initrd file. The initrd will be extracted into a working folder (somewhere under /tmp)
- Inside this folder, there is a file called kernel-modules.sfs
- Open a terminal session from the folder:
- Make sure no files are selected.
- Right-click
- Choose "Window" menu, then choose "Terminal Here"
- From terminal, run the command unsquashfs kernel-modules.sfs
- You will get a new folder created within, called squashfs-root.
- Inside this squashfs-root folder, you can find lib/modules/3.3.2 folder. The version number (3.3.2) may be different for different version of Fatdog64.
- Copy the module you have created in the appropriate location inside the above folder.
- When done, from terminal, run the command depmod -b $(pwd)/squashfs-root -a. This will rebuild the module depedency list.
- Delete the original kernel-modules.sfs. Don't worry, we are going to build a new one.
- From terminal, run the command mksquashfs squashfs-root kernel-modules.sfs -comp xz Make sure you do this after deleting the original kernel-modules.sfs.
- Now remove the squashfs-directory.
- Close your terminal by typing exit, we're done.
- Last step - do this if you feel you have done everything right - click and launch the repack-initrd from Rox. This will re-build the initrd and delete the working folder.
Note 1: If you make a mistake, just close the folder and you can restart again. Nothing is changed until you do the last step (
repack-initrd).
Note 2: that you can do the operation from terminal or from Rox, but please ensure:
- Use terminal commands for those that explicitly mentions "from terminal, do XXX".
- In terminal, do not "cd" to anywhere else (if you do, please change to the original directory before you execute the commands - the instructions above assume you do not change the directory).