Page 1 of 6 123 ... LastLast
Results 1 to 10 of 59

Thread: Can not get GRUB or EFI to install and work

  1. #1
    Join Date
    Sep 2009
    Location
    London
    Beans
    1,073

    Can not get GRUB or EFI to install and work

    I was having some issues with my PC, and ended up having to rebuild it. It runs on a Rampage V motherboard and has 2 x 1Tb hard drives. One solely for storing images and videos, and the other split between OS sda1, Documents (general)sda2, SWAP sda4, expansion sda3, spare block sda6, Games sda5.

    I downloaded the latest ubuntu 20:10 iso build and burned it on to an SDCard and tried installing which installs but says GRUB and sometime EFI has failed to install. I have tried to fix using the latest Boot Repair which loads and goes through the repair process, but then always fails. I have tried running in trial mode and copying files over. I have tried running these instructions from various forums:

    In Grub Rescue

    HTML Code:
    type:
    set
    Result =
    cmdpath=(hd0)
    prefix=(hd0,msdos1)/grub
    root=hd0,msdos1
    
    Type:
    set prefix=(hd0,msdos1)/grub
    insmod normal
    normal
    
    grub-install
    
    or
    
    copy /usr/lib/grub/i386-pc to /boot/grub
    
    cp -r /usr/lib/grub/i386-pc /boot/grub
    
    or
    
    from live CD type
    
    sudo mount /dev/sda1 /mnt
    sudo grub-install - -boot-directory=/mnt  /dev/sda
    sudo reboot
    
    or
    
    in this grub rescue> command line type
    ls
    ... to list all available devices, then you have to go through each, type something like (depends what is shown by the ls command):
    ls (hd0,1)/
    ls (hd0,2)/ 
    ... and so on, until you find
    (hd0,1)/boot/grub   OR (hd0,1)/grub
    In case of efi
    (hd0,1)/efi/boot/grub OR (hd0,1)/efi/grub
    ... now set the boot parameters accordingly, just type this with the correct numbers and after each line press return
    set prefix=(hd0,1)/grub
    or (if grub is in a sub-directory)
    set prefix=(hd0,1)/boot/grub
    
    Then continue with
    
    set root=(hd0,1)
    
    insmod linux
    
    insmod normal
    
    normal
    
    Now it should boot. Start a command-line now (a terminal) and execute
    
    sudo update-grub
    Nothing is working for me. Even tried the last xUbuntu build both installing and copying GRUB...
    I also get another message, which is concerning... something like "can't find /boot/grub/i836-pc/normal.mod" Most worrying is this is a 64bit machine!


    20210206_122248.jpg20210206_122642.jpg

  2. #2
    Join Date
    Sep 2009
    Location
    London
    Beans
    1,073

    Re: Can not get GRUB or EFI to install and work

    GRUB RESCUE report

    Code:
                            boot-repair-4ppa125                                              [20210206_1348]
    
    ============================= Boot Repair Summary ==============================
    
    
    
    
    =================== /boot detected. Please check the options.
    
    Recommended repair: ____________________________________________________________
    
    The default repair of the Boot-Repair utility will reinstall the grub-efi-amd64-signed of
    sda1,
    using the following options:        sda6/boot/efi,
    Additional repair will be performed: unhide-bootmenu-10s  use-standard-efi-file
    
    
    /boot/efi added in sda1/fstab
    Mount sda6 on /mnt/boot-sav/sda1/boot/efi
    
    Unhide GRUB boot menu in sda1/etc/default/grub
    
    ================= Reinstall the grub-efi-amd64-signed of sda1 ==================
    
    grub-install --version
    grub-install (GRUB) 2.04-1ubuntu26.8
    
    efibootmgr -v from chroot before grub install
    BootCurrent: 0005
    Timeout: 1 seconds
    BootOrder: 0005,0003,0004
    Boot0003* CD/DVD Drive     BBS(CDROM,,0x0)AMGOAMNO........o.A.S.U.S. . . . . .D.R.W.-.2.4.F.1.S.T. . . .a....................A...........................>..Gd-.;.A..MQ..L.1.S.A.3.8.6.F.E.0.B.1.0.X.8. . . . . . ......AMBOAMNO........o.A.S.U.S. . . . . .D.R.W.-.2.4.F.1.S.T. . . .a....................A...........................>..Gd-.;.A..MQ..L.1.S.A.3.8.6.F.E.0.B.1.0.N.8. . . . . . ......AMBO
    Boot0004* Hard Drive     BBS(HD,,0x0)AMGOAMNO..........S.T.1.0.0.0.D.X.0.0.1.-.1.C.M.1.6.2....................A........................1.N........>.;.....................:..Gd-.;.A..MQ..L.S.T.1.0.0.0.D.X.0.0.1.-.1.C.M.1.6.2......AMBOAMNO..........S.T.1.0.0.0.D.X.0.0.1.-.1.C.M.1.6.2....................A........................1.N........>.;.....................:..Gd-.;.A..MQ..L.S.T.1.0.0.0.D.X.0.0.1.-.1.C.M.1.6.2......AMBO
    Boot0005* UEFI: ASUS     DRW-24F1ST   a    PciRoot(0x0)/Pci(0x1f,0x2)/Sata(4,65535,0)/CDROM(1,0xc16a5,0x1f00)AMBO
    
    uname -r
    5.4.0-26-generic
    
    grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot
    Installing for x86_64-efi platform.
    grub-install: warning: Internal error.
    grub-install: error: failed to register the EFI boot entry: Operation not permitted.
    Exit code: 1
    df /dev/sda6
    mv /mnt/boot-sav/sda1/boot/efi/EFI/Boot/bootx64.efi /mnt/boot-sav/sda1/boot/efi/EFI/Boot/bkpbootx64.efi
    cp /mnt/boot-sav/sda1/boot/efi/EFI/ubuntu/shimx64.efi /mnt/boot-sav/sda1/boot/efi/EFI/Boot/bootx64.efi
    cp /mnt/boot-sav/sda1/boot/efi/EFI/ubuntu/grubx64.efi /mnt/boot-sav/sda1/boot/efi/EFI/Boot/
    
    grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot
    Installing for x86_64-efi platform.
    grub-install: warning: Internal error.
    grub-install: error: failed to register the EFI boot entry: Operation not permitted.
    Exit code: 1
    
    ---- Grub-install recheck
    
    /sbin/grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot --recheck
    Installing for x86_64-efi platform.
    /sbin/grub-install: warning: Internal error.
    /sbin/grub-install: error: failed to register the EFI boot entry: Operation not permitted.
    Exit code: 1
    ---- End of grub-install recheck
    
    
    efibootmgr -v from chroot after grub install
    BootCurrent: 0005
    Timeout: 1 seconds
    BootOrder: 0005,0003,0004
    Boot0003* CD/DVD Drive     BBS(CDROM,,0x0)AMGOAMNO........o.A.S.U.S. . . . . .D.R.W.-.2.4.F.1.S.T. . . .a....................A...........................>..Gd-.;.A..MQ..L.1.S.A.3.8.6.F.E.0.B.1.0.X.8. . . . . . ......AMBOAMNO........o.A.S.U.S. . . . . .D.R.W.-.2.4.F.1.S.T. . . .a....................A...........................>..Gd-.;.A..MQ..L.1.S.A.3.8.6.F.E.0.B.1.0.N.8. . . . . . ......AMBO
    Boot0004* Hard Drive     BBS(HD,,0x0)AMGOAMNO..........S.T.1.0.0.0.D.X.0.0.1.-.1.C.M.1.6.2....................A........................1.N........>.;.....................:..Gd-.;.A..MQ..L.S.T.1.0.0.0.D.X.0.0.1.-.1.C.M.1.6.2......AMBOAMNO..........S.T.1.0.0.0.D.X.0.0.1.-.1.C.M.1.6.2....................A........................1.N........>.;.....................:..Gd-.;.A..MQ..L.S.T.1.0.0.0.D.X.0.0.1.-.1.C.M.1.6.2......AMBO
    Boot0005* UEFI: ASUS     DRW-24F1ST   a    PciRoot(0x0)/Pci(0x1f,0x2)/Sata(4,65535,0)/CDROM(1,0xc16a5,0x1f00)AMBO
    Error: NVram is locked (Ubuntu not found in efibootmgr).
    
    chroot /mnt/boot-sav/sda1 update-grub
    Sourcing file `/etc/default/grub'
    Sourcing file `/etc/default/grub.d/init-select.cfg'
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-5.4.0-26-generic
    Found initrd image: /boot/initrd.img-5.4.0-26-generic
    Adding boot menu entry for UEFI Firmware Settings
    
    Unhide GRUB boot menu in sda1/boot/grub/grub.cfg
    
    An error occurred during the repair.
    
    Locked-NVram detected. Please disable SecureBoot in the BIOS. Then try again.
    
    
    ============================ Boot Info After Repair ============================
    
     => 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 (,msdos6)/boot/grub. It also embeds following components:
        
        modules
        ---------------------------------------------------------------------------
        fshelp fat part_msdos biosdisk
        ---------------------------------------------------------------------------
     => Grub2 (v2.00) is installed in the MBR of /dev/sdb and looks at sector 1 of 
        the same hard drive for core.img. core.img is at this location and looks 
        for /grub. It also embeds following components:
        
        modules
        ---------------------------------------------------------------------------
        fshelp ext2 part_msdos biosdisk search_fs_uuid
        ---------------------------------------------------------------------------
        
        config script
        ---------------------------------------------------------------------------
        search.fs_uuid ab34b4b4-72dd-4f56-8ecb-6f23fea2d37d root hd0,msdos1 
        set prefix=($root)'/grub'
        
        ---------------------------------------------------------------------------
    
    sda1: __________________________________________________________________________
    
        File system:       ext4
        Boot sector type:  -
        Boot sector info: 
        Operating System:  Ubuntu 20.04 LTS
        Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub 
                           /boot/grub/i386-pc/core.img
    
    sda2: __________________________________________________________________________
    
        File system:       ext4
        Boot sector type:  -
        Boot sector info: 
        Operating System:  
        Boot files:        /grub/grub.cfg
    
    sda3: __________________________________________________________________________
    
        File system:       Extended Partition
        Boot sector type:  -
        Boot sector info: 
    
    sda5: __________________________________________________________________________
    
        File system:       ext4
        Boot sector type:  -
        Boot sector info: 
        Operating System:  
        Boot files:        
    
    sda6: __________________________________________________________________________
    
        File system:       vfat
        Boot sector type:  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/grubx64.efi 
                           /efi/BOOT/mmx64.efi /efi/ubuntu/grubx64.efi 
                           /efi/ubuntu/mmx64.efi /efi/ubuntu/shimx64.efi 
                           /efi/ubuntu/grub.cfg /boot/grub/i386-pc/core.img
    
    sda4: __________________________________________________________________________
    
        File system:       swap
        Boot sector type:  -
        Boot sector info: 
    
    sdb1: __________________________________________________________________________
    
        File system:       ext4
        Boot sector type:  -
        Boot sector info: 
        Operating System:  
        Boot files:        
    
    
    ================================ 1 OS detected =================================
    
    OS#1:   Ubuntu 20.04 LTS on sda1
    
    ============================ Architecture/Host Info ============================
    
    CPU architecture: 64-bit
    Live-session OS is Ubuntu 64-bit (Ubuntu 20.04 LTS, focal, x86_64)
    
    
    ===================================== UEFI =====================================
    
    BIOS is EFI-compatible, and is setup in EFI-mode for this live-session.
    SecureBoot enabled.
    
    efibootmgr -v
    BootCurrent: 0005
    Timeout: 1 seconds
    BootOrder: 0005,0003,0004
    Boot0003* CD/DVD Drive     BBS(CDROM,,0x0)AMGOAMNO........o.A.S.U.S. . . . . .D.R.W.-.2.4.F.1.S.T. . . .a....................A...........................>..Gd-.;.A..MQ..L.1.S.A.3.8.6.F.E.0.B.1.0.X.8. . . . . . ......AMBOAMNO........o.A.S.U.S. . . . . .D.R.W.-.2.4.F.1.S.T. . . .a....................A...........................>..Gd-.;.A..MQ..L.1.S.A.3.8.6.F.E.0.B.1.0.N.8. . . . . . ......AMBO
    Boot0004* Hard Drive     BBS(HD,,0x0)AMGOAMNO..........S.T.1.0.0.0.D.X.0.0.1.-.1.C.M.1.6.2....................A........................1.N........>.;.....................:..Gd-.;.A..MQ..L.S.T.1.0.0.0.D.X.0.0.1.-.1.C.M.1.6.2......AMBOAMNO..........S.T.1.0.0.0.D.X.0.0.1.-.1.C.M.1.6.2....................A........................1.N........>.;.....................:..Gd-.;.A..MQ..L.S.T.1.0.0.0.D.X.0.0.1.-.1.C.M.1.6.2......AMBO
    Boot0005* UEFI: ASUS     DRW-24F1ST   a    PciRoot(0x0)/Pci(0x1f,0x2)/Sata(4,65535,0)/CDROM(1,0xc16a5,0x1f00)AMBO
    
    2895d47544fd587b26c7e29be1295c27   sda6/BOOT/fbx64.efi
    dc3c47be2f78a78e5e57d097ae6c5c84   sda6/BOOT/mmx64.efi
    637fa7fabc8a2f70312edf2f15e275ff   sda6/ubuntu/grubx64.efi
    dc3c47be2f78a78e5e57d097ae6c5c84   sda6/ubuntu/mmx64.efi
    78415fb8fb9b909f8029858113f1335f   sda6/ubuntu/shimx64.efi
    78415fb8fb9b909f8029858113f1335f   sda6/BOOT/BOOTX64.efi
    
    
    ============================= Drive/Partition Info =============================
    
    Disks info: ____________________________________________________________________
    
    sda    : notGPT,    no-BIOSboot,    has---ESP,     not-usb,    not-mmc, has-os,    2048 sectors * 512 bytes
    sdb    : notGPT,    no-BIOSboot,    has-noESP,     not-usb,    not-mmc, no-os,    2048 sectors * 512 bytes
    
    Partitions info (1/3): _________________________________________________________
    
    sda1    : is-os,    64, apt-get,    signed grub-pc grub-efi ,    grub2,    grub-install,    grubenv-ok,    update-grub,    farbios
    sda2    : no-os,    32, nopakmgr,    no-docgrub,    nogrub,    nogrubinstall,    grubenv-ok,    noupdategrub,    farbios
    sda5    : no-os,    32, nopakmgr,    no-docgrub,    nogrub,    nogrubinstall,    no-grubenv,    noupdategrub,    farbios
    sda6    : no-os,    32, nopakmgr,    no-docgrub,    nogrub,    nogrubinstall,    no-grubenv,    noupdategrub,    farbios
    sdb1    : no-os,    32, nopakmgr,    no-docgrub,    nogrub,    nogrubinstall,    no-grubenv,    noupdategrub,    farbios
    
    Partitions info (2/3): _________________________________________________________
    
    sda1    : isnotESP,    fstab-has-goodEFI,    no-nt,    no-winload,    no-recov-nor-hid,    no-bmgr,    notwinboot
    sda2    : isnotESP,    part-has-no-fstab,    no-nt,    no-winload,    no-recov-nor-hid,    no-bmgr,    notwinboot
    sda5    : isnotESP,    part-has-no-fstab,    no-nt,    no-winload,    no-recov-nor-hid,    no-bmgr,    notwinboot
    sda6    : is---ESP,    part-has-no-fstab,    no-nt,    no-winload,    no-recov-nor-hid,    no-bmgr,    notwinboot
    sdb1    : isnotESP,    part-has-no-fstab,    no-nt,    no-winload,    no-recov-nor-hid,    no-bmgr,    notwinboot
    
    Partitions info (3/3): _________________________________________________________
    
    sda1    : not-sepboot,    with-boot,    fstab-without-boot,    not-sep-usr,    with--usr,    fstab-without-usr,    std-grub.d,    sda
    sda2    : is-sepboot,    no-boot,    part-has-no-fstab,    not-sep-usr,    no---usr,    part-has-no-fstab,    std-grub.d,    sda
    sda5    : maybesepboot,    no-boot,    part-has-no-fstab,    not-sep-usr,    no---usr,    part-has-no-fstab,    std-grub.d,    sda
    sda6    : not-sepboot,    no-kernel,    part-has-no-fstab,    not-sep-usr,    no---usr,    part-has-no-fstab,    std-grub.d,    sda
    sdb1    : maybesepboot,    no-boot,    part-has-no-fstab,    not-sep-usr,    no---usr,    part-has-no-fstab,    std-grub.d,    sdb
    
    fdisk -l (filtered): ___________________________________________________________
    
    Disk sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
    Disk identifier: 0x0009b5f7
          Boot      Start        End    Sectors   Size Id Type
    sda1             2048  266649599  266647552 127.2G 83 Linux
    sda2        266649600 1350946815 1084297216   517G 83 Linux
    sda3       1422628862 1953523711  530894850 253.2G  5 Extended
    sda4       1350946816 1422626815   71680000  34.2G 82 Linux swap / Solaris
    sda5       1432926208 1953523711  520597504 248.2G 83 Linux
    sda6  *    1422628864 1432926207   10297344   4.9G ef EFI (FAT-12/16/32)
    Partition table entries are not in disk order.
    Disk sdb: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
    Disk identifier: 0x0007c84e
          Boot Start        End    Sectors   Size Id Type
    sdb1        2048 1953523711 1953521664 931.5G 83 Linux
    
    parted -lm (filtered): _________________________________________________________
    
    sda:1000GB:scsi:512:4096:msdos:ATA ST1000DX001-1CM1:;
    1:1049kB:137GB:137GB:ext4::;
    2:137GB:692GB:555GB:ext4::;
    4:692GB:728GB:36.7GB:linux-swap(v1)::;
    3:728GB:1000GB:272GB:::;
    6:728GB:734GB:5272MB:fat32::boot, esp;
    5:734GB:1000GB:267GB:ext4::;
    sdb:1000GB:scsi:512:4096:msdos:ATA ST1000DX001-1CM1:;
    1:1049kB:1000GB:1000GB:ext4::;
    sr0:1663MB:scsi:2048:2048:mac:ASUS DRW-24F1ST a:;
    1:2048B:6143B:4096B::Apple:;
    2:1622MB:1627MB:4063kB::EFI:;
    
    blkid (filtered): ______________________________________________________________
    
    NAME   FSTYPE   UUID                                 PARTUUID                             LABEL                   PARTLABEL
    sda                                                                                                               
    ├─sda1 ext4     687192f6-44d3-4c70-b89b-03fa3b0260ab 0009b5f7-01                                                  
    ├─sda2 ext4     14c4cb48-f927-426d-ac55-2836a6d88848 0009b5f7-02                          Documents               
    ├─sda3                                               0009b5f7-03                                                  
    ├─sda4 swap     8847cc1b-17ef-42a3-a851-dca1cd3b520f 0009b5f7-04                                                  
    ├─sda5 ext4     9783d144-806c-4951-8254-157164f5969d 0009b5f7-05                          GAMES                   
    └─sda6 vfat     1B76-D392                            0009b5f7-06                                                  
    sdb                                                                                                               
    └─sdb1 ext4     49edc58d-2c86-4524-b850-0b872ada1114 0007c84e-01                          Tv and Video Rec        
    
    df (filtered): _________________________________________________________________
    
           Avail Use% Mounted on
    sda1     113G   4% /mnt/boot-sav/sda1
    sda2   476.3G   1% /mnt/boot-sav/sda2
    sda5   216.3G   6% /mnt/boot-sav/sda5
    sda6     4.9G   0% /mnt/boot-sav/sda6
    sdb1   869.2G   0% /mnt/boot-sav/sdb1
    
    Mount options: __________________________________________________________________
    
    sda1   rw,relatime
    sda2   rw,relatime,stripe=32746
    sda5   rw,relatime
    sda6   rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
    sdb1   rw,relatime
    
    ====================== sda1/boot/grub/grub.cfg (filtered) ======================
    
    Ubuntu   687192f6-44d3-4c70-b89b-03fa3b0260ab
    Ubuntu, with Linux 5.4.0-26-generic   687192f6-44d3-4c70-b89b-03fa3b0260ab
    ### END /etc/grub.d/30_os-prober ###
    UEFI Firmware Settings   uefi-firmware
    ### END /etc/grub.d/30_uefi-firmware ###
    
    ========================== sda1/etc/fstab (filtered) ===========================
    
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/sda1 during installation
    UUID=687192f6-44d3-4c70-b89b-03fa3b0260ab /               ext4    errors=remount-ro 0       1
    # /boot/efi was on /dev/sda6 during installation
    # swap was on /dev/sda4 during installation
    UUID=8847cc1b-17ef-42a3-a851-dca1cd3b520f none            swap    sw              0       0
    UUID=1B76-D392  /boot/efi       vfat    defaults      0       1
    
    ======================= sda1/etc/default/grub (filtered) =======================
    
    GRUB_DEFAULT=0
    GRUB_TIMEOUT_STYLE=hidden
    GRUB_TIMEOUT=10
    GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    GRUB_CMDLINE_LINUX=""
    
    ==================== sda1: Location of files loaded by Grub ====================
    
               GiB - GB             File                                 Fragment(s)
       0.000980377 = 0.001052672    boot/grub/grub.cfg                             1
     100.135765076 = 107.519959040  boot/grub/i386-pc/core.img                     1
       2.418083191 = 2.596397056    boot/vmlinuz                                   1
       2.418083191 = 2.596397056    boot/vmlinuz-5.4.0-26-generic                  1
       3.462127686 = 3.717431296    boot/initrd.img                                2
       3.462127686 = 3.717431296    boot/initrd.img-5.4.0-26-generic               2
       3.462127686 = 3.717431296    boot/initrd.img.old                            2
    
    ===================== sda1: ls -l /etc/grub.d/ (filtered) ======================
    
    -rwxr-xr-x 1 root root 17622 Jan 13 14:12 10_linux
    -rwxr-xr-x 1 root root 42359 Jan 13 14:12 10_linux_zfs
    -rwxr-xr-x 1 root root 12894 Apr 15  2020 20_linux_xen
    -rwxr-xr-x 1 root root 12059 Apr 15  2020 30_os-prober
    -rwxr-xr-x 1 root root  1424 Apr 15  2020 30_uefi-firmware
    -rwxr-xr-x 1 root root   214 Apr 15  2020 40_custom
    -rwxr-xr-x 1 root root   216 Apr 15  2020 41_custom
    
    ======================== sda2/grub/grub.cfg (filtered) =========================
    
    Ubuntu   acd94238-622c-41eb-9138-8cf7e9bd3606
    Ubuntu, with Linux 5.8.0-41-generic   acd94238-622c-41eb-9138-8cf7e9bd3606
    ### END /etc/grub.d/30_os-prober ###
    UEFI Firmware Settings   uefi-firmware
    ### END /etc/grub.d/30_uefi-firmware ###
    
    ==================== sda2: Location of files loaded by Grub ====================
    
               GiB - GB             File                                 Fragment(s)
     355.773437500 = 382.008819712  grub/grub.cfg                                  2
     127.801834106 = 137.226174464  vmlinuz                                        1
     127.801834106 = 137.226174464  vmlinuz-5.8.0-41-generic                       1
     127.801834106 = 137.226174464  vmlinuz.old                                    1
     127.881195068 = 137.311387648  initrd.img                                     2
     127.881195068 = 137.311387648  initrd.img-5.8.0-41-generic                    2
     127.881195068 = 137.311387648  initrd.img.old                                 2
    
    ===================== sda6/efi/ubuntu/grub.cfg (filtered) ======================
    
    search.fs_uuid 687192f6-44d3-4c70-b89b-03fa3b0260ab root hd0,msdos1 
    set prefix=($root)'/boot/grub'
    configfile $prefix/grub.cfg
    
    ==================== sda6: Location of files loaded by Grub ====================
    
               GiB - GB             File                                 Fragment(s)
                ?? = ??             boot/grub/i386-pc/core.img                     1
     ]

    grub-efi-amd64-signedzsudo apt-get purge grub\*
    sudo apt-get install grub-efi
    sudo apt-get autoremove
    sudo update-grub
    Last edited by jeremy31; February 6th, 2021 at 03:10 PM. Reason: fix code tags

  3. #3
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can not get GRUB or EFI to install and work

    Whiel you have UEFI system, it looks more like an old BIOS install with MBR partitions.
    UEFI suggests gpt, Microsoft has required gpt partitioning with UEFI installs since 2012. So newer hardware is UEFI.

    But both of your drives are MBR(msdos) partitioned and you show older grub boot loaders in MBRs. And now ESP - efi system partition is shown as sda6. Typically is is first or second partition but can be anywhere.

    You show UEFI Secure Boot on which prevents BIOS/CSM/Legacy boot.
    And you show this which may be Secure Boot related or a separate UEFI setting to prevent unauthorized changes.
    Error: NVram is locked (Ubuntu not found in efibootmgr).

    How you boot install and repair media UEFI or BIOS is then how it installs or repairs.

    Do you want UEFI or BIOS boot?
    If you want BIOS, you need to turn off UEFI Secure Boot and maybe change other UEFI settings.
    If you updated UEFI, it probably reset some UEFI settings to defaults & you have to redo your changes. On of my system has 6 or 7 settings I change with each UEFI update.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  4. #4
    Join Date
    Sep 2009
    Location
    London
    Beans
    1,073

    Re: Can not get GRUB or EFI to install and work

    Quote Originally Posted by oldfred View Post
    Whiel you have UEFI system, it looks more like an old BIOS install with MBR partitions.
    UEFI suggests gpt, Microsoft has required gpt partitioning with UEFI installs since 2012. So newer hardware is UEFI.
    Hello, OldFred. Lovely to hear from yo, so long.

    Quote Originally Posted by oldfred View Post
    But both of your drives are MBR(msdos) partitioned and you show older grub boot loaders in MBRs. And now ESP - efi system partition is shown as sda6. Typically is is first or second partition but can be anywhere.

    You show UEFI Secure Boot on which prevents BIOS/CSM/Legacy boot.
    And you show this which may be Secure Boot related or a separate UEFI setting to prevent unauthorized changes.
    Error: NVram is locked (Ubuntu not found in efibootmgr).

    How you boot install and repair media UEFI or BIOS is then how it installs or repairs.
    Well, it explains a lot, but TBH I just put the disc in and follow the instructions....

    Boot-Repair told me to change some settings, on the BIOS, which I followed...
    Boot Repair Message.jpg
    Quote Originally Posted by oldfred View Post
    Do you want UEFI or BIOS boot?
    If you want BIOS, you need to turn off UEFI Secure Boot and maybe change other UEFI settings.
    If you updated UEFI, it probably reset some UEFI settings to defaults & you have to redo your changes. On of my system has 6 or 7 settings I change with each UEFI update.
    Do not mind, but I guess UEFI is more future proof... So what do I need to do where and how, please?

  5. #5
    Join Date
    Sep 2009
    Location
    London
    Beans
    1,073

    Re: Can not get GRUB or EFI to install and work

    Quote Originally Posted by oldfred View Post
    Whiel you have UEFI system, it looks more like an old BIOS install with MBR partitions.
    UEFI suggests gpt, Microsoft has required gpt partitioning with UEFI installs since 2012. So newer hardware is UEFI.
    Hello, OldFred. Lovely to hear from yo, so long.

    Quote Originally Posted by oldfred View Post
    But both of your drives are MBR(msdos) partitioned and you show older grub boot loaders in MBRs. And now ESP - efi system partition is shown as sda6. Typically is is first or second partition but can be anywhere.

    You show UEFI Secure Boot on which prevents BIOS/CSM/Legacy boot.
    And you show this which may be Secure Boot related or a separate UEFI setting to prevent unauthorized changes.
    Error: NVram is locked (Ubuntu not found in efibootmgr).

    How you boot install and repair media UEFI or BIOS is then how it installs or repairs.
    Well, it explains a lot, but TBH I just put the disc in and follow the instructions....

    Boot-Repair told me to change some settings, on the BIOS, which I followed...
    Boot Repair Message.jpg
    Quote Originally Posted by oldfred View Post
    Do you want UEFI or BIOS boot?
    If you want BIOS, you need to turn off UEFI Secure Boot and maybe change other UEFI settings.
    If you updated UEFI, it probably reset some UEFI settings to defaults & you have to redo your changes. On of my system has 6 or 7 settings I change with each UEFI update.
    Do not mind, but I guess UEFI is more future proof... So what do I need to do where and how, please?

    I just found this and tried it. But it failed at the last couple of comds before reboot. Said an internal error, not allowed. Tried with Sudo too, just in case
    https://techbit.ca/2018/09/repair-grub2-efi-boot/

    Code:
    Now for the fun part.
     
    
    1. Open a terminal and mount the root partition (/) of the device containing your OS. If you only have one hard drive in your computer it is likely to be /dev/sda. $ sudo mount /dev/sda2 /mnt You can verify that this device contains your root partition (/) by doing an “ls” on the directory you mounted $ ls /mnt bin boot dev etc home initrd.img lib lib64 lost+found media mnt opt proc root run sbin snap srv sys tmp usr var vmlinuz
    2. Mount the /dev/sda1 partition as that is likely your efi partition and do an “ls” to check $ sudo mount /dev/sda1 /mnt/boot/efi $ ls /mnt/boot/efi EFI
    3. Mount the rest of the directories that GRUB needs to use to check for other operating systems, etc. We can do this one at a time with multiple commands like this: $ sudo mount -B /dev /mnt/dev $ sudo mount -B /dev/pts /mnt/dev/pts $ sudo mount -B /proc /mnt/proc $ sudo mount -B /sys /mnt/sys Or we can do this much easier in one command with the help of a for loop: $ for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
    4. Chroot into your environment $ sudo chroot /mnt
    5. Fix grub $ grub-install /dev/sda $ grub-install --recheck /dev/sda $ update-grub
    6. Now you can exit the chroot environment $ exit
    7. Turn off the computer and remove the USB stick. Then turn your computer back on. If all went according to plan your computer should boot normally into Ubuntu 18.04.
    After the computer starts, open a terminal and update all packages: $ sudo apt update && sudo apt upgrade -y If you receive an error about dpkg being interrupted you will need to run an automatic configure to fix it. $ sudo dpkg --configure -a If dpkg finishes without errors your system should be back to a fully functional state : )

  6. #6
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can not get GRUB or EFI to install and work

    As I mentioned, ESP is often first (or second) partition, but in your case it is sda6.
    So you have to mount sda6 as ESP if you are using the chroot method and not Boot-Repair.

    Code:
    Disk sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
    Disk identifier: 0x0009b5f7
          Boot      Start        End    Sectors   Size Id Type
    sda1             2048  266649599  266647552 127.2G 83 Linux
    sda2        266649600 1350946815 1084297216   517G 83 Linux
    sda3       1422628862 1953523711  530894850 253.2G  5 Extended
    sda4       1350946816 1422626815   71680000  34.2G 82 Linux swap / Solaris
    sda5       1432926208 1953523711  520597504 248.2G 83 Linux
    sda6  *    1422628864 1432926207   10297344   4.9G ef EFI (FAT-12/16/32)
    I would still turn UEFI Secure Boot off, but then you still can use UEFI (or BIOS).
    Long term, you need to plan to convert drives to gpt from the now very old MBR(msdos). I started my conversion from MBR to gpt in 2010.

    Are you using Boot-Repair ISO or Ubuntu live installer and adding the Boot-Repair ppa?
    I prefer ppa only because it often is updated and then may have fixes that ISO does not yet have.
    See option 2:
    https://help.ubuntu.com/community/Boot-Repair

    If doing the full chroot, be sure to mount correct ESP. UEFI only boots from a FAT32 partition with boot/esp flags, your sda6. So it needs the correct boot files.
    Not sure if you incorrectly installed boot files into sda1, or what that did.

    Your ESP is very large. Typically recommended size is 300 to 600MB, yours is 4.9GB. And most of the 300MB is unused and more for future use.
    I do use my ESP to have the UEFI update file for my motherboard. UEFI only reads FAT32. But I have to change default permissions to let me use it from my working system.
    Last edited by oldfred; February 6th, 2021 at 06:26 PM.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  7. #7
    Join Date
    Sep 2009
    Location
    London
    Beans
    1,073

    Re: Can not get GRUB or EFI to install and work

    Quote Originally Posted by oldfred View Post
    As I mentioned, ESP is often first (or second) partition, but in your case it is sda6.
    So you have to mount sda6 as ESP if you are using the chroot method and not Boot-Repair.

    Code:
    Disk sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
    Disk identifier: 0x0009b5f7
          Boot      Start        End    Sectors   Size Id Type
    sda1             2048  266649599  266647552 127.2G 83 Linux
    sda2        266649600 1350946815 1084297216   517G 83 Linux
    sda3       1422628862 1953523711  530894850 253.2G  5 Extended
    sda4       1350946816 1422626815   71680000  34.2G 82 Linux swap / Solaris
    sda5       1432926208 1953523711  520597504 248.2G 83 Linux
    sda6  *    1422628864 1432926207   10297344   4.9G ef EFI (FAT-12/16/32)
    I would still turn UEFI Secure Boot off, but then you still can use UEFI (or BIOS).
    Long term, you need to plan to convert drives to gpt from the now very old MBR(msdos). I started my conversion from MBR to gpt in 2010.
    It was because it already existed on the machine and when installing it said I needed an EFI partition - sometimes.
    So how do I clean up the machine to get rid of all the rubbish? ANd why doesn't the ubuntu install put the correct components?

    Will do re security

    How do I ?

    Quote Originally Posted by oldfred View Post
    Are you using Boot-Repair ISO or Ubuntu live installer and adding the Boot-Repair ppa?
    I prefer ppa only because it often is updated and then may have fixes that ISO does not yet have.
    See option 2:
    https://help.ubuntu.com/community/Boot-Repair
    iso

    Quote Originally Posted by oldfred View Post
    If doing the full chroot, be sure to mount correct ESP. UEFI only boots from a FAT32 partition with boot/esp flags, your sda6. So it needs the correct boot files.
    Not sure if you incorrectly installed boot files into sda1, or what that did.
    There seems to be files on ALMOST all partitions. How is it cleaned up?

    Quote Originally Posted by oldfred View Post
    Your ESP is very large. Typically recommended size is 300 to 600MB, yours is 4.9GB. And most of the 300MB is unused and more for future use.
    I do use my ESP to have the UEFI update file for my motherboard. UEFI only reads FAT32. But I have to change default permissions to let me use it from my working system
    I had quite a bit of space and it does not show a recommended size.

    Thank you. I shall turn off security. Run that set of cmds again, but try SDA6 instead,

  8. #8
    Join Date
    Sep 2009
    Location
    London
    Beans
    1,073

    Re: Can not get GRUB or EFI to install and work

    Tried the chroot method but couldn't mount the additional partitions it required, so rebooted into Boot-Repair after just checking in case it did work. Neither worked. Depending which of the HDs I boot from, sdc or sda I get different messages. sda I end up in Grub rescue and sdc I get a message that grub can't findxxxxx partition. "error: no such device: sb34b4b4-72dd-4f56-8ecb-6fea2d37d" and "error: unknown filesystem" "entering rescue mode" "grub rescue".

    WHAT next????

  9. #9
    Join Date
    May 2013
    Location
    Galiza
    Beans
    3,902
    Distro
    Ubuntu

    Re: Can not get GRUB or EFI to install and work

    It seems you tried to reuse the partitions from the old system. That works (eventually) if you set and install Legacy/CSM mode.
    I wouldn't do it, at all, for many reasons. I would always cleanup the drive and start fresh if coming from an old BIOS system to a new UEFI system and if using MBR before also change to GPT and this change alone would result in the intended cleanup.

    Not really a suggestion for you unless you can and want to start over and have good backups.
    I see many partitions including the absurdly large EFI partition as commented above but also an absurdly large swap partition (Ubuntu now can and by default does use a swap file instead).

    Currently and for a UEFI system only the EFI partition (FAT32 ~512MB) and / is needed. This is simplest partitioning layout. If you want - and there are good reasons for it - you can have a separated /home (probably the one you referred as "Documents"??) and an additional partition for games (why not?) can be useful for Steam and others when reinstalling/recovering the OS.

    Now, if if don't mind cleaning up the drive (musty have backups) you can start with Gparted. Device menu > Create new partition table..., select "GPT". Then you can partition in advance, always starting by the EFI partition. Then add / with the size according to your needs - it depends on the software you intend to install minus games so 30GB to 50GB should be enough. Then decide how much for you personal files (and settings) - /home - and how much for the games partition. Please note that at this point you don't need to create that partition, just leave enough unallocated space. It can be created after installing Ubuntu. ESP (EFI System Partition), / and /home are the ones you need to define before starting the installation and use "something else" to define each and every one as intended.

  10. #10
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can not get GRUB or EFI to install and work

    First need to be consistent.
    UEFI or BIOS?
    Only boot in one mode or other both live installer, Boot-Repair ISO (but I prefer installer) and settings in system UEFI or CSM/BIOS.
    the Summary Report you posted above shows the mount of an ESP in fstab. So system was/is? configured for UEFI boot.

    But if you want UEFI, then you must always boot in UEFI mode.

    If a UUID not found, it typically is booting an old version of grub which is linked to an old partition.
    So that could be booting the BIOS mode grub in MBR which is looking for your old install.

    Are you getting grub> or grub rescue> ?

    Error is correct that UUID does not exist.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

Page 1 of 6 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •