Score:0

How can I boot to ubuntu after a failed windows installation?

io flag

I have an MBR disk with Ubuntu Desktop 22.04 installed on /dev/sda2. I decided to install Windows on /dev/sda3, which is an NTFS partition. However, the windows installation was interrupted, and now I can't boot to Ubuntu anymore. Instead of getting the GRUB menu (which I don't get even after holding the shift key during startup), I get an error screen saying "BOOTMGR is missing".

What I don't get is that it should still be possible to boot into Ubuntu, because the partition containing Ubuntu was not touched by the windows installation. However this is not the case.

Any ideas how to recover my Ubuntu instance? I do not want to fresh install Ubuntu again, but I am ok with that as a last resort.

guiverc avatar
cn flag
The boot process for an OS is not kept on the partition where the OS itself resides, if you're machine is legacy then the MBR is used, otherwise if uEFI then an ESP (EFI System Partition) is used, where it's common for this to be wiped during a windows install. The outcome you got is the *norm* for any failed install.
guiverc avatar
cn flag
FYI: You didn't specify if you're asking about a Ubuntu Desktop or Ubuntu Server install (*you only mentioned a release*), but you can re-install a Ubuntu Desktop system without losing any data files, and having *manually installed* (ie. those you added after install, from Ubuntu repositories anyway) re-install automatically.
Wais Kamal avatar
io flag
Thank you, the suggested duplicate has instructions on how to reinstall grub. I will try that. I am using Ubuntu Desktop. I will update the question accordingly.
guiverc avatar
cn flag
Computer systems are built following standards; the MBR (*master boot record*) was created so the hardware knew how to *bootstrap* an OS & all OSes used it; the MBR being a *sector* reserved for that purpose & outside of any disk space you partition. That *standard* being replaced by uEFI (*Secure uEFI too*) with the MBR still a reserved (*outside of partitioning*) space even today! but the ESP does reside in partitioned space, but still outside of the partition the OS itself resides in. All OSes can re-use this space, but it's usually last in install so a failed install means corruption...
guiverc avatar
cn flag
If you need to re-ask a question; I'll suggest stating if your machine is *legacy* (*which alas has many names, latest being CSM*) or uEFI, as there are differences in recovery of data.
Wais Kamal avatar
io flag
@guiverc thanks for the useful info. It is an MBR disk and hence the machine uses legacy BIOS.
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.