Installing Additional Packages
#
Download this RepoTo get a local copy of this repo on the vm run:
#
Modify Package ListEdit the file fs/packages-list
We need to append the name of the package as it would be found in the package manager. For example if we were to install nginx
normally we would run apt install nginx
. Therefore we will add 'nginx' to the end of this file.
#
Modify the Disabled Services ListIf the package that you have added creates a systemd service which is enabled by default, it is often a good idea to disable it. If you don't need the service running by default in every Netkit VM, it is better that it is disabled in the filesystem image, and enabled in the machine's startup file.
To do this we can edit the fs/disabled-services file and add the name of the systemd service.
#
Build the New FilesystemBuild the filesystem as shown in the docker or vm guide, depending on your development environment. When finished, the filesystem should appear as a tarfile in the root of the netkit-jh-build directory, with a name similar to netkit-fs-0.1.8.tar.bz2 (but with a different version number).
#
Test the New FilesystemExtract the filesystem to a different location to your main install (you don't want to override the filesystem in $NETKIT_HOME in case there are problems with the filesystem!).
Now you can run a Netkit lab and test if your software package has been installed on the filesystem.
After testing, you might want to revert to using the original netkit filesystem that was installed by default. To do this simply change the symbolic link back with:
info
Replace the $NETKIT_HOME/fs/netkit-fs-0.1.8
in the last command with the file which was originally pointed to by the symbolic link