Boot Repair on Sony Vaio notebook

Hello Everybody,

I have run the boot-repair utility but unfortunately dual boot is still not possible. The system boots straight into Windows. The output of boot-repair is posted below.

boot-repair-4ppa2081                                              [20250708_1722]

============================= Boot Repair Summary ==============================





modprobe: FATAL: Module efivars not found in directory /lib/modules/6.11.0-17-generic

Recommended repair: ____________________________________________________________

The default repair of the Boot-Repair utility will reinstall the grub-efi-amd64-signed of
sda5,
using the following options:  sda1/boot/efi
Additional repair will be performed: unhide-bootmenu-10s use-standard-efi-file


/boot/efi added in sda5/fstab
Mount /dev/sda1 on /mnt/boot-sav/sda5/boot/efi

Unhide GRUB boot menu in sda5/etc/default/grub

=============== Reinstall the grub-efi-amd64-signed of /dev/sda5 ===============

chroot /mnt/boot-sav/sda5 grub-install --version
grub-install (GRUB) 2.12-1ubuntu7.3
modprobe: FATAL: Module efivars not found in directory /lib/modules/6.11.0-17-generic
chroot /mnt/boot-sav/sda5 modprobe efivars

chroot /mnt/boot-sav/sda5 efibootmgr -v (filtered) before grub install
EFI variables are not supported on this system.
error trace:


chroot /mnt/boot-sav/sda5 uname -r
6.11.0-17-generic

chroot /mnt/boot-sav/sda5 grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot
Installing for x86_64-efi platform.
grub-install: warning: EFI variables cannot be set on this system.
grub-install: warning: You will have to complete the GRUB setup manually.
Installation finished. No error reported.
df /dev/sda1
mv /mnt/boot-sav/sda5/boot/efi/EFI/Boot/bootx64.efi /mnt/boot-sav/sda5/boot/efi/EFI/Boot/bkpbootx64.efi
cp /mnt/boot-sav/sda5/boot/efi/efi/ubuntu/shimx64.efi /mnt/boot-sav/sda5/boot/efi/EFI/Boot/bootx64.efi
cp /mnt/boot-sav/sda5/boot/efi/efi/ubuntu/grubx64.efi /mnt/boot-sav/sda5/boot/efi/EFI/Boot/

chroot /mnt/boot-sav/sda5 grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot
Installing for x86_64-efi platform.
grub-install: warning: EFI variables cannot be set on this system.
grub-install: warning: You will have to complete the GRUB setup manually.
Installation finished. No error reported.

chroot /mnt/boot-sav/sda5 efibootmgr -v (filtered) after grub install
EFI variables are not supported on this system.
error trace:

Warning: NVram is locked (Ubuntu not found in efibootmgr).

