1

I believe my problems are 2-fold (unless they aren't) but they come from my migrating some of my HDD partitions to a new SSD drive. Using Boot-Repair I can now start Ubuntu 22.04, but Window 10 won't start, and I'm pretty sure that Grub is part of it.

The two drives I have are /dev/sda and /dev/nvme0n1. I never used any of these drive-managing tools to write to /dev/sda, so nothing should have happened to it. But if I try to boot Windows from either, it won't work.

/dev/sda consists of:

  • /dev/sda1: Linux swap
  • /dev/sda2: Linux boot
  • /dev/sda3: another ext4
  • /dev/sda4: Windows 10

/dev/nvme0n1 consists of:

  • /dev/nvme0n1p1: clone of /dev/sda2 (Linux boot)
  • /dev/nvme0n1p2: clone of /dev/sda4 (Windows 10)
  • /dev/nvme0n1p3: No file system (yet) but it's marked ext4

I've run os-prober and grub-update from /dev/nvme0n1p1 so those tools have done all they can.

Booting from /dev/nvme0n1

Grub now can access every partition on either drive, and I can start Ubuntu, but if I try to boot /dev/nvme0n1p2 or /dev/sda4 I immediately get told "A disk read error occurred // Press Ctrl-Alt-Del to restart"

Boot Repair Summary:

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

Default settings: ______________________________________________________________

The default repair of the Boot-Repair utility would reinstall the grub2 of nvme0n1p1 into the MBR of nvme0n1. Grub-efi would not be selected by default because no ESP detected. Additional repair would be performed: unhide-bootmenu-10s

Confirmation request before suggested repair: __________________________________

LegacyWindows detected. The boot of your PC is in EFI mode. You may want to retry after changing it to BIOS-compatibility/CSM/Legacy mode. Are you sure you want to continue anyway?

Final advice in case of suggested repair: ______________________________________

Please do not forget to make your BIOS boot on nvme0n1 (TEAM TM8FP6512G) disk!

The boot files of [nvme0n1p1 (end>100GB)] are far from the start of the disk. Your BIOS may not detect them. You may want to retry after creating a /boot partition (EXT4, >200MB, start of the disk). This can be performed via tools such as gParted. Then select this partition via the [Separate /boot partition:] option of [Boot Repair]. (https://help.ubuntu.com/community/BootPartition)Please set your BIOS in Legacy mode in order to start your Ubuntu 22.04.4 LTS, then type command [sudo update-grub] in order to add the MacOS entry to your GRUB menu.

User settings: _________________________________________________________________

The settings chosen by the user will reinstall the grub2 of nvme0n1p1 into the MBR of nvme0n1. Grub-efi will not be selected by default because no ESP detected. Additional repair will be performed: unhide-bootmenu-10s

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

==================== Reinstall the grub2 of /dev/nvme0n1p1 =====================

chroot /mnt/boot-sav/nvme0n1p1 grub-install --version grub-install (GRUB) 2.06-2ubuntu7.2

==> Reinstall the GRUB of /dev/nvme0n1p1 into the MBR of /dev/nvme0n1

chroot /mnt/boot-sav/nvme0n1p1 grub-install /dev/nvme0n1 Installing for i386-pc platform. Installation finished. No error reported.

chroot /mnt/boot-sav/nvme0n1p1 update-grub Sourcing file /etc/default/grub' Sourcing file/etc/default/grub.d/init-select.cfg' Found linux image: /boot/vmlinuz-5.15.0-116-generic Found initrd image: /boot/initrd.img-5.15.0-116-generic Found linux image: /boot/vmlinuz-5.15.0-113-generic Found initrd image: /boot/initrd.img-5.15.0-113-generic Found linux image: /boot/vmlinuz-5.15.0-76-generic Found initrd image: /boot/initrd.img-5.15.0-76-generic Found linux image: /boot/vmlinuz-5.4.0-104-generic Found initrd image: /boot/initrd.img-5.4.0-104-generic grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map. Found Ubuntu 22.04.4 LTS (22.04) on /dev/sda2

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

Boot successfully repaired.

You can now reboot your computer. Please do not forget to make your BIOS boot on nvme0n1 (TEAM TM8FP6512G) disk!

The boot files of [nvme0n1p1 (end>100GB)] are far from the start of the disk. Your BIOS may not detect them. You may want to retry after creating a /boot partition (EXT4, >200MB, start of the disk). This can be performed via tools such as gParted. Then select this partition via the [Separate /boot partition:] option of [Boot Repair]. (https://help.ubuntu.com/community/BootPartition)Please set your BIOS in Legacy mode in order to start your Ubuntu 22.04.4 LTS, then type command [sudo update-grub] in order to add the MacOS entry to your GRUB menu.

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

=> Grub2 (v2.00) is installed in the MBR of /dev/nvme0n1 and looks at sector 1 of the same hard drive for core.img. core.img is at this location and looks for (,msdos1)/boot/grub. It also embeds following components:

modules
---------------------------------------------------------------------------
fshelp ext2 part_msdos biosdisk
---------------------------------------------------------------------------

=> 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 (,msdos2)/boot/grub. It also embeds following components:

modules
---------------------------------------------------------------------------
fshelp ext2 part_msdos biosdisk
---------------------------------------------------------------------------

nvme0n1p1: _____________________________________________________________________

File system:       ext4
Boot sector type:  Grub Legacy
Boot sector info:  Grub Legacy (v) is installed in the boot sector of 
                   nvme0n1p1 and looks at sector 17096832 of the same 
                   hard drive for the stage2 file, but no stage2 files 
                   can be found at this location.
Operating System:  Ubuntu 22.04.4 LTS
Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub 
                   /boot/grub/i386-pc/core.img

nvme0n1p2: _____________________________________________________________________

File system:       ntfs
Boot sector type:  NTFS
Boot sector info:  According to the info in the boot sector, nvme0n1p2 
                   starts at sector 1743808512. But according to the info 
                   from fdisk, nvme0n1p2 starts at sector 204802048.
Operating System:  Windows 8 or 10
Boot files:        /bootmgr /Boot/BCD /Windows/System32/winload.exe

nvme0n1p3: _____________________________________________________________________

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

sda1: __________________________________________________________________________

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

sda2: __________________________________________________________________________

File system:       ext4
Boot sector type:  Grub Legacy
Boot sector info:  Grub Legacy (v) is installed in the boot sector of 
                   sda2 and looks at sector 17096832 of the same hard 
                   drive for the stage2 file, but no stage2 files can be 
                   found at this location.
Operating System:  Ubuntu 22.04.4 LTS
Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub 
                   /boot/grub/i386-pc/core.img

sda3: __________________________________________________________________________

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

sda4: __________________________________________________________________________

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:        /bootmgr /Boot/BCD /Windows/System32/winload.exe

sdb: ___________________________________________________________________________

File system:       iso9660
Boot sector type:  Unknown
Boot sector info: 
Mounting failed:   mount: /mnt/BootInfo/FD/sdb: /dev/sdb already mounted or mount point busy.


================================ 4 OS detected =================================

OS#1: Ubuntu 22.04.4 LTS on nvme0n1p1 OS#2: Ubuntu 22.04.4 LTS on sda2 OS#3: Windows 8 or 10 on nvme0n1p2 OS#4: Windows 8 or 10 on sda4

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

CPU architecture: 64-bit Video: GM107 [GeForce GTX 750 Ti] from NVIDIA Corporation Live-session OS is Linuxmint 64-bit (Linux Mint 21.2, victoria, x86_64)

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

BIOS/UEFI firmware: P2.20(5.17) from American Megatrends International, LLC. The firmware is EFI-compatible, and is set in EFI-mode for this live-session. SecureBoot disabled (confirmed by mokutil). BootCurrent: 000D Timeout: 1 seconds BootOrder: 000D,0000,000C,000E,000A Boot0000* Windows Boot Manager HD(4,MBR,0x1d8e78d7,0x67f06800,0xc7ff800)/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.}.................... Boot000A* Hard Drive BBS(HD,,0x0)..GO..NO........{.T.E.A.M. .T.M.8.F.P.6.5.1.2.G....................A..........................dy..... .....>..Gd-.;.A..MQ..L.T.P.B.F.2.3.1.2.1.2.0.0.3.0.2.0.2.9.9.2........BO..NO........u.S.T.3.1.0.0.0.5.2.4.A.S....................A.................................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .V.9.C.P.E.W.2.N........BO Boot000C* CD/DVD Drive BBS(CDROM,,0x0)..GO..NO........u.H.L.-.D.T.-.S.T. .D.V.D.R.A.M. .G.H.2.4.N.S.7.0....................A.................................>..Gd-.;.A..MQ..L.4.K.B.U.J.5.0.6.5.3. .9. . . . . . . . ........BO Boot000D* UEFI OS HD(2,MBR,0x14eb2669,0x23c,0x2130)/File(\EFI\BOOT\BOOTX64.EFI)..BO Boot000E* USB BBS(USB,,0x0)..GO..NO........a.J.M.i.c.r.o.n. .T.e.c.h. .0.5.0.8....................A................................Gd-.;.A..MQ..L.0.0.0.0.0.0.0.0.0.0.1.6........BO

ed45adef8b51b968450611d9d89804b4 sda4/Boot/bootx64.efi 13bbe79f47b4d57f791e51f5c01f7ac8 sda4/Microsoft/Boot/SecureBootRecovery.efi ed45adef8b51b968450611d9d89804b4 sda4/Microsoft/Boot/bootmgfw.efi 0155f61ba8a2b8a43ff6c21012230205 sda4/Microsoft/Boot/bootmgr.efi

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

Disks info: ____________________________________________________________________

nvme0n1 : notGPT, no-BIOSboot, has-noESP, not-usb, not-mmc, has-os, has-win, 2048 sectors * 512 bytes sda : notGPT, no-BIOSboot, has-noESP, not-usb, not-mmc, has-os, has-win, 2048 sectors * 512 bytes

Partitions info (1/3): _________________________________________________________

nvme0n1p1 : is-os, 64, apt-get, grub-pc , grub2, grub-install, grubenv-ok, update-grub, end-after-100GB nvme0n1p2 : is-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, end-after-100GB nvme0n1p3 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, end-after-100GB sda2 : is-os, 64, apt-get, grub-pc , grub2, grub-install, grubenv-ok, update-grub, not-far sda3 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, end-after-100GB sda4 : is-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, end-after-100GB

Partitions info (2/3): _________________________________________________________

nvme0n1p1 : isnotESP, fstab-without-efi, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot nvme0n1p2 : isnotESP, part-has-no-fstab, no-nt, haswinload, no-recov-nor-hid, bootmgr, is-winboot nvme0n1p3 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot sda2 : isnotESP, fstab-without-efi, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot sda3 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot sda4 : isnotESP, part-has-no-fstab, no-nt, haswinload, no-recov-nor-hid, bootmgr, is-winboot

Partitions info (3/3): _________________________________________________________

nvme0n1p1 : not--sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, std-grub.d, nvme0n1 nvme0n1p2 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1 nvme0n1p3 : maybesepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1 sda2 : not--sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, std-grub.d, sda sda3 : maybesepboot, 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

fdisk -l (filtered): ___________________________________________________________

Disk nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors Disk identifier: 0x000d06a8 Boot Start End Sectors Size Id Type nvme0n1p1 2048 204802047 204800000 97.7G 83 Linux nvme0n1p2 * 204802048 598018047 393216000 187.5G 7 HPFS/NTFS/exFAT nvme0n1p3 598018048 1000214527 402196480 191.8G 83 Linux Disk sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors Disk identifier: 0x1d8e78d7 Boot Start End Sectors Size Id Type sda1 2048 27097087 27095040 12.9G 82 Linux swap / Solaris sda2 27097088 152436735 125339648 59.8G 83 Linux sda3 152436736 1743808511 1591371776 758.8G 83 Linux sda4 * 1743808512 1953521663 209713152 100G 7 HPFS/NTFS/exFAT Disk sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors Disk identifier: 0x14eb2669 Boot Start End Sectors Size Id Type sdb1 * 0 5138431 5138432 2.5G 0 Empty sdb2 572 9067 8496 4.1M ef EFI (FAT-12/16/32) sdb3 5140480 1953525167 1948384688 929.1G 83 Linux

parted -lm (filtered): _________________________________________________________

sda:1000GB:scsi:512:512:msdos:ATA ST31000524AS:; 1:1049kB:13.9GB:13.9GB:linux-swap(v1)::; 2:13.9GB:78.0GB:64.2GB:ext4::; 3:78.0GB:893GB:815GB:ext4::; 4:893GB:1000GB:107GB:ntfs::boot; sdb:1000GB:scsi:512:4096:msdos:JMicron Tech:; 2:293kB:4643kB:4350kB:::esp; 3:2632MB:1000GB:998GB:ext4::; nvme0n1:512GB:nvme:512:512:msdos:TEAM TM8FP6512G:; 1:1049kB:105GB:105GB:ext4::; 2:105GB:306GB:201GB:ntfs::boot; 3:306GB:512GB:206GB:ext4::;

Free space >10MiB: ______________________________________________________________

sdb: 4.43MiB:2510MiB:2506MiB

blkid (filtered): ______________________________________________________________

NAME FSTYPE UUID PARTUUID LABEL PARTLABEL sda
├─sda1 swap 019e69d5-cbf4-4bf4-8f6f-1002f27bb8ad 1d8e78d7-01
├─sda2 ext4 f7c1939e-6939-417e-af42-7f9980294b87 1d8e78d7-02
├─sda3 ext4 e7dd6327-d1f8-40b8-9c74-5f1c9b088ebd 1d8e78d7-03
└─sda4 ntfs 08C80847C808358A 1d8e78d7-04
sdb iso9660 2023-12-23-05-05-55-00 Boot-Repair-Disk 64bit ├─sdb1 iso9660 2023-12-23-05-05-55-00 14eb2669-01 Boot-Repair-Disk 64bit ├─sdb2 vfat 8D6C-A9F8 14eb2669-02 ESP
└─sdb3 ext4 dbdf4531-251f-4191-a2c3-4e2904238123 14eb2669-03 writable
nvme0n1
├─nvme0n1p1 ext4 da5f7597-a235-4b9e-a118-16f157daf97d 000d06a8-01 UBUNTU_ROOT
├─nvme0n1p2 ntfs 08C80847C808358A 000d06a8-02
└─nvme0n1p3 ext4 87181479-e982-492f-9ba5-c36df1fe41bf 000d06a8-03

Mount points (filtered): _______________________________________________________

                                                         Avail Use% Mounted on

/dev/nvme0n1p1 55.1G 37% /mnt/boot-sav/nvme0n1p1 /dev/nvme0n1p2 99.1G 47% /mnt/boot-sav/nvme0n1p2 /dev/nvme0n1p3 179G 0% /mnt/boot-sav/nvme0n1p3 /dev/sda2 20G 61% /mnt/boot-sav/sda2 /dev/sda3 284G 62% /mnt/boot-sav/sda3 /dev/sda4 11.3G 89% /mnt/boot-sav/sda4 /dev/sdb1 0 100% /cdrom

Mount options (filtered): ______________________________________________________

/dev/nvme0n1p1 ext4 rw,relatime,stripe=32639 /dev/nvme0n1p2 fuseblk rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096 /dev/nvme0n1p3 ext4 rw,relatime /dev/sda2 ext4 rw,relatime,stripe=32639 /dev/sda3 ext4 rw,relatime,stripe=32750 /dev/sda4 fuseblk rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096 /dev/sdb1 iso9660 ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8

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

Ubuntu da5f7597-a235-4b9e-a118-16f157daf97d Ubuntu 22.04.4 LTS (22.04) (on sda2) f7c1939e-6939-417e-af42-7f9980294b87

END /etc/grub.d/30_os-prober

END /etc/grub.d/30_uefi-firmware

======================== nvme0n1p1/etc/fstab (filtered) ========================

<file system> <mount point> <type> <options> <dump> <pass>

/ was on /dev/sda2 during installation

UUID=da5f7597-a235-4b9e-a118-16f157daf97d / ext4 errors=remount-ro 0 1

/home was on /dev/sda3 during installation

UUID=e7dd6327-d1f8-40b8-9c74-5f1c9b088ebd /home ext4 defaults 0 2

swap was on /dev/sda1 during installation

UUID=019e69d5-cbf4-4bf4-8f6f-1002f27bb8ad none swap sw 0 0 192.168.1.105:/mnt/mainhdd/dospace/ /mnt/pi/ nfs defaults,noauto,wsize=65536,retrans=5 0 0

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

GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=menu GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=lsb_release -i -s 2&gt; /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" GRUB_DISABLE_OS_PROBER=false

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

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

61.751464844 = 66.305130496 boot/grub/i386-pc/core.img 1 38.652488708 = 41.502793728 boot/vmlinuz 2 40.816543579 = 43.826429952 boot/vmlinuz-5.15.0-113-generic 2 38.652488708 = 41.502793728 boot/vmlinuz-5.15.0-116-generic 2 31.168018341 = 33.466404864 boot/vmlinuz-5.15.0-76-generic 1 7.794952393 = 8.369766400 boot/vmlinuz-5.4.0-104-generic 1 40.816543579 = 43.826429952 boot/vmlinuz.old 2 59.860347748 = 64.274558976 boot/initrd.img 5 29.602535248 = 31.785480192 boot/initrd.img-5.15.0-113-generic 8 59.860347748 = 64.274558976 boot/initrd.img-5.15.0-116-generic 5 57.750972748 = 62.009634816 boot/initrd.img-5.15.0-76-generic 8 49.625972748 = 53.285482496 boot/initrd.img-5.4.0-104-generic 4 29.602535248 = 31.785480192 boot/initrd.img.old 8

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

-rwxr-xr-x 1 root root 18683 Apr 15 2022 10_linux -rwxr-xr-x 1 root root 43031 Apr 15 2022 10_linux_zfs -rwxr-xr-x 1 root root 14387 Dec 18 2022 20_linux_xen -rwxr-xr-x 1 root root 13369 Apr 15 2022 30_os-prober -rwxr-xr-x 1 root root 1372 Apr 15 2022 30_uefi-firmware -rwxr-xr-x 1 root root 700 Feb 21 2022 35_fwupd -rwxr-xr-x 1 root root 214 Apr 11 2014 40_custom -rwxr-xr-x 1 root root 215 Apr 15 2022 41_custom

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

Ubuntu f7c1939e-6939-417e-af42-7f9980294b87 Windows 10 (on sda4) 08C80847C808358A

END /etc/grub.d/30_os-prober

END /etc/grub.d/30_uefi-firmware

========================== sda2/etc/fstab (filtered) ===========================

<file system> <mount point> <type> <options> <dump> <pass>

/ was on /dev/sda2 during installation

UUID=f7c1939e-6939-417e-af42-7f9980294b87 / ext4 errors=remount-ro 0 1

/home was on /dev/sda3 during installation

UUID=e7dd6327-d1f8-40b8-9c74-5f1c9b088ebd /home ext4 defaults 0 2

swap was on /dev/sda1 during installation

UUID=019e69d5-cbf4-4bf4-8f6f-1002f27bb8ad none swap sw 0 0 192.168.1.105:/mnt/mainhdd/dospace/ /mnt/pi/ nfs defaults,noauto,wsize=65536,retrans=5 0 0

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

GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=lsb_release -i -s 2&gt; /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""

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

       GiB - GB             File                                 Fragment(s)

19.049831390 = 20.454600704 boot/grub/grub.cfg 1 71.342910767 = 76.603867136 boot/grub/i386-pc/core.img 1 53.736465454 = 57.699090432 boot/vmlinuz 2 28.858394623 = 30.986465280 boot/vmlinuz-5.15.0-112-generic 2 53.736465454 = 57.699090432 boot/vmlinuz-5.15.0-113-generic 2 44.087940216 = 47.339065344 boot/vmlinuz-5.15.0-76-generic 1 20.714874268 = 22.242426880 boot/vmlinuz-5.4.0-104-generic 1 28.858394623 = 30.986465280 boot/vmlinuz.old 2 70.022457123 = 75.186040832 boot/initrd.img 3 71.408851624 = 76.674670592 boot/initrd.img-5.15.0-112-generic 5 70.022457123 = 75.186040832 boot/initrd.img-5.15.0-113-generic 3 66.545894623 = 71.453110272 boot/initrd.img-5.15.0-76-generic 4 46.304576874 = 49.719160832 boot/initrd.img-5.4.0-104-generic 5 71.408851624 = 76.674670592 boot/initrd.img.old 5

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

-rwxr-xr-x 1 root root 18683 Apr 15 2022 10_linux -rwxr-xr-x 1 root root 43031 Apr 15 2022 10_linux_zfs -rwxr-xr-x 1 root root 14387 Dec 18 2022 20_linux_xen -rwxr-xr-x 1 root root 13369 Apr 15 2022 30_os-prober -rwxr-xr-x 1 root root 1372 Apr 15 2022 30_uefi-firmware -rwxr-xr-x 1 root root 700 Feb 21 2022 35_fwupd -rwxr-xr-x 1 root root 214 Apr 11 2014 40_custom -rwxr-xr-x 1 root root 215 Apr 15 2022 41_custom

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

Unknown BootLoader on sdb

sprunge.us ko ()

Booting from /dev/dsa

Like I said, I didn't use any of these tools to write to the /dev/sda, but but if I try to start /dev/dsa4 from the grub installed on /dev/sda, it begins booting but then stops, gives me a generic error and then restarts. This is the reason I think that the problem on /dev/nvme0n1 is grub.

I wish I could be giving some more specific error messages/codes, but I haven't seen any.

So I think that the problem can be broken down to 2:

  1. Grub on /dev/nvme0n1 does not load either of the Windows partitions properly.
  2. Something may or may not have happened to grub on /dev/sda, but obviously something's happening. One thing I'm worried about is using MS tools to correct this problem, since it tends to run roughshod over Linux installations.

I've tried Googling for these sorts of problems, but I'm short on specific keywords and a lot of the issues I find are from 10 years ago and probably not sufficient for my problem.

Opux
  • 239

1 Answers1

0

look at the Windows partition in /dev/sda4 Does it contain /boot and or /EFI or not?
It seems you have lost the Windows boot configuration data files (BCD) or it has changed.
To solve this problem, reboot by Windows installation media or HBCD-PE, You can reinstall or copy BCD files that support booting on either a UEFI-based or a BIOS-based computer from the C:\Windows folder to the root of C drive by the following command:

bcdboot C:\Windows /s C: /f ALL     #make sure that windows partition take the c letter

If the Windows partition takes another letter than c, you must assign the letter C for it before applying the above command. after that, reboot by Ubuntu and sudo update-grub. if this fixes the Windows boot of /dev/sda4, try the same solution with /dev/nvme0n1p2.

update:
I recommend HBCD_PE_x64.iso because when you boot by HBCD, you will find many tools like BootIce, EasyBCD, Windows disk management tool, cmd, and other tools in addition to the GUI as in normal Windows.
Create USB drive contains multi Ubuntu versions, HBCD-PE-64, and multi Windows installation from Ubuntu
to create a bootable USB for this ISO from Windows (I see in the comment you can use Windows):

open cmd, copy or write one by one, and enter:

diskpart
lis dis
sel dis x #replace x by the USB number
clean
create partition primary 
active
format fs=NTFS quick
assign letter=Z   #you can change the letter

enter image description here

Copy all the content in the ISO file to the root of the USB flash drive.

Now you can reboot by HBCD_PE, open the Windows disk management tool, and make sure that the Windows partition takes the C letter, if it takes another letter change it to C.

enter image description here

Open cmd and apply:

 bcdboot C:\Windows /s C: /f ALL 

After Windows boot configuration data files are placed in the C partition, you can use BootIce to read and/or edit the BCD file

BOOTICE1

BOOTICE2

BOOTICE3

BOOTICE4

BOOTICE5

Reboot with Ubuntu to update-grub.
update 2 window's grub menu entry 1:

menuentry "Windows" --class windows --class os {
        insmod part_msdos  
        insmod ntfs
        set root='hd0,msdos2' # edit this to appropriate with windows partition
        parttool ${root} hidden-
        drivemap -s (hd0) ${root}
        chainloader +1
    }

if this menu entry doesn't work, use the second:

menuentry "Windows" --class windows --class os {
        insmod part_msdos
        insmod ntldr
        set root='hd0,msdos2' # edit this to appropriate with windows partition
        ntldr /BOOTMGR
    }

may be you will try to set set root='hd0,msdos2' as set root='hd1,msdos2' make sure that windows partition take a bootable flag by disks utility.

Talaat Etman
  • 1,340