0

So basicly i dual booted ubuntu and windows on my laptop but the problem is windows is gone after I dual booted it

This is basicly what I did:

1 downloaded unetbootin on my windows

2 downloaded the lubuntu iso

3.made a partition for lubuntu

4.booted in lubuntu

5 finish setting up lubuntu

Few Week or So...

6 downloaded kde plasma(which also downloaded ubuntu)

7.switched to kde plasma

Few days later...

8 checked my boot menu if windows was there but wasnt there

9.tried to fix it but all Lead me to reinstall windows or ubuntu which is probably not the problem(ithink)

  1. Stuck on a dead end trying to find a answer

Thats basically what I remembered doing so its not so accurate.

Now I know that windows is on my laptop because the partition exist

But cant find it on the grub menu

Tried Grub-Update

Didn't work

Tried adding a custom boot option on grub

Didn't work

Tried using boot repair

But it just said the windows is on uefi OR WINDOWSEFI DETECTED Even though it is not on uefi its on legacy because I dont even remember changing the boot into uefi nor even switching to uefi mode

Asked this community on how to fix this problem

They said to either reinstall ubuntu on uefi or windows on legacy (prob because im bad at explaining the problem)

This all of the clues or solutions i got to fix my problem :


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

=> 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 ext2 part_msdos biosdisk
---------------------------------------------------------------------------

sda1: __________________________________________________________________________

File system:       ntfs
Boot sector type:  Grub2 (v1.99-2.00)
Boot sector info:  Grub2 (v2.00) is installed in the boot sector of sda1 
                   and looks at sector 783190272 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
                   -------------------------------------------------------
                   -------------------------. No errors found in the Boot 
                   Parameter Block.
Operating System:  Windows 10 or 11
Boot files:        /boot.ini /bootmgr /Boot/BCD 
                   /Windows/System32/winload.exe

sda2: __________________________________________________________________________

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

sda3: __________________________________________________________________________

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

sda5: __________________________________________________________________________

File system:       ntfs
Boot sector type:  SYSLINUX 4.07 2013-07-25
Boot sector info:  Syslinux looks at sector 25136 of /dev/sda5 for its 
                   second stage. SYSLINUX is installed in the /uui 
                   directory. According to the info in the boot sector, 
                   sda5 starts at sector 2048.
Boot file info:      Grub2 (v2.00) in the file 
                   /lubuntu-22.04.3-desktop-amd64.iso looks at sector 0 
                   of the same hard drive for core.img, but core.img can 
                   not be found at this location.
Operating System:  
Boot files:        /boot/grub/menu.lst

sda6: __________________________________________________________________________

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

sda4: __________________________________________________________________________

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


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

OS#1: The OS now in use - Ubuntu 22.04.3 LTS on sda6 OS#2: Windows 10 or 11 on sda1

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

CPU architecture: 64-bit Video: 3rd Gen Core processor Graphics Controller from Intel Corporation BOOT_IMAGE of the installed session in use: /boot/vmlinuz-6.5.0-14-generic root=UUID=debbb09f-4b76-47c6-a6e5-96bebd24b66e ro quiet splash vt.handoff=7 df -Th / : /dev/sda6 ext4 203G 122G 71G 64% /

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

BIOS/UEFI firmware: R0200DA(2.0) from Insyde Corp. The firmware is EFI-compatible, but this installed-session is in Legacy/BIOS/CSM mode (not in EFI mode).

d41d8cd98f00b204e9800998ecf8427e sda4/Boot/bootx64.efi 64349b3622c65f495a99dbf6102496e3 sda1/boot/bootx64.efi dbb73486aa1fffa648f99f31f209f545 sda1/boot/grubx64.efi a660182adef313615746a665966d2ccc sda1/boot/mmx64.efi 4c0946eb0d0bdb42144a42b77ec4b6cd sda1/Microsoft/Boot/bootmgfw.efi e5ce0ea9e43b188dadc15eec1e4cdcb6 sda1/Microsoft/Boot/bootmgr.efi

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

Disks info: ____________________________________________________________________

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

Partitions info (1/3): _________________________________________________________

