Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
root@DESKTOP-88LREVS:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up initramfs-tools (0.130) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-4.9.0-kali4-amd64 (4.9.30-1kali1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.9.0-kali4-amd64
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.9.0-kali4-amd64 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-4.9.0-kali4-amd64 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
linux-image-amd64 depends on linux-image-4.9.0-kali4-amd64; however:
Package linux-image-4.9.0-kali4-amd64 is not configured yet.
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-4.9.0-kali3-amd64
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.9.0-kali3-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
linux-image-4.9.0-kali4-amd64
linux-image-amd64
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
Can you please paste the output from the following:
Code:
dpkg -l | grep -v '^.i'
uname -a
Code:
root@DESKTOP-88LREVS:~# dpkg -l | grep -v '^.i'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=========================================-====================================-============-===========================================================================================================================================
iF initramfs-tools 0.130 all generic modular initramfs generator (automation)
iF linux-image-4.9.0-kali4-amd64 4.9.30-1kali1 amd64 Linux 4.9 for 64-bit PCs
iU linux-image-amd64 4.9+80+kali1 amd64 Linux for 64-bit PCs (meta-package)
rc live-tools 1:20151214+nmu1 all Live System Extra Components
rc python-alembic 0.8.8-2 all lightweight database migration tool for SQLAlchemy - Python 2.x
rc python-pastescript 1.7.5-4 all serving web applications, creating file layouts for Python packages
rc resolvconf 1.79 all name server information handler
rc user-setup 1.67 all Set up initial user and password
root@DESKTOP-88LREVS:~#
root@DESKTOP-88LREVS:~# uname -a
Linux DESKTOP-88LREVS 4.9.0-kali3-amd64 #1 SMP Debian 4.9.18-1kali1 (2017-04-04) x86_64 GNU/Linux
Ok, thanks. So the first two packages in the list have only been half-configured, the third unpacked but not configured. They are connected to a new version of kernel. Did you notice any problems when you last updated your software, or was the power cut during the process? The five packages marked "rc" (residual configuration) are ones that have been removed but not purged - they can be removed by running sudo apt-get purge packagename, although I have to ask why you deleted resolvconf in the first place as it can be important.
You can either try running sudo apt-get -f install, as suggested above, or take a more manual approach and start with trying sudo apt-get --reinstall install initramfs-tools.
Ok, thanks. So the first two packages in the list have only been half-configured, the third unpacked but not configured. They are connected to a new version of kernel. Did you notice any problems when you last updated your software, or was the power cut during the process? The five packages marked "rc" (residual configuration) are ones that have been removed but not purged - they can be removed by running sudo apt-get autoremove, although I have to ask why you deleted resolvconf in the first place as it can be important.
You can either try running sudo apt-get -f install, as suggested above, or take a more manual approach and start with trying sudo apt-get --reinstall install initramfs-tools.
sudo apt-get autoremove:
Code:
root@DESKTOP-88LREVS:~# sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.130) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-4.9.0-kali4-amd64 (4.9.30-1kali1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.9.0-kali4-amd64
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.9.0-kali4-amd64 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-4.9.0-kali4-amd64 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
linux-image-amd64 depends on linux-image-4.9.0-kali4-amd64; however:
Package linux-image-4.9.0-kali4-amd64 is not configured yet.
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-4.9.0-kali3-amd64
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.9.0-kali3-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
linux-image-4.9.0-kali4-amd64
linux-image-amd64
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
I don't really remember deleting it.
sudo apt-get -f install:
Code:
root@DESKTOP-88LREVS:~# sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.130) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-4.9.0-kali4-amd64 (4.9.30-1kali1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.9.0-kali4-amd64
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.9.0-kali4-amd64 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-4.9.0-kali4-amd64 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
linux-image-amd64 depends on linux-image-4.9.0-kali4-amd64; however:
Package linux-image-4.9.0-kali4-amd64 is not configured yet.
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-4.9.0-kali3-amd64
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.9.0-kali3-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
linux-image-4.9.0-kali4-amd64
linux-image-amd64
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get --reinstall install initramfs-tools:
Code:
root@DESKTOP-88LREVS:~# sudo apt-get --reinstall install initramfs-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for initramfs-tools:amd64
root@DESKTOP-88LREVS:~# /var/tmp
-bash: /var/tmp: No such file or directory
That's the basic problem (although you illustrated it by trying to run the directory rather than use the ls command). Did you delete that directory at any point?
I'm not sure how Kali works specifically in this case, but you should create that directory with the following ownership and permissions (note the sticky bit):
Code:
drwxrwxrwt 19 root root 4096 Jun 16 13:11 /var/tmp
Oops, my original suggestion to use autoremove to remove the residual configurations was completely wrong and a sign of stupidity on my side (the problem with trying to do 3 things at once) - apologies. I've amended my original post accordingly.
You remove the residual configurations by sudo apt-get purge packagename, although in this case wait first until the main problem is resolved.
That's the basic problem (although you illustrated it by trying to run the directory rather than use the ls command). Did you delete that directory at any point?
I'm not sure how Kali works specifically in this case, but you should create that directory with the following ownership and permissions (note the sticky bit):
Code:
drwxrwxrwt 19 root root 4096 Jun 16 13:11 /var/tmp
no i did not delete the ls directory.
Code:
root@DESKTOP-88LREVS:~# drwxrwxrwt 19 root root 4096 Jun 16 13:11 /var/tmp
-bash: drwxrwxrwt: command not found
Ves, I hope that it doesn't sound too off, particularly given my slip of the mind with autoremove , but Kali Linux is not a distro for beginners to Linux. If you don't know how to do things like list a directory and create a directory then you're only going to endure pain using Kali.
Don't worry, you're far from being the only one. There has been an influx of late on Linux Questions of new Linux users using Kali, and struggling to do so. Some on here have attributed to it to a US television show that features the distro?
Can I suggest that you use a more newbie-friendly distro to start off with, say Mint or Ubuntu, and cut your teeth on that. It shouldn't take you too long, and once you've learned the basics, you can then move on to more complicated setups such as Kali.
The answer to your question, by the way, is mkdir and chmod. If you run man mkdir, then this shows you the different options you can use for mkdir - the same applies to using man command for most other commands.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.