Score:-1

Can't boot Windows 10 after Ubuntu 22.04 installation

nr flag

Structure of my PC was that: SSD 0.5T (C) Windows 10 only, HDD 1TB (E, F) E part contained wastes of stale Windows 7, and F I used for user files and so on misc.

I installed Ubuntu 22.04 using this recommendations: https://medium.com/linuxforeveryone/how-to-install-ubuntu-20-04-and-dual-boot-alongside-windows-10-323a85271a73. Literally, I shrank the free part of E and used it for partitions.

After that I lost access to my Windows 10. My PC boots automatically from HDD, GRUB see Ubuntu (and Windows 7 that can't boot it, obviously). If i press f12 on boot menu, only this way let me choose SSD as boot source, but as I select it - it loads all the same GRUB. sudo update grub does not help. Boot-Repair gives me this info: https://paste.ubuntu.com/p/jJwTxtXxJj/.

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

 => Windows 7/8/10/11/2012 is installed in the MBR of /dev/sda.
 => 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 (,msdos6)/boot/grub. It also embeds following components:
    
    modules
    ---------------------------------------------
    fshelp ext2 part_msdos biosdisk
    ---------------------------------------------

sda1: __________________________________________________________________________

    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/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

sda2: __________________________________________________________________________

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

sda3: __________________________________________________________________________

    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 8 or 10
    Boot files:        /Windows/System32/winload.exe

sda4: __________________________________________________________________________

    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:        

sdb1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 7/2008: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /bootmgr /Boot/BCD

sdb2: __________________________________________________________________________

    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:        

sdb3: __________________________________________________________________________

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

sdb4: __________________________________________________________________________

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

sdb5: __________________________________________________________________________

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

sdb6: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 22.04.2 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub 
                       /boot/grub/i386-pc/core.img

sdb7: __________________________________________________________________________

    File system:       ext2
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        


================================ 3 OS detected =================================

OS#1:   Windows 7 (boot) on sdb1
OS#2:   Ubuntu 22.04.2 LTS on sdb6
OS#3:   Windows 8 or 10 on sda3

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

CPU architecture: 64-bit
Video: GK106 [GeForce GTX 660] Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller VESA VGA from NVIDIA Corporation Intel Corporation
BOOT_IMAGE of the installed session in use:
/boot/vmlinuz-5.19.0-38-generic root=UUID=8c1eacdf-ad06-471b-8500-a24e61e80775 ro quiet splash vt.handoff=7
df -Th / : /dev/sdb6      ext4   15G   13G  1.2G  92% /

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

BIOS/UEFI firmware: F3(4.6) from American Megatrends Inc.
The firmware is EFI-compatible, but this installed-session is in Legacy/BIOS/CSM mode (not in EFI mode).


64349b3622c65f495a99dbf6102496e3   sda1/Boot/bootx64.efi
a9c517741ac31962d7feb152948ad1ee   sda1/Boot/fbx64.efi
a660182adef313615746a665966d2ccc   sda1/Boot/mmx64.efi
5ddf997e8b025bfbc2009e85b32f60dc   sda1/ubuntu/grubx64.efi
a660182adef313615746a665966d2ccc   sda1/ubuntu/mmx64.efi
64349b3622c65f495a99dbf6102496e3   sda1/ubuntu/shimx64.efi
20ac8dde00311476f3755604eb0e545a   sda1/Microsoft/Boot/bootmgfw.efi
27d382c5fc21df6f4a75baed05aa1d9d   sda1/Microsoft/Boot/bootmgr.efi

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

Disks info: ____________________________________________________________________

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

Partitions info (1/3): _________________________________________________________

sdb6    : is-os,    64, apt-get,    signed grub-pc grub-efi ,   grub2,  grub-install,   grubenv-ok, update-grub,    not-far
sdb2    : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   not-far
sdb7    : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
sdb3    : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
sdb1    : is-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   not-far
sda4    : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
sda3    : is-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
sda1    : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   not-far

Partitions info (2/3): _________________________________________________________

sdb6    : isnotESP, fstab-has-goodEFI,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot
sdb2    : isnotESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot
sdb7    : isnotESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot
sdb3    : isnotESP, 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,   bootmgr,    is-winboot
sda4    : isnotESP, part-has-no-fstab,  no-nt,  no-winload, recovery-or-hidden, no-bmgr,    notwinboot
sda3    : isnotESP, part-has-no-fstab,  no-nt,  haswinload, no-recov-nor-hid,   no-bmgr,    notwinboot
sda1    : is---ESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot

Partitions info (3/3): _________________________________________________________

sdb6    : not--sepboot, with-boot,  fstab-without-boot, not-sep-usr,    with--usr,  fstab-without-usr,  std-grub.d, sdb
sdb2    : not--sepboot, no---boot,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, sdb
sdb7    : maybesepboot, no---boot,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, sdb
sdb3    : not--sepboot, no---boot,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, sdb
sdb1    : not--sepboot, no---boot,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, sdb
sda4    : 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
sda1    : not--sepboot, no---boot,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, sda

fdisk -l (filtered): ___________________________________________________________

Disk sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk identifier: DF0979DF-6938-4836-BA9E-D2CDEBA30FF8
          Start       End   Sectors   Size Type
sda1       2048    206847    204800   100M EFI System
sda2     206848    239615     32768    16M Microsoft reserved
sda3     239616 975705584 975465969 465.1G Microsoft basic data
sda4  975706112 976771071   1064960   520M Windows recovery environment
Disk sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk identifier: 0x63f3bbb2
      Boot     Start        End    Sectors   Size Id Type
sdb1  *         2048     208844     206797   101M  7 HPFS/NTFS/exFAT
sdb2          208848    6604580    6395733     3G  7 HPFS/NTFS/exFAT
sdb3       614405928 1953525167 1339119240 638.5G  7 HPFS/NTFS/exFAT
sdb4         6604798  614404095  607799298 289.8G  5 Extended
sdb5         6604800   14604287    7999488   3.8G 82 Linux swap / Solaris
sdb6        14606336   46604287   31997952  15.3G 83 Linux
sdb7        46606336  614404095  567797760 270.7G 83 Linux
Partition table entries are not in disk order.

parted -lm (filtered): _________________________________________________________

sda:500GB:scsi:512:512:gpt:ATA WDC WDS500G2B0A:;
1:1049kB:106MB:105MB:fat32:EFI system partition:boot, esp;
2:106MB:123MB:16.8MB::Microsoft reserved partition:msftres;
3:123MB:500GB:499GB:ntfs:Basic data partition:msftdata;
4:500GB:500GB:545MB:ntfs::hidden, diag;
sdb:1000GB:scsi:512:4096:msdos:ATA TOSHIBA DT01ACA1:;
1:1049kB:107MB:106MB:ntfs::boot;
2:107MB:3382MB:3275MB:ntfs::;
4:3382MB:315GB:311GB:::;
5:3382MB:7477MB:4096MB:linux-swap(v1)::;
6:7478MB:23.9GB:16.4GB:ext4::;
7:23.9GB:315GB:291GB:ext2::;
3:315GB:1000GB:686GB:ntfs::;

blkid (filtered): ______________________________________________________________

NAME   FSTYPE   UUID                                 PARTUUID                             LABEL                    PARTLABEL
sda                                                                                                                
├─sda1 vfat     128E-A4D9                            711e7e9d-b91f-4db3-afc3-20a6432f3c8c                          EFI system partition
├─sda2                                               e80b9080-42e7-4bc4-a76b-c9f1eee0f361                          Microsoft reserved partition
├─sda3 ntfs     18328F59328F3B30                     19d0a356-7f57-4eee-bb11-e114ab3840da                          Basic data partition
└─sda4 ntfs     E462908662905F5C                     15c30c63-698b-4843-b354-01bf06ed4456                          
sdb                                                                                                                
├─sdb1 ntfs     5A2034F12034D62B                     63f3bbb2-01                          Зарезервировано системой 
├─sdb2 ntfs     CC5A9AD95A9ABF9E                     63f3bbb2-02                          Новый том                
├─sdb3 ntfs     447039BC7039B590                     63f3bbb2-03                                                   
├─sdb4                                               63f3bbb2-04                                                   
├─sdb5 swap     39c16168-6904-4518-843e-0a4d3e588c0f 63f3bbb2-05                                                   
├─sdb6 ext4     8c1eacdf-ad06-471b-8500-a24e61e80775 63f3bbb2-06                                                   
└─sdb7 ext2     ab28032f-387c-498b-9774-18e3c3c7e044 63f3bbb2-07                                                   

Mount points (filtered): _______________________________________________________

                                Avail Use% Mounted on
/dev/sda1                       64.9M  32% /mnt/boot-sav/sda1
/dev/sda3                      309.8G  33% /mnt/boot-sav/sda3
/dev/sda4                       88.6M  83% /mnt/boot-sav/sda4
/dev/sdb1                         74M  27% /mnt/boot-sav/sdb1
/dev/sdb2                          3G   3% /mnt/boot-sav/sdb2
/dev/sdb3                      331.1G  48% /mnt/boot-sav/sdb3
/dev/sdb6                        1.2G  87% /
/dev/sdb7                        247G   2% /home

Mount options (filtered): ______________________________________________________


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

search.fs_uuid 8c1eacdf-ad06-471b-8500-a24e61e80775 root hd1,msdos6 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

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

Ubuntu   8c1eacdf-ad06-471b-8500-a24e61e80775
Ubuntu, with Linux 5.19.0-38-generic   8c1eacdf-ad06-471b-8500-a24e61e80775
Ubuntu, with Linux 5.19.0-32-generic   8c1eacdf-ad06-471b-8500-a24e61e80775
Windows 7 (on sdb1)   5A2034F12034D62B
### END /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_uefi-firmware ###

========================== sdb6/etc/fstab (filtered) ===========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb6 during installation
UUID=8c1eacdf-ad06-471b-8500-a24e61e80775 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=128E-A4D9  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sdb7 during installation
UUID=ab28032f-387c-498b-9774-18e3c3c7e044 /home           ext2    defaults        0       2
# swap was on /dev/sdb5 during installation
UUID=39c16168-6904-4518-843e-0a4d3e588c0f none            swap    sw              0       0

======================= sdb6/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=""

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

           GiB - GB             File                                 Fragment(s)
  21.580150604 = 23.171510272   boot/grub/grub.cfg                             1
  13.568828583 = 14.569418752   boot/grub/i386-pc/core.img                     1
  13.601192474 = 14.604169216   boot/vmlinuz                                   1
  12.171504974 = 13.069053952   boot/vmlinuz-5.19.0-32-generic                 1
  13.601192474 = 14.604169216   boot/vmlinuz-5.19.0-38-generic                 1
  12.171504974 = 13.069053952   boot/vmlinuz.old                               1
  18.837516785 = 20.226629632   boot/initrd.img                                1
  18.204616547 = 19.547058176   boot/initrd.img-5.19.0-32-generic              1
  18.837516785 = 20.226629632   boot/initrd.img-5.19.0-38-generic              1
  18.204616547 = 19.547058176   boot/initrd.img.old                            1

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

-rwxr-xr-x 1 root root 18683 Dec  2 18:18 10_linux
-rwxr-xr-x 1 root root 43031 Dec  2 18:18 10_linux_zfs
-rwxr-xr-x 1 root root 14180 Dec  2 18:18 20_linux_xen
-rwxr-xr-x 1 root root 13369 Dec  2 18:18 30_os-prober
-rwxr-xr-x 1 root root  1372 Dec  2 18:18 30_uefi-firmware
-rwxr-xr-x 1 root root   700 Sep 20  2022 35_fwupd
-rwxr-xr-x 1 root root   214 Dec  2 18:18 40_custom
-rwxr-xr-x 1 root root   215 Dec  2 18:18 41_custom



Suggested repair: ______________________________________________________________

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

Blockers in case of suggested repair: __________________________________________

WindowsEFI detected. Please disable BIOS-compatibility/CSM/Legacy mode in your UEFI firmware, and use this software from a live-CD (or live-USB) that is compatible with UEFI booting mode. For example, use a live-USB of Boot-Repair-Disk-64bit (www.sourceforge.net/p/boot-repair-cd), after making sure your BIOS is set up to boot USB in EFI mode. 

Final advice in case of suggested repair: ______________________________________

Please do not forget to make your UEFI firmware boot on the Ubuntu 22.04.2 LTS entry (sda1/efi/****/grub****.efi (**** will be updated in the final message) file) !
If your computer reboots directly into Windows, try to change the boot order in your UEFI firmware.
If your UEFI firmware does not allow to change the boot order, change the default boot entry of the Windows bootloader.
For example you can boot into Windows, then type the following command in an admin command prompt:
bcdedit /set {bootmgr} path \EFI\****\grub****.efi (**** will be updated in the final message)
The boot of your PC is in BIOS-compatibility/CSM/Legacy mode. You may want to retry after changing it to UEFI mode.

Edited: problem is solved at the moment, many thanks to oldfred and other expirienced users. I tried boot-repair through Ubuntu and throug liveUSB booting - it gives me wrong old Win 7 boot entry. Then I disabled Legacy mode, boot Ubuntu, update GRUB and it finds the required Win 10 boot entry.

karel avatar
sa flag
Does this answer your question? [Unable to boot into Windows after installing Ubuntu, how to fix?](https://askubuntu.com/questions/217904/unable-to-boot-into-windows-after-installing-ubuntu-how-to-fix)
David avatar
cn flag
@karel you type was faster then I do. lol
ksolo0203 avatar
nr flag
i am trying my best and downloading boot-repair iso in order to make liveUSB. Inform you later, guys!
oldfred avatar
cn flag
Do not mix UEFI & BIOS boot. You show both BIOS boot loaders in MBR and UEFI boot loaders in the ESP - efi system partition. And you booted live installer in BIOS mode. Since Windows is UEFI, you never should use BIOS boot and then BIOS boot loaders in MBR would never bee used. Reboot live installer in UEFI mode & make sure most current update to grub is in UEFI mode. You should be able to boot both Ubuntu & Windows directly from UEFI boot menu.
ksolo0203 avatar
nr flag
I am sorry, friends, but i do not understand. Oldfred, which live installer do you mean, i have to boot in UEFI mode? What that live installer is? And how to assure that my "current update to grub is in UEFI mode"?
Philipp Ludwig avatar
tr flag
It would be good if you post your solution as an answer, for future visitors, instead of editing it into the question.
Score:0
nr flag

Problem is solved at the moment, many thanks to oldfred and other expirienced users. I tried boot-repair through Ubuntu and throug liveUSB booting - it gives me wrong old Win 7 boot entry. Then I disabled Legacy mode, boot Ubuntu, update GRUB and it finds the required Win 10 boot entry.

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.