How to fix boot drive - installed Ubuntu onto boot disk by mistake!

Installed Ubuntu LTS (dual boot on a MS windows Dell Desktop), but when I restarted after removing boot disk with ISO file on it, would not boot, got the GNU GRUB menu, so figured out what happened. Able to boot with the USB boot disk installed, but want to find out the easiest method to fix this so that the system is installed back onto the Dell computer partition.

I want to keep Windows as a backup option, and I have a second laptop with Ubuntu running fine, so I’d rather not wipe the whole drive. Seems like there are several fixes, but would like some help on this.

Thank you!

Graphene Goat

Hello @GrapheneGoat!

The best way to do it is to essentially boot from your USB disk and get into Ubuntu. Once you do that, please open up a terminal and send me the screenshot of the following command’s output:

lsblk

This will give me an idea of your main system’s boot drive, so that I can help you instruct Grub where to be reinstalled and work properly for you. Including dual-boot. :slight_smile:

1 Like

Here is the partitions based on that command:

AME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 164.8M 1 loop /snap/gnome-3-28-1804/161
loop1 7:1 0 4K 1 loop /snap/bare/5
loop2 7:2 0 61.3M 1 loop /snap/authy/6
loop3 7:3 0 65.1M 1 loop /snap/gtk-common-themes/1515
loop4 7:4 0 219M 1 loop /snap/gnome-3-34-1804/72
loop5 7:5 0 65.2M 1 loop /snap/gtk-common-themes/1519
loop6 7:6 0 51M 1 loop /snap/snap-store/547
loop7 7:7 0 32.4M 1 loop /snap/snapd/13270
loop8 7:8 0 32.5M 1 loop /snap/snapd/13640
loop9 7:9 0 55.4M 1 loop /snap/core18/2128
loop10 7:10 0 2.9G 1 loop
├─loop10p1 259:0 0 2.9G 1 part /media/osintgoat2/Ubuntu 20.04.3 LTS amd641
└─loop10p2 259:1 0 3.9M 1 part
loop11 7:11 0 2.9G 1 loop
├─loop11p1 259:2 0 2.9G 1 part /media/osintgoat2/Ubuntu 20.04.3 LTS amd642
└─loop11p2 259:3 0 3.9M 1 part
loop12 7:12 0 2.9G 1 loop
├─loop12p1 259:4 0 2.9G 1 part /media/osintgoat2/Ubuntu 20.04.3 LTS amd643
└─loop12p2 259:5 0 3.9M 1 part
loop13 7:13 0 61.5M 1 loop /snap/authy/7
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 100M 0 part /boot/efi
├─sda2 8:2 0 16M 0 part
├─sda3 8:3 0 185.3G 0 part
├─sda4 8:4 0 498M 0 part
└─sda5 8:5 0 279.9G 0 part /
sr0 11:0 1 1024M 0 rom

Thank you! I also screwed up and did the ‘lite’ install, I should have done the recommended full Ubuntu.

I don’t have screenshot up and handy, so here is a picture for easier digest if that helps, thank you again!

No worries! I have what I need. You’ll need to run the following couple of commands:

sudo grub-install /dev/sda
sudo update-grub

Then turn off your system, remove your USB drive and try to boot normally.
Please let me know how it goes for you.:slight_smile:

1 Like

First boot no worky, but shut off, and rebooted perfect, thank you so much!!! Seems to be good to go, I knew there had to be an easier solution than what I was about to stumble through.

I greatly appreciate your help and speedy replies, love this community. Working on transitioning the family, and as many friends as possible to Linux shortly also, and hopefully on here to help each other out like this. Be well and see you around, I’m working on some RP4 NAS devices next after I set up my new machine you just helped me fix. :muscle:

Aaron

3 Likes

That’s great and I’m glad to hear it!
As always, it’s my pleasure! :smiley:

1 Like

I believe a similar thing happened to me tonight. I’ve installed Ubuntu 3 times on various computers with success. This 4th time, on an Acer laptop, will only boot up with the usb in the drive. When i restarted the laptop, then removed the usb, i get “no bootable device” on the screen.

I have no clue why this install is different. Please help when able.

Gina

1 Like

Hey Gina! Great to have you back. :slight_smile:
Question, does your Acer laptop have Secure Boot enabled? (or perhaps it has Intel RST?)
I noticed some scenarios where some drives would act like that. I faced such an issue a couple of days ago. For some reason, the BIOS would not recognize the boot structure, so I had to point it manually to the EFI file - and then it booted normally.

Another scenario would be the boot type of your Acer. Is it legacy BIOS or EFI?
You don’t have to answer right now. What I would recommend is to boot from your Live USB and select the “Try” option. Make sure you have internet access, then open up a terminal and type in:

sudo apt update
apt search boot-repair

If it produces positive results (which means it’s available), then install it via:

sudo apt install boot-repair

If nothing is found via the search command, then you can add the following repository and install it:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install boot-repair

Once installed, run it and select the first option to look for common boot issues. If there is a problem, it will notify you of what it is (and please let me know). If no error is produced, then chances are your drive’s boot sector is repaired. You can reboot and check it out.

I hope the above helps! :smiley:

Well I’m in the same boat as some others here. Attempted to install Ubuntu with dual boot with windows 10. Possibly deleted a partition that shouldn’t have been done?? Not sure. Surely not the smartest with any of this.

Can boot up Ubuntu from usb drive and reading these earlier posts, run the “lsblk” command and get these results.

Otherwise when I boot without the usb drive, I get the grub error message /grub/i386-pc/normal.mod not found message. I’ve managed to research my way through that process but the repairs made do not last and next time I boot up I have to go through all those steps again.

Thanks much. ACER ASPIRE 4830T-6678

Hey @Landers16076 and welcome to the forums!
The fastest way to repair a boot sector is via boot-repair. If all goes well, it will repair both your installation of Ubuntu and Windows.
Boot normally from your Live USB and then open up the terminal to execute the following commands, pressing Enter at the end of each line:

sudo apt-add-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install -y boot-repair

Once that is complete, press your Windows key on the keyboard and type in Boot. It will pop the Boot Repair application. Run it and select the first option that comes up - as seen below:

If all goes well - and nothing else is amiss - it will fix it for you.

Please let me know how it goes! :smiley:

Very much appreciated. I managed to find a recovery file on a flash drive. Inserted it and windows actually seemed to have repaired itself. I have recovered full use of the windows and can still dual boot to my Ubuntu. Thank you again and I will keep your response for future use if need arises.

1 Like

You are very welcome @Landers16076!
On dual or multi-boot systems, when they share a common boot-loader with Linux, Windows tends to erase it to install the M$ one. That’s why the Boot-Repair app is so handy. I have a Windows drive in my desktop, which I haven’t booted from in ages - and I’m expecting it to do the same if I have to boot into it for the darn TurboTax (for Business) that I have to do in a few days. Unless it works on my VMware installation of Windows on my Linux. If it does, the Windows drive will be history. :slight_smile:

1 Like

@vasileios let me know how that TurboTax in a VM works for you. Thanks. Cheers!

1 Like

Will do, @BigDaveAZ! The key to TurboTax for Business is its activation. For some bizarre reason, it sometimes refuses to activate on an actual Windows machine, unless it’s… very clean! The dreaded time is approaching, so I’ll let you know soon.

1 Like

vasileios, much appreciated all your help. one more question…cannot get past the password when logging in to ubutu. has correct username, i enter the password, it thinks about it for about 30 seconds, then returns to the username screen again. i’ve got the correct username and password so that’s not the issue. using dual boot with MS windows 10. thanks much.

Hey @Landers16076,
There can be a number of causes for the password not working. The fact that it does not produce a “Wrong Password” response has to do with one of the two possible issues:

  1. Something is wrong with your /home settings and the system cannot find anything to login to
  2. The password has hit a “lock” mechanism (rare, but it can happen)

The first one is the most common, and is referred to as the Login Loop.
You can solve that one via the following process:

The second issue tends to appear when you try the sudo command. Password is correct, but the system may decide that it is not. The reason that this happens is that there has been no clearing of previous logins, possibly followed by a restart. That part is very easily cleared when you hit CTRL+ALT+F3 (if you can’t login via graphic user interface), logging in normally (text allows it), and executing the command:

faillock --reset

Please let me know which method works for you. :slight_smile: