Fixing a broken Ubuntu installation EDIT: SOLVED

This is a cross-post from the discord, figured it may make more sense here:

So I managed to get a ubuntu VHDX converted to a VHD and burnt to a flash drive, I can browse the entire file system from a local ubuntu 20.04 LTS install that I just made. I would like to ideally repair the old image to be bootable again but if that is not possible I would at least like to somehow bring all of the kde plasma themes and icon packs that I had on it into this system including kde plasma itself (I know it’s not the best window manager on earth but I like it :slightly_smiling_face: ). I am relatively inexperience with any linux distributions fyi. Any and all suggestions would be greatly appreciated.

Solution: I created a bootable usb of boot-repair and extended the primary volume with the built in copy of GParted as the install was completely out of space, I then used this guide to manually boot to my install after hitting shift and escape repeatedly to get into a grub terminal. From here I was able to get to the login screen and authenticate. I then used update-grub as referenced in the guide to get the system to boot from the grub menu by manually selecting the correct boot option from the bios (in my case it was named ubuntu). However at this point I was still not able to automatically boot all the way to login by just hitting the power button so at the suggestion of one of the moderators in the ubuntu hideout discord I installed and ran boot-repair directly on the sickly operating system and pointed my bios to it’s newly regenerated efi file and voila it booted! This literally happened tonight (2/20/2023 nearly a month after posting). Massive thanks to everyone who helped me on the level1 discord and those who documented their previous issues that I was able to learn from. This whole process was an incredible learning experience and I’m glad to have gotten it - though it would have been better without the stress :slight_smile:

1 Like

The most straightforward way (read, easiest to explain) would be to do a fresh install of ubuntu 20.04 using a live CD.

Finish the install like normal.

boot back into the live CD and mount both your thumbdrive and your newly installed 20.04 disk.

sudo rsync -av /mnt/thumbdrive/ /mnt/newroot/ --delete
(note the trailing slashes in those paths, they’re SUPER important)

Reboot into your OS, and everything should be the way you remember.

Hopefully this stack overflow will help with VHD mounting. Never had a need to do that, so cant say how good/bad the experience will be in a live cd environment.

Apologies for not thanking you for posting sooner. I had some things come up that delayed my troubleshooting; I believe today is my 5th and final day in a row of working through it so your solution most certainly would have been faster but I would not have been able to learn nearly as much that way. I hope you understand and thank you again for taking the time to offer your solution.

1 Like