sda6 : is-os, 64, apt-get, grub-pc , grub2, grub-install, grubenv-ok, update-grub, end-after-100GB sda4 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, end-after-100GB sda2 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, end-after-100GB sda5 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, end-after-100GB sda1 : is-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, end-after-100GB

Partitions info (2/3): _________________________________________________________

sda6 : isnotESP, fstab-without-efi, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot sda4 : isnotESP, part-has-no-fstab, 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 sda1 : isnotESP, part-has-no-fstab, no-nt, haswinload, no-recov-nor-hid, bootmgr, is-winboot

Partitions info (3/3): _________________________________________________________

sda6 : not--sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, std-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 sda2 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, sda sda5 : is---sepboot, no-kernel, 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: 0x348654d8 Boot Start End Sectors Size Id Type sda1 * 17213440 457623975 440410536 210G 7 HPFS/NTFS/exFAT sda2 457625600 459370495 1744896 852M 27 Hidden NTFS WinRE sda3 459370496 909731839 450361344 214.7G f W95 Ext'd (LBA) sda4 909731840 976773119 67041280 32G 7 HPFS/NTFS/exFAT sda5 893349888 909731839 16381952 7.8G 7 HPFS/NTFS/exFAT sda6 459372544 893347839 433975296 206.9G 83 Linux Partition table entries are not in disk order. Disk zram0: 3.82 GiB, 4096806912 bytes, 1000197 sectors

parted -lm (filtered): _________________________________________________________

sda:500GB:scsi:512:4096:msdos:ATA TOSHIBA MQ01ABF0:; 1:8813MB:234GB:225GB:ntfs::boot; 2:234GB:235GB:893MB:ntfs::msftres; 3:235GB:466GB:231GB:::lba; 6:235GB:457GB:222GB:ext4::; 5:457GB:466GB:8388MB:ntfs::; 4:466GB:500GB:34.3GB:ntfs::;

Free space >10MiB: ______________________________________________________________

sda: 0.03MiB:8405MiB:8405MiB

blkid (filtered): ______________________________________________________________

NAME FSTYPE UUID PARTUUID LABEL PARTLABEL sda
├─sda1 ntfs 01D385036F91F970 348654d8-01
├─sda2 ntfs 0CF482D0F482BB88 348654d8-02
├─sda3 348654d8-03
├─sda4 ntfs 62DE21ACDE217985 348654d8-04 DriveE ├─sda5 ntfs C2FA1D79FA1D6B45 348654d8-05 UUI
└─sda6 ext4 debbb09f-4b76-47c6-a6e5-96bebd24b66e 348654d8-06

Mount points (filtered): _______________________________________________________

                            Avail Use% Mounted on

/dev/sda1 43.1G 79% /media/kingrain/01D385036F91F970 /dev/sda2 165.3M 81% /mnt/boot-sav/sda2 /dev/sda4 404K 100% /media/kingrain/DriveE /dev/sda5 4.9G 37% /media/kingrain/UUI /dev/sda6 70.7G 60% /

Mount options (filtered): ______________________________________________________

/dev/sda1 ntfs3 rw,nosuid,nodev,relatime,uid=1000,gid=1000,windows_names,iocharset=utf8 /dev/sda2 fuseblk rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096 /dev/sda4 ntfs3 rw,nosuid,nodev,relatime,uid=1000,gid=1000,windows_names,iocharset=utf8 /dev/sda5 ntfs3 rw,nosuid,nodev,relatime,uid=1000,gid=1000,windows_names,iocharset=utf8 /dev/sda6 ext4 rw,relatime

=========================== sda1/boot.ini (filtered) ===========================

C:\ubnldr.mbr="UNetbootin"

====================== sda5/boot/grub/menu.lst (filtered) ======================

This Menu created with Universal USB Installer https://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