chroot /mnt/boot-sav/sda5 update-grub
Sourcing file `/etc/default/grub'
Found linux image: /boot/vmlinuz-6.11.0-26-generic
Found initrd image: /boot/initrd.img-6.11.0-26-generic
Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...

Unhide GRUB boot menu in sda5/boot/grub/grub.cfg

Boot successfully repaired.

Locked-NVram detected. Please do not forget to make your UEFI firmware boot on the Ubuntu 24.04.2 LTS entry (sda1/efi/ubuntu/shimx64.efi file) !
Please disable SecureBoot in the BIOS. Then try again.


============================ Boot Info After Repair ============================

 => Windows is installed in the MBR of /dev/sda.

sda1: __________________________________________________________________________

    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 
                       /efi/Microsoft/Boot/SecureBootRecovery.efi 
                       /efi/Microsoft/Boot/bootmgfw.efi 
                       /efi/Microsoft/Boot/bootmgr.efi

sda2: __________________________________________________________________________

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

sda3: __________________________________________________________________________

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

sda4: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 24.04.2 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub

sdb: ___________________________________________________________________________

    File system:       iso9660
    Boot sector type:  Grub2 (v1.99-2.00)
    Boot sector info:  Grub2 (v1.99-2.00) is installed in the boot sector of 
                       sdb and looks at sector 0 of the same hard drive for 
                       core.img, but core.img can not be found at this 
                       location.
    Mounting failed:   mount: /mnt/BootInfo/FD/sdb: /dev/sdb already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.


================================ 2 OS detected =================================

OS#1 (linux):   Ubuntu 24.04.2 LTS on sda5
OS#2 (windows):   Windows 8 or 10 on sda3

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

CPU architecture: 64-bit
Video: GK107M [GeForce GT 640M LE] 3rd Gen Core processor Graphics Controller from NVIDIA Corporation Intel Corporation
Live-session OS is Ubuntu 64-bit (Ubuntu 24.04.2 LTS, noble, x86_64)

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

BIOS/UEFI firmware: R0081C8(0.81) from Insyde Corp.
The firmware is EFI-compatible, and is set in EFI-mode for this live-session.
SecureBoot enabled according to mokutil - Please report this message to boot.repair@gmail.com.
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 2001
Boot0000* EFI USB Device (Generic Flash Disk)	PciRoot(0x0)/Pci(0x1d,0x0)/USB(0,0)/USB(2,0)/HD(2,GPT,b0ef6ca3-60d1-4a21-98db-17c385a8b6f8,0xbce0b4,0x27a0)RC

07e25dcaf57c776875f78fa36827c58e   sda1/Boot/bkpbootx64.efi
07e25dcaf57c776875f78fa36827c58e   sda1/Boot/bootx64.efi
39bc76ff6662f4fbe9aa116e4c997b41   sda1/Boot/fbx64.efi
94c7467f956700d44c5b4dcd3967535c   sda1/Boot/grubx64.efi
4ba5a5aad43c197e9fb58b76b404d287   sda1/Boot/mmx64.efi
94c7467f956700d44c5b4dcd3967535c   sda1/ubuntu/grubx64.efi
4ba5a5aad43c197e9fb58b76b404d287   sda1/ubuntu/mmx64.efi
07e25dcaf57c776875f78fa36827c58e   sda1/ubuntu/shimx64.efi
31ae265044d7137c6a97584f14ee20ca   sda1/Microsoft/Boot/SecureBootRecovery.efi
e970c04a91e3bc49ddea159da355ca19   sda1/Microsoft/Boot/bootmgfw.efi
43c490a49204212331e78d50790912ff   sda1/Microsoft/Boot/bootmgr.efi

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

Disks info: ____________________________________________________________________

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

Partitions info (1/3): _________________________________________________________

sda1	: no-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far
sda3	: is-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	end-after-100GB
sda4	: no-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	end-after-100GB
sda5	: is-os,	64, apt-get,	signed grub-efi ,	grub2,	grub-install,	grubenv-ok,	update-grub,	end-after-100GB

Partitions info (2/3): _________________________________________________________

sda1	: is---ESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot, vfat
sda3	: isnotESP,	part-has-no-fstab,	no-nt,	haswinload,	no-recov-nor-hid,	no-bmgr,	notwinboot, ntfs
sda4	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	recovery-or-hidden,	no-bmgr,	notwinboot, ntfs
sda5	: isnotESP,	fstab-has-bad-efi,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot, ext4

Partitions info (3/3): _________________________________________________________

sda1	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sda
sda3	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sda
sda4	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sda
sda5	: not--sepboot,	with-boot,	fstab-without-boot,	not-sep-usr,	with--usr,	fstab-without-usr,	std-grub.d,	sda

fdisk -l (filtered): ___________________________________________________________

Disk sda: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk identifier: 7A8C2227-422A-48AE-8AE8-E5F2DD4C3DC6
          Start        End    Sectors  Size Type
sda1        2048     206847     204800  100M EFI System
sda2      206848     239615      32768   16M Microsoft reserved
sda3      239616 3625003007 3624763392  1.7T Microsoft basic data
sda4  3905951744 3907026943    1075200  525M Windows recovery environment
sda5  3625003008 3905951743  280948736  134G Linux filesystem
Partition table entries are not in disk order.
Disk sdb: 7.52 GiB, 8074035200 bytes, 15769600 sectors
Disk identifier: B0EF6CA3-60D1-4A21-98D9-17C385A8B6F8
        Start      End  Sectors  Size Type
sdb1        64 12378291 12378228  5.9G Microsoft basic data
sdb2  12378292 12388435    10144    5M EFI System
sdb3  12388436 12389035      600  300K Microsoft basic data
sdb4  12390400 15767551  3377152  1.6G Linux filesystem

parted -lm (filtered): _________________________________________________________

sda:2000GB:scsi:512:512:gpt:ATA Samsung SSD 870:;
1:1049kB:106MB:105MB:fat32:EFI system partition:boot, esp, no_automount;
2:106MB:123MB:16.8MB::Microsoft reserved partition:msftres, no_automount;
3:123MB:1856GB:1856GB:ntfs:Basic data partition:msftdata;
5:1856GB:2000GB:144GB:ext4::;
4:2000GB:2000GB:551MB:ntfs::hidden, diag, no_automount;
sdb:8074MB:scsi:512:512:gpt:Generic Flash Disk:;
1:32.8kB:6338MB:6338MB::ISO9660:hidden, msftdata;
2:6338MB:6343MB:5194kB::Appended2:boot, esp;
3:6343MB:6343MB:307kB::Gap1:hidden, msftdata;
4:6344MB:8073MB:1729MB:ext4::;

blkid (filtered): ______________________________________________________________

NAME   FSTYPE   UUID                                 PARTUUID                             LABEL                    PARTLABEL
sda                                                                                                                
├─sda1 vfat     205C-A4DB                            5c30bdf9-8ccf-4e9c-a02b-f43202ba4c4b                          EFI system partition
├─sda2                                               190e2b3c-c6d9-4b1e-afd6-9217ebe3a022                          Microsoft reserved partition
├─sda3 ntfs     360A5F910A5F4D4D                     7c1685e2-e824-461d-b7f8-722d3ada0185                          Basic data partition
├─sda4 ntfs     D63ED3883ED36053                     910a113e-973d-4d0f-b067-96e9662bf6aa                          
└─sda5 ext4     c62fa5f0-3270-4336-9aa8-1840ce1ce9bb e8ffdb27-1ecc-430d-8382-755e88a08e30                          
sdb    iso9660  2025-02-15-09-15-26-00                                                    Ubuntu 24.04.2 LTS amd64 
├─sdb1 iso9660  2025-02-15-09-15-26-00               b0ef6ca3-60d1-4a21-98d8-17c385a8b6f8 Ubuntu 24.04.2 LTS amd64 ISO9660
├─sdb2 vfat     B5A5-8010                            b0ef6ca3-60d1-4a21-98db-17c385a8b6f8 ESP                      Appended2
├─sdb3                                               b0ef6ca3-60d1-4a21-98da-17c385a8b6f8                          Gap1
└─sdb4 ext4     aef66346-333b-4381-81d4-0328ef24c9c9 49e9f9c0-2130-4066-836c-393ed6678002 writable                 

Mount points (filtered): _______________________________________________________

                                                               Avail Use% Mounted on
/dev/sda1                                                      61.1M  36% /mnt/boot-sav/sda1
/dev/sda3                                                       1.1T  35% /mnt/boot-sav/sda3
/dev/sda4                                                      88.7M  83% /mnt/boot-sav/sda4
/dev/sda5                                                     114.5G   7% /mnt/boot-sav/sda5
/dev/sdb1                                                          0 100% /cdrom
efivarfs                                                       37.9K  53% /sys/firmware/efi/efivars

Mount options (filtered): ______________________________________________________

/dev/sda1                                                     vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
/dev/sda3                                                     fuseblk         ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/sda4                                                     fuseblk         ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/sda5                                                     ext4            rw,relatime
/dev/sdb1                                                     iso9660         ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8

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

search.fs_uuid c62fa5f0-3270-4336-9aa8-1840ce1ce9bb root hd0,gpt5 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

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

Ubuntu   c62fa5f0-3270-4336-9aa8-1840ce1ce9bb
Windows Boot Manager (on sda1)   osprober-efi-205C-A4DB
### END /etc/grub.d/30_os-prober ###
UEFI Firmware Settings   uefi-firmware
### END /etc/grub.d/30_uefi-firmware ###

========================== sda5/etc/fstab (filtered) ===========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda5 during curtin installation
/dev/disk/by-uuid/c62fa5f0-3270-4336-9aa8-1840ce1ce9bb / ext4 defaults 0 1
# /boot/efi was on /dev/sda1 during curtin installation
/swap.img	none	swap	sw	0	0
UUID=205C-A4DB  /boot/efi       vfat    defaults      0       1

======================= sda5/etc/default/grub (filtered) =======================

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || echo Ubuntu`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_DISABLE_OS_PROBER=false

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

           GiB - GB             File                                 Fragment(s)
