Earlier this morning I needed to run some tests against a NFS server running on BackTrack Linux version 5 release 3 and ran into some issues installing the nfs-kernel-server. It appeared as if things started to install properly but then the nfs-kernel-server did not start properly and ended up displaying a couple errors. Below I describe the error in more detail followed by the process I used to get the nfs-kernel-server installed properly on BT5.
NFS Server Error On BackTrack Linux:
- root@bt:~# apt-get install nfs-common nfs-kernel-server portmap
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- nfs-common is already the newest version.
- nfs-kernel-server is already the newest version.
- portmap is already the newest version.
- portmap set to manually installed.
- 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
- 1 not fully installed or removed.
- After this operation, 0B of additional disk space will be used.
- Setting up nfs-kernel-server (1:1.2.0-4ubuntu4.2) ...
- * Exporting directories for NFS kernel daemon...
- ...done.
- * Starting NFS kernel daemon
- ...fail!
- invoke-rc.d: initscript nfs-kernel-server, action "start" failed.
- dpkg: error processing nfs-kernel-server (--configure):
- subprocess installed post-installation script returned error exit status 1
- Errors were encountered while processing:
- nfs-kernel-server
- E: Sub-process /usr/bin/dpkg returned an error code (1)
- root@bt:~#
Initially I attempted to reconfigure the nfs-kernel-server package using dpkg as shown in the example output below however that was not successful.
Failed Attempt To Resolve nfs-kernel-server Package Error:
- root@bt:~# dpkg --configure nfs-kernel-server
- Setting up nfs-kernel-server (1:1.2.0-4ubuntu4.2) ...
- * Exporting directories for NFS kernel daemon...
- ...done.
- * Starting NFS kernel daemon
- ...fail!
- invoke-rc.d: initscript nfs-kernel-server, action "start" failed.
- dpkg: error processing nfs-kernel-server (--configure):
- subprocess installed post-installation script returned error exit status 1
- Errors were encountered while processing:
- nfs-kernel-server
- root@bt:~#
After the above attempt failed I figured there must be some sort of conflict with another package so to resolve the problem I decided to remove the nfs-common package and then reinstall nfs-common and nfs-kernel-server. Also make sure that if you follow this process you also reinstall the saintexploit package.
Remove nfs-common And nfs-kernel-server From BT5:
- root@bt:~# apt-get remove nfs-kernel-server
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- The following packages will be REMOVED:
- nfs-kernel-server
- 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
- 1 not fully installed or removed.
- After this operation, 426kB disk space will be freed.
- Do you want to continue [Y/n]? Y
- (Reading database ... 263966 files and directories currently installed.)
- Removing nfs-kernel-server ...
- * Stopping NFS kernel daemon
- ...done.
- * Unexporting directories for NFS kernel daemon...
- ...done.
- Processing triggers for man-db ...
- Processing triggers for ureadahead ...
- root@bt:~#
- root@bt:~# apt-get remove nfs-common
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- The following packages were automatically installed and are no longer required:
- libnfsidmap2 librpcsecgss3 libgssglue1
- Use 'apt-get autoremove' to remove them.
- The following packages will be REMOVED:
- nfs-common saintexploit
- 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
- After this operation, 647kB disk space will be freed.
- Do you want to continue [Y/n]? Y
- (Reading database ... 263941 files and directories currently installed.)
- Removing saintexploit ...
- Removing nfs-common ...
- stop: Unknown instance:
- stop: Unknown instance:
- stop: Unknown instance:
- Processing triggers for desktop-file-utils ...
- Processing triggers for python-gmenu ...
- Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
- Processing triggers for man-db ...
- Processing triggers for ureadahead ...
- Processing triggers for python-support ...
- root@bt:~#
Notice how saintexploit has nfs-common as a dependency so again make sure to reinstall the saintexploit package once NFS is functioning properly. With both nfs-common and nfs-kernel-server removed you should now be able to reinstall them both without issue followed by saintexploit.
Reinstall nfs-common And nfs-kernel-server On Backtrack Linux:
- root@bt:~# apt-get install nfs-common nfs-kernel-server
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- The following NEW packages will be installed:
- nfs-common nfs-kernel-server
- 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
- Need to get 231kB/402kB of archives.
- After this operation, 1,073kB of additional disk space will be used.
- Get:1 http://updates.repository.backtrack-linux.org/ revolution/main nfs-common 1:1.2.0-4ubuntu4.2 [231kB]
- Fetched 231kB in 0s (482kB/s)
- Selecting previously deselected package nfs-common.
- (Reading database ... 260701 files and directories currently installed.)
- Unpacking nfs-common (from .../nfs-common_1%3a1.2.0-4ubuntu4.2_amd64.deb) ...
- Selecting previously deselected package nfs-kernel-server.
- Unpacking nfs-kernel-server (from .../nfs-kernel-server_1%3a1.2.0-4ubuntu4.2_amd64.deb) ...
- Processing triggers for ureadahead ...
- Processing triggers for man-db ...
- Setting up nfs-common (1:1.2.0-4ubuntu4.2) ...
- statd start/running, process 14295
- gssd stop/pre-start, process 14320
- idmapd start/running, process 14355
- Setting up nfs-kernel-server (1:1.2.0-4ubuntu4.2) ...
- * Exporting directories for NFS kernel daemon...
- ...done.
- * Starting NFS kernel daemon
- ...done.
- root@bt:~#
Notice that this time nfs-kernel-server installs and the NFS kernel daemons starts without issue. Now as a last step reinstall saintexploit so things are back to how they were before removing nfs-common.
Reinstall saintexploit On Backtrack Linux:
- root@bt:~# apt-get install saintexploit
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- The following NEW packages will be installed:
- saintexploit
- 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
- Need to get 17.3MB of archives.
- After this operation, 0B of additional disk space will be used.
- Get:1 http://all.repository.backtrack-linux.org/ revolution/testing saintexploit 7.8.9-bt1 [17.3MB]
- Fetched 17.3MB in 13s (1,268kB/s)
- Selecting previously deselected package saintexploit.
- (Reading database ... 260771 files and directories currently installed.)
- Unpacking saintexploit (from .../saintexploit_7.8.9-bt1_all.deb) ...
- Processing triggers for desktop-file-utils ...
- Processing triggers for python-gmenu ...
- Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
- Processing triggers for python-support ...
- Setting up saintexploit (7.8.9-bt1) ...
- Reconfiguring...
- Checking to make sure all the targets are here...
- Trying to find Perl... /usr/bin/perl5.10.1
- Changing the source in PERL scripts...
- Trying to find HTML/WWW browser... /usr/bin/firefox
- Looking for UNIX commands...
- Can't find finger
- Found Xprobe2 ; for best results upgrade to 0.3 or higher
- Doing substitutions on the shell scripts...
- Changing paths in config/paths.pl...
- Changing paths in config/paths.sh...
- Looking for libssl.../usr/lib/libssl.so
- Looking for libcrypto.../usr/lib/libcrypto.so
- Upgrading configuration files...
- root@bt:~#
You should now be able to configure and start using NFS on the BackTrack Linux server or computer.
tnxxxxxxxxxxxxxxxx
very good
worked :X