default 0 timeout 30 color NORMAL HIGHLIGHT HELPTEXT HEADING foreground=FFFFFF background=000000 title Boot lubuntu-22.04.3-desktop-amd64 set ISO=/lubuntu-22.04.3-desktop-amd64.iso set CASPER=/writable find --set-root %ISO% map %ISO% (0xff) #CLUG map --hook root (0xff) kernel /casper/vmlinuz file=/cdrom/preseed/lubuntu.seed fsck.mode=skip cdrom-detect/try-usb=true noprompt boot=casper iso-scan/filename=%ISO% quiet -- initrd /casper/initrd title Boot lubuntu-22.04.3-desktop-amd64 acpi=off set ISO=/lubuntu-22.04.3-desktop-amd64.iso set CASPER=/writable find --set-root %ISO% map %ISO% (0xff) #CLUG map --hook root (0xff) kernel /casper/vmlinuz file=/cdrom/preseed/lubuntu.seed fsck.mode=skip cdrom-detect/try-usb=true noprompt boot=casper iso-scan/filename=%ISO% quiet acpi=off -- initrd /casper/initrd

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

       GiB - GB             File                                 Fragment(s)

428.861846924 = 460.486901760 boot/grub/menu.lst 1 428.860809326 = 460.485787648 vmlinuz 1 428.847053528 = 460.471017472 initrd 1

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

Ubuntu debbb09f-4b76-47c6-a6e5-96bebd24b66e

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

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

Windows 10

========================== sda6/etc/fstab (filtered) ===========================

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

UUID=debbb09f-4b76-47c6-a6e5-96bebd24b66e / ext4 defaults 0 1 /swapfile swap swap defaults 0 0

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

GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=0 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

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

       GiB - GB             File                                 Fragment(s)

250.150127411 = 268.596654080 boot/grub/grub.cfg 1 360.036392212 = 386.586132480 boot/grub/i386-pc/core.img 1 342.277896881 = 367.518093312 boot/vmlinuz 2 288.152496338 = 309.401387008 boot/vmlinuz-6.2.0-39-generic 1 342.277896881 = 367.518093312 boot/vmlinuz-6.5.0-14-generic 2 288.152496338 = 309.401387008 boot/vmlinuz.old 1 359.592769623 = 386.109796352 boot/initrd.img 6 340.035842896 = 365.110706176 boot/initrd.img-6.2.0-39-generic 2 359.592769623 = 386.109796352 boot/initrd.img-6.5.0-14-generic 6 340.035842896 = 365.110706176 boot/initrd.img.old 2

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

-rwxr-xr-x 1 root root 18683 Dis 19 2022 10_linux -rwxr-xr-x 1 root root 43031 Dis 19 2022 10_linux_zfs -rwxr-xr-x 1 root root 14387 Dis 19 2022 20_linux_xen -rwxr-xr-x 1 root root 13369 Dis 19 2022 30_os-prober -rwxr-xr-x 1 root root 1372 Dis 19 2022 30_uefi-firmware -rwxr-xr-x 1 root root 700 May 17 2023 35_fwupd -rwxr-xr-x 1 root root 374 Ene 5 12:57 40_custom -rwxr-xr-x 1 root root 215 Dis 19 2022 41_custom

===================== sda6/etc/grub.d/40_custom (filtered) =====================

#!/bin/sh exec tail -n +3 $0

This file provides an easy way to add custom menu entries. Simply type the

menu entries you want to add after this comment. Be careful not to change

the 'exec tail' line above.

