Score:0

Trying to install Ubuntu 22.04.1 as a VM, and there's an issue right at the end

tl flag

When I am going through the Ubuntu installer on my VM, I am able to reach the part where I create an account and then it begins installing everything. After several minutes, the installation gets an "Error installing linux-image-5.15.0-52-generic" window near the end. It says that the package post-installation script subprocess returned an error exit status 1. When I click ok, a larger window says that an error occurred and that "E:Sub-process /usr/bin/dpkg returned an error code (1)" but installation will try to continue anyway. When I click ok on that one, the installer prompts me to restart and after the VM restarts, it just gets stuck on a black screen with "Hyper-V" in the center.

My host system runs on Windows 11, hypervisor is Hyper-V Manager. I got the .iso from Canonical's website for Ubuntu Desktop. During installation, I did a custom partition setup on a 85.9 GB virtual disk that includes: 1 MB free space, 98 MB ext4 mounted at /boot, 10000 MB ext4 mounted at /, 1024 MB swap, 599 MB efi, and 74175 MB remaining free space.

Most instances of the /usr/bin/dpkg error code (1) that I have seen online seem to happen to people when they install new software after the initial installation, and solutions to those involve the command prompt, which I can't fully access yet. I remember successfully running an Ubuntu VM on my computer earlier in the year, though that was when it was still on Windows 10, but still not sure what could be causing this or how to fix it.

Ismail Fulat avatar
ru flag
sorry to hear you're having trouble. Have you tried running the installation with the option to NOT install update packages during the install? It can always be done afterwards and would be easier to troubleshoot.
user535733 avatar
cn flag
dpkg "*error code (1)*" simply means that some subprocess somewhere failed. By itself, it's not sufficient information for troubleshooting.
David avatar
cn flag
A common cause for such an error is a bad ISO. Did you verify the ISO before making the Live media? https://ubuntu.com/tutorials/how-to-verify-ubuntu#1-overview
CoffeeFields101 avatar
tl flag
I tried using the default option of formatting the entire disk and it worked, so I guess something was wrong with how I manually partitioned the disk. Not sure which part of the custom scheme caused it but at least I know it was a configuration error on my end.
Score:0
ca flag

I had the same issue and for me it was the issue that my virtual harddisk capacity was too small (10G) I had to create a new one for this VM with 20G and I was able to install this Ubuntu version.

In case this is not your issue, follow the instructions below and check the /var/log/syslog messages by doing these steps:

  1. during this installation and when this issue occures, press on your keyboard right control key and F2 -> you switch to console/shell view
  2. insert as username ubuntu without password (press only enter)
  3. on command prompt insert: sudo less /var/log/syslog
  4. Scroll to the end of this file and check for this issue (e.g. search for your issue like: "linux-image-5.15.0-52-generic". you can search by insert the key "/" inside of less).
  5. Scroll up or down until you will find an hint about the issue.

I hope it helps.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.