Score:0

How to fix GRUB2 on Kubuntu22.04 - Ubuntu 22.04

cn flag

I'm trying to fix my computer. Boot-repair does not help me.

fdisk -l

does not show my SSD, only Windows SSD; But i can access it with live usb. My Grub folder on Kubuntu SSD for some reason is empty.

Please help me repair my grab. Here is the dump from boot-reapir: https://paste.ubuntu.com/p/7ZdFFG8XbC/

============================== Boot Info Summary ===============================

 => No boot loader is installed in the MBR of /dev/nvme0n1.
 => Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (hd0,msdos1)/boot/grub. It also embeds following components:
    
    modules
    ---------------------------------------------
    biosdisk fshelp fat exfat ext2 ntfs ntfscomp part_msdos
    ---------------------------------------------

nvme0n1p1: _____________________________________________________________________

    File system:       vfat
    Boot sector type:  Windows 8/10/11/2012: FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/Boot/bkpbootx64.efi /efi/Boot/bootx64.efi 
                       /efi/Boot/fbx64.efi /efi/Boot/mmx64.efi 
                       /efi/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi 
                       /efi/ubuntu/shimx64.efi /efi/ubuntu/grub.cfg 
                       /efi/Microsoft/Boot/bootmgfw.efi 
                       /efi/Microsoft/Boot/bootmgr.efi

nvme0n1p2: _____________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 

nvme0n1p3: _____________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 8/10/11/2012: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files:        /Windows/System32/winload.exe

nvme0n1p4: _____________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 8/10/11/2012: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  MSWIN4.1: FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /boot/grub/grub.cfg /efi/boot/bootx64.efi 
                       /efi/boot/grubx64.efi /efi/boot/mmx64.efi


================================ 1 OS detected =================================

OS#1:   Windows 7 on nvme0n1p3

================================ Host/Hardware =================================

CPU architecture: 64-bit
Video: Lucienne from Advanced Micro Devices, Inc. [AMD/ATI]
Live-session OS is Ubuntu 64-bit (Ubuntu 22.04.1 LTS, jammy, x86_64)

===================================== UEFI =====================================