menuentry "Windows 10" { insmod part_msdos insmod ntfs set root=(hd0,msdos1) # Modify this to match your Windows partition chainloader +1 }

Suggested repair: ______________________________________________________________

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

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.

and some suggest to reinstall my ubuntu or windows.

i dont understand some of this so giving this to the profesionals and this is what i can basically give rn. i hope someone can help me with this problem...

Kingrain
  • 11
  • 2

2 Answers2

1

Your sda1 is your Windows boot partition.

"Grub2 (v2.00) is installed in the boot sector of sda1 "

Windows in BIOS mode requires the NTFS partition have Windows info in it. You have to use Windows repair commands to restore Windows boot sector in sda1.

More info here: https://superuser.com/questions/949219/how-to-fix-the-windows-10-boot-loader-from-windows/950042#950042

But if UEFI system, why is Windows in BIOS mode? Microsoft has required vendors to install in UEFI boot mode to gpt partitioned drives, since 2012. When you convert to UEFI, be sure to have good backups as MBR(msdos) to gpt totally erases a drive.

Testdisk may also work:

GRUB is not letting me switch to Windows 8. Dual boot process. Ubuntu 15.04

oldfred
  • 12,100
  • Ok so I read the post and basically means that I need to make a recovory disk and insert into my laptop so I can access window commands and fix windows? Thats what I think the post means. But another problem Is that I dont have usb/disk to fix the windows. Is there a way to fix it without using any external devices/usb/disk or is there a other way. – Kingrain Jan 16 '24 at 15:14
  • You should always have a repair/recovery flash drive for current version of every system you have installed. As well as good backups. But Since NTFS keeps a backup of the PBR - partition boot sector, you may be able to use Testdisk to restore the backup if it is valid. Testdisk will probably say grub is valid in NTFS PBR, as it can be valid in partition, but not in NTFS. https://askubuntu.com/questions/655290/grub-is-not-letting-me-switch-to-windows-8-dual-boot-process-ubuntu-15-04/655486#655486 – oldfred Jan 16 '24 at 16:33
  • ok so i use testdisk and it detected my windows and also its recovery partition : i then went to the "advanced" then "boot" and then the prompt said A valid NTFS Boot sector must be present in order to access any data; even if the partition is not bootable. theres 3 options "rebuild bs" "repair mft" "dump" what should i do next – Kingrain Jan 16 '24 at 19:15
  • There was not an option to restore backup BS? You can use the rebuild bs, but when I used that many years ago, it created a XP type NTFS BS. I has to use a newer Windows repair disk to convert from XP to Windows 7/8/10 type which is still the same for all newer Windows in BIOS mode. Not sure now if Testdisk would create newer type. But then Windows tools would see partition where before Windows would not even fix it. I think difference in Boot Sector was ntldr for XP or bootmgr for later Windows. This is really an Ubuntu question & answer site. I am not up to date on Widnows, use Windows site – oldfred Jan 16 '24 at 20:55
  • Dude i actually found the option and then i press backup .but now my pc is in grub rescue :( – Kingrain Jan 17 '24 at 01:25
  • Restoring NTFS Boot Sector should not change grub's boot. Try using Boot-Repair's advanced mode and totally reinstall grub to MBR, not any partition. But with BIOS/MBR, you only have one MBR but need two boot loaders. Grub will usually, but not always boot working Windows. But when grub does not boot Windows you have to restore Windows boot loader to MBR, fix Windows & then restore grub to MBR to boot Ubuntu. With UEFI you can always boot any system from UEFI boot menu. – oldfred Jan 17 '24 at 03:31
  • Ok so technically reinstall grub to mbr/bios/legacy to restore the windows boot loader.is that what you mean and also does that add two boot loaders the other one is windows while the other one is grub... two seperate bootloader. While uefi on the other hand allows you to boot to any system as long as the partition is uefi. Maybe thats why uefi is better... – Kingrain Jan 17 '24 at 05:29
  • For now I cant access my laptop because I kinda corrupted the mbr now grub is broken and cant dettect my partitions :( just reddirects me to the grub rescue page and the only way to fix is probably plugging a live cd or usb of windows to my laptop fix it via using a boot repair. Now the problem is I dont have a usb so now IM ordering it online which takes days to arrive. I hope theres a way to fix with out using a external device :( – Kingrain Jan 17 '24 at 05:37
  • One fix is if you can boot grub menu & recovery mode. Another is to manually boot. https://help.ubuntu.com/community/Grub2/Troubleshooting Can you do ls at grub> and see partitions? https://askubuntu.com/questions/654386/windows-10-upgrade-led-to-grub-rescue/655027#655027 – oldfred Jan 17 '24 at 14:49
  • Cant do ls on grub cant even access it Can do ls on grub rescue if thats what you mean. The output of ls is hd0 hd0,msdos5 which is prob not even right theres mainly six of those file system I think which is prob corrupted or deleted or grub cant find them because of the mbr being corrupted or something – Kingrain Jan 17 '24 at 15:45
0

Did you try reinstalling grub on the drive:

sudo grub-install /dev/sda
sudo update-grub

Run, this maybe this will solve it. Also, can you say how did you add the drive /dev/sda1 manually in the grub?

YaserMow
  • 184
  • Sudo grub install didn't work. And if youre wondering how i added a custom entry to grub use grub customizer if thats what youre reffering to – Kingrain Jan 16 '24 at 15:15