4

After running apt upgrade on Ubuntu 20.04. Either choice returns an error below. This is a windows dual boot. I have backups and I am using timeshift. I am learning but still pretty new to this.

Hoping someone can help me figure out what to do next. Should I continue without installing grub?

nvme0n1p1: entire extended partition

nvme0n1p6: mounted at /boot/efi

nvme0n1p9: filesystem root

nvme0n1p8: /home

enter image description here

enter image description here

Gparted:

enter image description here

sudo fdisk -l

    Device         Boot     Start        End    Sectors   Size Id Type
    /dev/nvme0n1p1           2046 1953523711 1953521666 931.5G  5 Extended
    /dev/nvme0n1p5           2048   31250431   31248384  14.9G 82 Linux swap / Solar
    /dev/nvme0n1p6 *    222244864  248848383   26603520  12.7G ef EFI (FAT-12/16/32)
    /dev/nvme0n1p7      248850432  269154303   20303872   9.7G 83 Linux
    /dev/nvme0n1p8      269156352 1953523711 1684367360 803.2G 83 Linux
    /dev/nvme0n1p9       31252480  222242815  190990336  91.1G 83 Linux

Device Start End Sectors Size Type /dev/nvme1n1p1 2048 534527 532480 260M EFI System /dev/nvme1n1p2 534528 567295 32768 16M Microsoft reserved /dev/nvme1n1p3 567296 998166527 997599232 475.7G Microsoft basic data /dev/nvme1n1p4 998166528 1000214527 2048000 1000M Windows recovery environmen

mmann1123
  • 115
  • 1
    Can you download and run GParted in your live session and show the results? – Raffles Jun 25 '20 at 19:00
  • 1
    Is your install UEFI or BIOS. Normally you use MBR with BIOS and gpt with UEFI, but Ubuntu (incorrectly) lets you use MBR with UEFI. If BIOS, grub remembers where to reinstall, see: https://askubuntu.com/questions/503417/how-to-prevent-ubuntu-from-overwriting-grub-bootloader-after-update/503446#503446 If UEFI, you should have mount of ESP - efi system partition in fstab and grub uses that. You have to reinstall correct version of grub, grub-pc for BIOS or grub-efi-amd64 for UEFI and have correct set of partitions. You always install grub to a drive, not a partition. – oldfred Jun 25 '20 at 19:52
  • oldfred, thanks, although I am having a hard time following. test -d /sys/firmware/efi && echo efi || echo bios returns 'efi', so I need to install grub-efi-amd64? I am seeing a possible solution here https://help.ubuntu.com/community/Boot-Repair. Please talk to me as if I don't know what I'm doing, and you wont be far off. – mmann1123 Jun 25 '20 at 20:29
  • 1
    The boot repair you mention worked for me in my dual boot system previously. You use it in a live environment. Your partitions appear to be good. – Raffles Jun 25 '20 at 22:37
  • 1
    Can you please post results from sudo fdisk -l – Ashish Jun 26 '20 at 03:15
  • Ok, i don't know how it should work, but why don't you have a separated linux partition for /boot? I thought Grub had to be installed on a Linux partition (ext4), that has to be mounted as /boot. Then the EFI partition would be mounted as /boot/efi, but i thought grub had to be installed at /boot. I'm not sure weather this is true in general, but it was surely true in my case with a dual boot (on two SSD as you) both with ubuntu 20.04. – Niccco Jun 30 '20 at 08:54

2 Answers2

3

Since you have windows installed it might have over written boot loader. try grub-install /dev/sdX, where /dev/sdX is the drive where your boot partition resides.

If you are able to boot into Ubuntu then run and then sudo os-prober and finally sudo update-grub. This should solve the problem. Post the results after doing the above.

If you are not able to boot then run a live boot session from a usb or a cd, and run the above commands.

For any more help try this.

Abhay Patil
  • 2,705
2

Apologies, I cannot comment yet.

You can try to fix the grub as I explain here.

Nandete82
  • 329