BIOS/UEFI firmware: H6CN08WW(V1.01)(1.8) from LENOVO
The firmware is EFI-compatible, and is set in EFI-mode for this live-session.
SecureBoot disabled (confirmed by mokutil).
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0000,2001,2002,2003,0004,0001
Boot0000* ubuntu    HD(1,GPT,2c4c1aa0-9548-4d7b-be83-adb3c94a72ff,0x800,0x82000)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* Linpus lite   HD(1,MBR,0x12576f,0x800,0x729b800)/File(\EFI\Boot\grubx64.efi)RC
Boot0004* Windows Boot Manager  HD(1,GPT,2c4c1aa0-9548-4d7b-be83-adb3c94a72ff,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot2001* EFI USB Device    RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network   RC

728124f6ec8e22fbdbe7034812c81b95   nvme0n1p1/Boot/bkpbootx64.efi
728124f6ec8e22fbdbe7034812c81b95   nvme0n1p1/Boot/bootx64.efi
c152ec201c37b6e97bbc2207e49d1271   nvme0n1p1/Boot/fbx64.efi
fdafb5eece6caeccb788c946a28e6872   nvme0n1p1/Boot/mmx64.efi
3795ef72a4ed0369ca44e711527904bf   nvme0n1p1/ubuntu/grubx64.efi
fdafb5eece6caeccb788c946a28e6872   nvme0n1p1/ubuntu/mmx64.efi
728124f6ec8e22fbdbe7034812c81b95   nvme0n1p1/ubuntu/shimx64.efi
8059dea463802af4a57ae85af262520f   nvme0n1p1/Microsoft/Boot/bootmgfw.efi
13e60e65f1d1f8c642a61ed9be8e65bb   nvme0n1p1/Microsoft/Boot/bootmgr.efi

============================= Drive/Partition Info =============================

Disks info: ____________________________________________________________________

nvme0n1 : is-GPT,   no-BIOSboot,    has---ESP,  not-usb,    not-mmc, has-os,    has-win,    2048 sectors * 512 bytes

Partitions info (1/3): _________________________________________________________

nvme0n1p1   : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   not-far
nvme0n1p3   : is-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
nvme0n1p4   : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios

Partitions info (2/3): _________________________________________________________

nvme0n1p1   : is---ESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot
nvme0n1p3   : isnotESP, part-has-no-fstab,  no-nt,  haswinload, no-recov-nor-hid,   no-bmgr,    notwinboot
nvme0n1p4   : isnotESP, part-has-no-fstab,  no-nt,  no-winload, recovery-or-hidden, no-bmgr,    notwinboot

Partitions info (3/3): _________________________________________________________

nvme0n1p1   : not--sepboot, no-kernel,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, nvme0n1
nvme0n1p3   : not--sepboot, no-kernel,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, nvme0n1
nvme0n1p4   : not--sepboot, no---boot,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, nvme0n1

fdisk -l (filtered): ___________________________________________________________

Disk nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk identifier: D39B5350-4EA6-493F-AE0B-63F37A2BAA42
              Start        End   Sectors   Size Type
nvme0n1p1      2048     534527    532480   260M EFI System
nvme0n1p2    534528     567295     32768    16M Microsoft reserved
nvme0n1p3    567296  998166527 997599232 475.7G Microsoft basic data
nvme0n1p4 998166528 1000214527   2048000  1000M Windows recovery environment
Disk sda: 57.3 GiB, 61530439680 bytes, 120176640 sectors
Disk identifier: 0x0012576f
      Boot Start       End   Sectors  Size Id Type
sda1  *     2048 120176639 120174592 57.3G  c W95 FAT32 (LBA)

parted -lm (filtered): _________________________________________________________

sda:61.5GB:scsi:512:512:msdos:SanDisk Ultra:;
1:1049kB:61.5GB:61.5GB:fat32::boot, lba;
nvme0n1:512GB:nvme:512:512:gpt:WDC PC SN530 SDBPMPZ-512G-1101:;
1:1049kB:274MB:273MB:fat32:EFI system partition:boot, esp;
2:274MB:290MB:16.8MB::Microsoft reserved partition:msftres;
3:290MB:511GB:511GB:ntfs:Basic data partition:msftdata;
4:511GB:512GB:1049MB:ntfs::hidden, diag;

blkid (filtered): ______________________________________________________________

NAME        FSTYPE   UUID                                 PARTUUID                             LABEL       PARTLABEL
sda                                                                                                        
└─sda1      vfat     19FC-2E4D                            0012576f-01                          KUBUNTU 22_ 
nvme0n1                                                                                                    
├─nvme0n1p1 vfat     E4F8-2FCA                            2c4c1aa0-9548-4d7b-be83-adb3c94a72ff SYSTEM_DRV  EFI system partition
├─nvme0n1p2                                               a560499c-3ea7-4caf-9e95-ba4f9dc3a86e             Microsoft reserved partition
├─nvme0n1p3 ntfs     30A8F95FA8F923CE                     542ad10c-327d-4c1c-9a1a-8e48154df069 Windows-SSD Basic data partition
└─nvme0n1p4 ntfs     DC88FA3588FA0E30                     e60780ff-9d53-414a-849a-694589567da5 WINRE_DRV   Basic data partition

Mount points (filtered): _______________________________________________________

                        Avail Use% Mounted on
/dev/nvme0n1p1         219.1M  14% /mnt/boot-sav/nvme0n1p1
/dev/nvme0n1p3          39.5G  92% /mnt/boot-sav/nvme0n1p3
/dev/nvme0n1p4         497.3M  50% /mnt/boot-sav/nvme0n1p4
/dev/sda1               33.1G  42% /cdrom

Mount options (filtered): ______________________________________________________


=================== nvme0n1p1/efi/ubuntu/grub.cfg (filtered) ===================

search.fs_uuid 9b14d5b4-2b05-4163-ac02-b297457779b4 root hd0,gpt2 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

====================== sda1/boot/grub/grub.cfg (filtered) ======================

Try or Install Kubuntu
Kubuntu (safe graphics)
OEM install (for manufacturers)
Boot from next volume
UEFI Firmware Settings
Test memory

==================== sda1: Location of files loaded by Grub ====================

           GiB - GB             File                                 Fragment(s)
            ?? = ??             boot/grub/grub.cfg                             1

======================== Unknown MBRs/Boot Sectors/etc =========================


/dev/nvme0n1p1: unknown GPT attributes
8000000000000000

/dev/nvme0n1p2: unknown GPT attributes
8000000000000000

/dev/nvme0n1p4: unknown GPT attributes
8000000000000001

Suggested repair: ______________________________________________________________

The default repair of the Boot-Repair utility would not act on the MBR.
Additional repair would be performed:  win-legacy-basic-fix
kanehekili avatar
zw flag
It's called "Grub" not "Grab" - I fixed it. Will help the gurus ;-) But I guess you've installed grub (which is the bootloader) on the wrong SSD. It should be on your "windows SSD" and **not** anywhere else (aka the harddisk where your uefi thinks it should boot)
Serghei Leonenco avatar
cn flag
@kanehekili Ok, i will explain. I have MSD on my laptop with Windows 10. I connect SSD with Kubuntu 20.04. Right now i was able to repair the GRUB on Kubuntu from live , but still it does not want to go to boot, still have the same grub> screen. Can you help me with this?
kanehekili avatar
zw flag
No, I don't understand your problem. If you can execute fdisk -l, where are you? I do not know what a MSD is. I do not understand what "I connect SSD with Kubuntu" means. Please explain in your question **NOT** in the comments
oldfred avatar
cn flag
Your Ubuntu UEFI boot entry, grub.cfg wants to boot from this UUID which does not exist in report. 9b14d5b4-2b05-4163-ac02-b297457779b4. Did you delete an install, or not have a drive with install plugged in when you ran report? Only Kubuntu is in FAT32 which must be a live installer.
Score:0
cn flag

Important, You must have same distributive version live usb as the system you perform to reinstall grub (20.04--20.04; 22.04--22.04). They can not work vice versa and you may not get desired result.

Ok, i did re-installed grub finally. The way how i did was: Make sure you are administrator:

sudo -i

First locate your sdX by: fdisk -l. If it look like this let's go:

Device       Start        End    Sectors   Size Type
/dev/sda1     2048    1230847    1228800   600M EFI System
/dev/sda2  1230848    7522303    6291456     3G Linux swap
/dev/sda3  7522304 1953523711 1946001408 927.9G Linux filesystem

Let's mount our SSD:

mount /dev/sda2 /mnt

As you can see, my EFI system is located of of the main Linux filesystem, so if you will try to do this:

grud-install --boot-directory=/mnt/boot/ /dev/sda

Will result to that boot will be installed but efi will get this error NO EFI found.

To escape this mount efi to the boot location:

mount /dev/sda1 /mnt/boot/efi

Now we can do this:

grub-install --boot-directory=/mnt/boot --efi-directory=/mnt/boot/efi /dev/sda

After this manipulation you should have a grub re-installed on your SSD and you can try to boot from it.

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.