Results 1 to 12 of 12

Thread: [VirtualBox] When doing "apt-get upgrade" or "dist-upgrade", Kali login loops

  1. #1
    Join Date
    2016-Oct
    Posts
    4

    [VirtualBox] When doing "apt-get upgrade" or "dist-upgrade", Kali login loops

    Download the VBox from the kali site: Kali-Linux-2016.2-vbox-amd64
    Loaded into VirtualBox, everything works. Take a snapshot in case updating breaks kali or something else.

    1) apt-get update = Works fine, finishes, no problems.
    2) apt-get install virtualbox-dkms = Works fine, finishes, no problems.
    3) apt-get upgrade = Goes through the rather long process of downloading and updating everything. Gets to a part where it reboots the VM, and then takes me to the Kali login screen. I use the default username/pass since I didn't change them, but every time I enter the password and press enter, the whole VM restarts and goes back to the login screen again. Never changes. Had to revert to my initial snapshot of the machine.

    There were no error messages. Only thing that works to get me back to a working Kali version is to revert to the initial snapshot. Doing an apt-get dist-upgrade causes the same problems. Rather frustrating problem, since I can't update Kali. Don't know if it's a problem with a new kernel compiling and breaking Vbox, or something else. If it were the former, I would definitely assume the dev's know about this and would have thought there would be more threads about this sort of issue.

  2. #2
    Join Date
    2016-Nov
    Posts
    2
    Same problem here. One additional thing I noticed is that although I had changed my password it wasn't working and took the default password. Very strange.

    The other things I have ran into are either that if I can login I get a black screen and if I move the mouse it just reverts back to the login screen. The one time I got in the desktop was blank and the OS was very unresponsive.

    Side note: I am running VMWare and not VirtualBox. I have the same issue with the ISO build or the VM build as well.

    -raedeus
    Last edited by maiki; 2016-11-04 at 08:54. Reason: Merge posts

  3. #3
    Join Date
    2016-Nov
    Posts
    1
    I had the same problem (with VMWare). The solution was simple - before running apt-get upgrade I switched to the text console. Then "apt-get upgrade", reboot and voila, it should work.

  4. #4
    I had the same problem but fixed it. It appears that dpkg doesn't finish before the VM restarts so you have to manually do it.

    1. When you bootup, at GRUB, type 'e' and add 'init=/bin/bash' at the end of the line that starts with 'linux'.
      1. The line on my VM before edit:
        • linux /boot/vmlinuz-4.6.0-kali1-amd64 root=UUID=some_unique_hex_string_here ro initrd=/install/initrd.gz quiet

      2. The line on my VM after edit:
        • linux /boot/vmlinuz-4.6.0-kali1-amd64 root=UUID=some_unique_hex_string_here ro initrd=/install/initrd.gz quiet init=/bin/bash
    2. Hit F10
    3. At the command line enter each of these commands:
      • su
      • mount -o remount,rw /dev/sda1 / (Or wherever your root partition is)
      • dpkg --configure -a


    You may need an internet connection first, and if you do, you want to apt-get update/upgrade from the terminal here.

    Hope that helps!
    Last edited by airforcefalco; 2016-11-07 at 15:25.

  5. #5
    Join Date
    2016-Nov
    Posts
    1
    Totally worked! A million thanks!

  6. #6
    Join Date
    2016-Oct
    Posts
    4
    Quote Originally Posted by airforcefalco View Post
    I had the same problem but fixed it. It appears that dpkg doesn't finish before the VM restarts so you have to manually do it.

    1. When you bootup, at GRUB, type 'e' and add 'init=/bin/bash' at the end of the line that starts with 'linux'.
      1. The line on my VM before edit:
        • linux /boot/vmlinuz-4.6.0-kali1-amd64 root=UUID=some_unique_hex_string_here ro initrd=/install/initrd.gz quiet

      2. The line on my VM after edit:
        • linux /boot/vmlinuz-4.6.0-kali1-amd64 root=UUID=some_unique_hex_string_here ro initrd=/install/initrd.gz quiet init=/bin/bash
    2. Hit F10
    3. At the command line enter each of these commands:
      • su
      • mount -o remount,rw /dev/sda1 / (Or wherever your root partition is)
      • dpkg --configure -a


    You may need an internet connection first, and if you do, you want to apt-get update/upgrade from the terminal here.

    Hope that helps!
    I can't do apt-get update/upgrade even though I have an internet connection. For some reason, VBox doesn't recognize this.
    Screen: http://imgur.com/a/Wai13

  7. #7
    Join Date
    2013-Jun
    Posts
    10
    this is a very similar issue to what I see and have experienced.. I have kernel panic's after dooing a fresh install and dist-upgrade todaykali-crash.JPG

  8. #8
    Join Date
    2013-Jun
    Posts
    10
    Quote Originally Posted by Jindrak View Post
    I can't do apt-get update/upgrade even though I have an internet connection. For some reason, VBox doesn't recognize this.
    Screen: http://imgur.com/a/Wai13
    make sure you have the network stack loaded and you can go something like "ping google.com" if you cant then you need to troubleshoot that issue before you can answer why your apt/update didnt go.

  9. #9
    Join Date
    2016-Nov
    Posts
    1
    airforcefalco. For me it works just as you said. I follow all the steps and it solve the problem. I had to try like 3 times because I had the same problem as spudgunman said with the network but I check carefully the steps and finally everything is fine.

  10. #10
    Glad to hear it! Hopefully it won't be a problem for anyone much longer.

  11. #11
    Join Date
    2016-Nov
    Posts
    1
    I'm glad that airforcefalco posted his solution. However, perhaps I was in a hurry and didn't follow it well for the first couple of tries.
    Here's my summary of his solution:
    0) you've tried to do an apt-get update and apt-get upgrade|dist-upgrade and you ended up with crashing VM. In my case, I kept getting kicked back to the login screen repeatedly.
    1) gracefully (if you can) have your VM reboot.
    2) when you get to the grub splash screen, press "e" (to edit the grub instructions)
    3) look for the line that says, "linux /boot/vmlinuz-4.6.0-kali1-amd64" and ends with "ro initrd=/install/initrd.gz quiet".
    4) go to the end of that line and add "init=/bin/bash"
    5) press F10 to continue booting.. there'll be some stuff, then you should end up at a command prompt.
    6) enter the following commands, in order:
    a) "su" (to become super-user)
    b) "mount -o remount,rw /dev/sda1 / " (use sda1 if that's your partition. don't miss the space between the 1 and the following '/')
    c) "dpkg --configure -a" (this should cause dpkg to finish installing all the junk that didn't finish installing from your upgrade - it may be a LOT of stuff).
    7) after that, you'll probably have to force your VM to reboot (typing "reboot" or "shutdown -HP now" didn't even begin to work for me)
    8) you should be able to boot to your desktop and go about your business at this point.

    Cheers!

  12. #12
    Join Date
    2016-Nov
    Posts
    1
    Quote Originally Posted by airforcefalco View Post
    I had the same problem but fixed it. It appears that dpkg doesn't finish before the VM restarts so you have to manually do it.

    1. When you bootup, at GRUB, type 'e' and add 'init=/bin/bash' at the end of the line that starts with 'linux'.
      1. The line on my VM before edit:
        • linux /boot/vmlinuz-4.6.0-kali1-amd64 root=UUID=some_unique_hex_string_here ro initrd=/install/initrd.gz quiet

      2. The line on my VM after edit:
        • linux /boot/vmlinuz-4.6.0-kali1-amd64 root=UUID=some_unique_hex_string_here ro initrd=/install/initrd.gz quiet init=/bin/bash
    2. Hit F10
    3. At the command line enter each of these commands:
      • su
      • mount -o remount,rw /dev/sda1 / (Or wherever your root partition is)
      • dpkg --configure -a


    You may need an internet connection first, and if you do, you want to apt-get update/upgrade from the terminal here.

    Hope that helps!
    tried this and got error saying su ; invalid option -- '0'...screenshot is attached Screenshot from 2016-11-18 19-48-32.jpg

Similar Threads

  1. sudo apt-get upgrade "ok" or "no"
    By fixi in forum ARM Archive
    Replies: 0
    Last Post: 2022-11-06, 10:51
  2. Replies: 0
    Last Post: 2022-04-14, 02:30
  3. Can't "dist-upgrade" & can't update my linux headers
    By I_4m_Z3r0 in forum TroubleShooting Archive
    Replies: 6
    Last Post: 2017-03-13, 20:45
  4. Replies: 1
    Last Post: 2015-10-20, 13:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •