0

I’ve seen this post: GRUB starts in command line after reboot

I installed Ubuntu 20.04 LTS on my laptop which was originally running Windows 10. I wanted to replace windows completely, not dual boot, so used the erase disk option. (Though while installing I think it said I had no os installed? Possibly because I had to switch from RST to AHCI)

It wasn’t giving me the option to boot to Ubuntu so I used Boot Repair to try and fix it but now it just boots to the grub command line. I tried reinstalling Ubuntu to fix it. I can’t find the grub folder to carry out the fix given in the above question.

In my /efi/ folder I have Microsoft/ Boot/ ubuntu/

ls (hd0,3) shows all my windows folders (E.g. Program Files and Users)

I don’t understand why all my windows stuff is still there. Any help would be appreciated, I’m a complete novice with this.

I’m using an ASUS Vivobook. I didn’t take note of the Boot Repair output the first time but I tried it again and here’s the output: http://paste.ubuntu.com/p/gCHNhNBVGk/

Edit: Seen this is the paste above

For example you can boot into Windows, then type the following command in an admin command prompt: bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi

Tried to change back to RST, boot windows and do this but get

error: file /efi/Microsoft/Boot/bootmgfw.efi not found

Changed back to AHCI and it booted to windows automatic repair, so went to command line and entered command. Got

The boot configuration data store could not be opened. The requested system device cannot be found.

Edit2: After following below, the system just boots to the BIOS Utility, even after manually partitioning and installing to the harddisk. Looking at GParted, I get some errors enter image description here

enter image description here

enter image description here

I ran Boot Repair again (http://paste.ubuntu.com/p/3KpVBRfsSG) and it now loads into the grub command line again and Ubuntu is back as a boot option in the BIOS Utility.

Edit3: Finally fixed! Ran the following in the grub command

set root=(hd0, 4)
set prefix=(hd0, 4)/boot/grub/
insmode normal
normal 

Fingers crossed it continues to work after shutdown. Still a bit worried about the GParted errors though.

Edit 4: GParted errors don’t show up when on installation (instead of try Ubuntu). I have to enter the above commands each time I turn on my laptop. I tried running the following but still had to enter the commands

sudo grub-install /dev/sda
sudo apt-get update
# to update grub
sudo apt-get upgrade

Running update-grub outputs (among other things)

Found Ubuntu 20.04.1 LTS on /dev/nvme0n1p2 Is it still trying to boot from nvme instead of sda then?

Clio L
  • 1

1 Answers1

0

According to the boot-repair output, you seem to have a harddisk or SSD (sda) with a windows-setup and an NVMe (nvme0n1) with your ubuntu-setup, correct? You choose the NVMe to delete completely and install ubuntu, but your windows is still installed on sda, probably in some defect bootloader state. Thats why you still have windows installed, even when you chose to delete everything when installing ubuntu – because you deleted only the NVMe. You seem to have two EFI-Partitions, one on the NVMe and one on sda, both of them have an ubuntu.efi, probably one from the installation and one from the repair.

Having two EFI-Partitions is not exactly a problem, but you need to know what you want if you have that.

can you explain, how your configuration was when you ran windows and how you want it now? Is it possible, that your sda is a spinning harddrive and RST was using the NVMe as a caching-device?

EDIT: made a few pictures on how to delete all partitions, install ubuntu on your nvme and create a partition on the slow harddisk for big data. For some reason, my cursor is always a little bit too much north.

try ubuntu instead of install try ubuntu instead of install go to applications go to applications select the disks utility select the disks utility select your nvme, open the menu and select format disk … select your nvme, open the menu and select format quick and gpt is ok quick and gpt is ok confirm confirm and do the same on the other disk and do the same on the other disk close the utility and start the installer close the utility and start the installer install like you did before install like you did before select the nvme as installation-target select the nvme as installation-target and confirm and confirm restart after the installation restart after the installation open the disks-utility from within the installation, this should look like this open the disks-utility from within the installation select the harddisk and create partition in unallocated space [+] select the harddisk and create partition take the full size (1TB for you) take the full size give it a name and format as ext4 give it a name you can find the new partition in the file-browser at "other locations" enter image description here now you can save data there save data If you want to have it automatically mounted on boot so it appears on the left panel by default, you can set the options in the disks utility by changing the mount options automount disk-utility and disabling the session-defaults to create a persistent entry in /etc/fstab (leave everythin else default) disable session-defaults Please note: Files saved under the data-partition are much slower than the files under your home-folder but you have 1TB space. I don't know, how big your NVMe is, the support-site didn't mention it but I fear not that much. Use it for movies and music and stuff like that. And as a bonus: you can (and should) use it as a backup-drive. If your NVMe dies, you can have them still on your harddisk ;).

blaimi
  • 1,175
  • I’m not entirely sure what that all means. I just want to have Ubuntu installed on my laptop, not windows. When installing Ubuntu I didn’t choose to delete anything in particular, I just chose the erase disk and install Ubuntu option which I mistakenly thought would just replace windows with Ubuntu. – Clio L Oct 27 '20 at 00:34
  • Can you give me the name of your Laptop-model? A link to the support-page would be perfect ;) – blaimi Oct 27 '20 at 00:38
  • It’s an ASUS vivobook X510UA-EJ1227T https://uk.store.asus.com/asus-vivobook-x510ua-ej1227t-1-60ghz-i5-8250u-8th-gen-intelar-corea-i5-15-6-1366-x-768pixels-grey-notebook.html This is the closest support page I could find?

    Actually this one is for X510UA, I don’t know if there’s a difference?: https://www.asus.com/Laptops/ASUS-VivoBook-15-X510UA/HelpDesk_Download/

    – Clio L Oct 27 '20 at 00:45
  • Yep, that's like I thougt :) “It boasts a dual-storage design that combines the fast data speeds of an SSD with the large capacities of an HDD”. This is actually very nice, I have all my systems configured like this, but this is a bit tricky on linux (LVM Cache). I think the easiest way is to delete all your partitions on all your devices before installing ubuntu with the disks-utility of the live-environment. I can provide some screenshots in a few minutes. – blaimi Oct 27 '20 at 01:00
  • Hi, I was following the screenshots, installed and it restarted straight into the BIOS screen. When I go to Boot in the advanced screen, there’s no boot options and no option to add a boot option. In Boot Menu I get “The system can not find any bootable devices” – Clio L Oct 27 '20 at 06:58
  • I’m not sure if it’s just because I’m looking at it from the Try Ubuntu option and not the installation, but when I look at the nvme disk in the disk utility, it says Contents FAT (32-bit version) — Not mounted (compared to your screenshot which says Mounted at /boot/efi) – Clio L Oct 27 '20 at 07:22
  • Yes, It's the try ubuntu that it mentiones not mounted. Hmm. It seems that you can boot from the harddisk only. This means you have to use manual partitioning during setup and put the EFI-Partition on the harddisk – blaimi Oct 27 '20 at 09:51
  • Ok, how do I do that? Is it the same as the screenshots but select the hard disk instead of the nvme when selecting drive? Would it be worth trying to use Boot Repair again? – Clio L Oct 27 '20 at 09:56
  • you have to choose "something else". – blaimi Oct 27 '20 at 10:00
  • I did that and it’s still booting to BIOS utility with no bootable devices but the option to add a boot option is back. Should I try boot repair? Currently CSM Support is disabled. I’ve googled and I’m pretty sure it should be disabled but is this correct? I think secure boot is disabled too. – Clio L Oct 27 '20 at 11:05
  • I followed 6b when trying to manually partition from https://www.itzgeek.com/post/how-to-install-ubuntu-20-04-lts/ – Clio L Oct 27 '20 at 11:41
  • https://paste.ubuntu.com/p/bhdbQFfVD6 says that no boot loader is installed in the MBR of /dev/nevme0n1 or /dev/sda and that Syslinux MBR is installed in the MBR of /dev/sdb

    The default repair .. would reinstall the grub-efi-amd64-signed of nvme0n1p2 ...

    Would this fix the issue do you think?

    – Clio L Oct 27 '20 at 12:40
  • You do not want BIOS boot. And only BIOS uses boot loader in MBR. UEFI has boot files in an ESP - efi system partition. How you boot live installer UEFI or BIOS is then how it installs or repairs and you always want UEFI. Default boot setting in UEFI is for installed systems. But you have to select the UEFI: boot option of live installer each time. https://help.ubuntu.com/community/UEFI But blaimi's screen shots show the details. – oldfred Oct 27 '20 at 14:39