1824.769859314 = 1959.331717120 boot/grub/grub.cfg                             1
1741.644187927 = 1870.076207104 boot/vmlinuz                                   1
1741.644187927 = 1870.076207104 boot/vmlinuz-6.11.0-26-generic                 1
1741.644187927 = 1870.076207104 boot/vmlinuz.old                               1
1794.411128998 = 1926.734278656 boot/initrd.img                                5
1794.411128998 = 1926.734278656 boot/initrd.img-6.11.0-26-generic              5
1794.411128998 = 1926.734278656 boot/initrd.img.old                            5

===================== sda5: ls -l /etc/grub.d/ (filtered) ======================

-rwxr-xr-x 1 root root 18133 Sep 11  2024 10_linux
-rwxr-xr-x 1 root root 43202 Sep 11  2024 10_linux_zfs
-rwxr-xr-x 1 root root 14513 Sep 11  2024 20_linux_xen
-rwxr-xr-x 1 root root   786 Sep 11  2024 25_bli
-rwxr-xr-x 1 root root 13120 Sep 11  2024 30_os-prober
-rwxr-xr-x 1 root root  1174 Sep 11  2024 30_uefi-firmware
-rwxr-xr-x 1 root root   722 Dec  5  2024 35_fwupd
-rwxr-xr-x 1 root root   214 Sep 11  2024 40_custom
-rwxr-xr-x 1 root root   215 Sep 11  2024 41_custom

Thanks for having another look into the topic!