Announcement

Collapse
No announcement yet.

Windows 10 not showing up in grub

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Windows 10 not showing up in grub

    First off I am completely new to linux but above averge with windows. Im presently learning how to use terminal commands and linux in general.
    I installed kubuntu on a seperate hdd from my ssd windows (mbr) boot drive. Both work if i boot from the uefi and select their respective drives as the boot priority. If i boot kubuntu i see the grub menu but windows 10 does not show up there.
    I've tried to follow windows 10 cmd instructions to change the boot manger but i get access denied or missing file messages.

    In kubuntu ive tried terminal commands to reinstall grub and that seems to work but doesnt solve the problem.

    To be clear im using the asrock mobo uefi the windows bios is legacy. And i have a seperate partition for the kubuntu efi. Not sure if that makes a difference.

    #2
    Originally posted by Nimic View Post
    To be clear im using the asrock mobo uefi the windows bios is legacy. And i have a seperate partition for the kubuntu efi. Not sure if that makes a difference.
    It certainly does. If the computer is in EFI, it cannot run BIOS programmes, like the Windows bootloader; the BIOS is not there; and vice versa.

    You could reinstall Kubuntu as BIOS/MBR, or even conceivably BIOS/GPT, then grub will be able to chain to the Windows bootloader. Or, reinstall Windows as using EFI; supposedly one could convert Windows in place to EFI, but I've no idea if that's a good idea.

    If you want to do a BIOS install of Kubuntu, you have to boot the install media in BIOS mode. How to achieve that depends on the motherboard.
    Regards, John Little

    Comment


      #3
      Actually windows is on a GPT drive not mbr.
      How can I confirm kubuntu is running in efi mode?
      Last edited by Nimic; Jul 31, 2020, 07:06 AM.

      Comment


        #4
        Is there any advantage to running in uefi mode. It would take about the same effort to put windows in uefi mode. (I already have fast boot and secure boot disabled)
        Last edited by Nimic; Jul 31, 2020, 06:52 AM.

        Comment


          #5
          Originally posted by Nimic View Post
          Is there any advantage to running in uefi mode. It would take about the same effort to put windows in uefi mode. (I already have fast boot and secure boot disabled)
          Frankly, I didn't know one could run Windows 10 in non-uefi mode. A couple of points need to be made here:
          GRUB will boot either to EFI or Legacy.
          If GRUB is on an MBR drive, it should "just work."
          If GRUB is on a GPT drive, which I recommend, you need to prepare a small BIOS_BOOT partition, of which I have written about extensively elsewhere on this forum.

          I'm not even close to an expert on EFI, but if your Windows install is booting to legacy mode, I'm of the "it's Windows so leave it alone" camp. What I find curious is; if you are indeed in legacy mode and Windows is not using EFI, why did GRUB choose to install in EFI mode? That's seems abnormal to me. IME, GRUB (or more properly the installation tool) detects the EFI partition and will then install in EFI mode. If it's not there, then it installs in legacy mode.

          Finally, it also seems possible that one could boot to a Live USB and install GRUB is legacy mode from the live session and avoid an entire re-install, but I've never tried it. It might actually be less work to just re-install Linux but I'd re-partition the drive first and remove any EFI partitions first if they're not being used.

          Please Read Me

          Comment


            #6
            Originally posted by Nimic View Post
            Actually windows is on a GPT drive not mbr.
            How can I confirm kubuntu is running in efi mode?
            Look for the EFI partition on the Windows drive.

            Here's what I think is possible: Windows is, in fact, using EFI. When you installed Linux, it detected EFI mode but didn't use the existing EFI partition because it was on another drive and thus created it's own new EFI partition on drive 2. This probably could have been avoided by choosing "Manual" partitioning at installation time and choosing the EFI partition. Now GRUB doesn't "see" the Windows install because it's only capable of using one EFI partition.

            If this is the case, I think you could simply copy the Linux EFI folder(s) onto the Windows EFI partition (following the properly directory structure of course), edit /etc/fstab and change the UUID to point at the Windows EFI partition and mount it, re-install GRUB using this command:

            sudo grub-install --target=x86_64-efi --efi-directory=<your windows EFI mount here> --bootloader-id=GRUB

            and it should work. Running sudo update-grub after should then detect your Windows EFI bootloader and you'd be good to go. HOWEVER, I have not tried this so I cannot reliably predict the results.

            Another, much more safe option, would be to simply create a custom boot stanza in /etc/grub.d/40_custom which would then allow you to boot Windows without changing anything else.

            As an example, here my EFI Windows grub.cfg entry:

            Code:
            [FONT=monospace][COLOR=#000000]menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-4E6E-42EE' {[/COLOR]
                    insmod part_gpt
                    insmod fat
                    if [ x$feature_platform_search_hint = xy ]; then
                      search --no-floppy --fs-uuid --set=root  4E6E-42EE
                    else
                      search --no-floppy --fs-uuid --set=root 4E6E-42EE
                    fi
                    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
            }
            
            [/FONT]
            Obviously, you would need to change the UUIDs to match your Windows file system.
            Last edited by oshunluvr; Jul 31, 2020, 08:00 AM.

            Please Read Me

            Comment


              #7
              Originally posted by Nimic View Post
              How can I confirm kubuntu is running in efi mode?
              There are two ways, one is to try running the efibootmgr command, it will giver an error if it is not an EFI system. The command won't exist on a bios system, I think, so not having it may be enough to tell.
              Another is to see if there is an efi directory in /sys/firmware/. It won't exist on a Bios system.

              Comment


                #8
                Thanks that was helpful. I can say with certainty kubuntu is in efi mode.

                As for windows. I do not have any efi partitions. I have the main partion with the full os and a recovery partition. I cant find any efi files in windows. Under sys info it says bios mode: legacy. So im pretty certain windows is in legacy mode.

                In my kubuntu os partition i have some efi files with locations like: /media/(linux username)/ (win os ssd)/windows/boot/efi/bg-BG. which i believe means that kubuntu is linked to windows through a non existent efi path.

                I did manually partition when i installed kubuntu. I had 1tb unallocated free space on a hdd. the other 2tb on the same hdd is ntfs format with my windows user files. I made 3 partitions of the free space: ext4 / (linux os), linux swap, ext4 /home. Then i got an error message saying i needed to make an efi partition. So i made that as fat32 /boot/efi. What im understanding it this last step where i went wrong. Should i have ignored the error and just used my three partitions.
                Last edited by Nimic; Jul 31, 2020, 03:21 PM.

                Comment


                  #9
                  run the command sudo update-grub and post the output, it should look similar to this:


                  Code:
                  dohbuoy@dohbuoy-FLEX-15IIL:~$ sudo update-grub
                  [sudo] password for dohbuoy: 
                  Sourcing file `/etc/default/grub'
                  Sourcing file `/etc/default/grub.d/99_breeze-grub.cfg'
                  Sourcing file `/etc/default/grub.d/init-select.cfg'
                  Generating grub configuration file ...
                  Found theme: /boot/grub/themes/breeze/theme.txt
                  Found linux image: /boot/vmlinuz-5.4.0-42-generic
                  Found initrd image: /boot/initrd.img-5.4.0-42-generic
                  Found linux image: /boot/vmlinuz-5.4.0-40-generic
                  Found initrd image: /boot/initrd.img-5.4.0-40-generic
                  [B]Found Windows Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi[/B]
                  Adding boot menu entry for UEFI Firmware Settings
                  done
                  Looking to see if there are any error messages.
                  Above, my system is picking up the EFI partition on my Windows drive. I have one of these on each of my two drives, as I only had one when I installed Linux to the nvme drive, then I later used the recovery disk to reinstall the OEM WIndows 10 to the secondary SSD.

                  Comment


                    #10
                    I just found in "kde partition manager" i can see properties for the Microsoft reserved partition(recovery). It displays flags for "bios-grub" and "boot"
                    Im not sure what that means exactly but it didnt show up in the windows properties tab.

                    Comment


                      #11
                      hk-47@HK-47:~$ sudo update-grub
                      [sudo] password for hk-47:
                      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-42-generic
                      Found initrd image: /boot/initrd.img-5.4.0-42-generic
                      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
                      done

                      IF I'm reading this right grub is working fine except it isn't detecting anything windows

                      Comment


                        #12
                        Originally posted by oshunluvr View Post
                        Frankly, I didn't know one could run Windows 10 in non-uefi mode. A couple of points need to be made here:
                        GRUB will boot either to EFI or Legacy.
                        If GRUB is on an MBR drive, it should "just work."
                        If GRUB is on a GPT drive, which I recommend, you need to prepare a small BIOS_BOOT partition, of which I have written about extensively elsewhere on this forum.

                        I'm not even close to an expert on EFI, but if your Windows install is booting to legacy mode, I'm of the "it's Windows so leave it alone" camp. What I find curious is; if you are indeed in legacy mode and Windows is not using EFI, why did GRUB choose to install in EFI mode? That's seems abnormal to me. IME, GRUB (or more properly the installation tool) detects the EFI partition and will then install in EFI mode. If it's not there, then it installs in legacy mode.

                        Finally, it also seems possible that one could boot to a Live USB and install GRUB is legacy mode from the live session and avoid an entire re-install, but I've never tried it. It might actually be less work to just re-install Linux but I'd re-partition the drive first and remove any EFI partitions first if they're not being used.
                        Can you please post a link to what you've written on this. Even if it doesn't help my current issue it sounds interesting and is obviously a gap in my knowledge.
                        When I made the boot-able usb in ruffus I selected "mbr" '"legacy bios or uefi" maybe it got confused when it detected a GTP drive so it defaulted to uefi. The other option to choose would have been "GTP" "EFI (non CMS)"

                        Comment


                          #13
                          Originally posted by oshunluvr View Post
                          Frankly, I didn't know one could run Windows 10 in non-uefi mode.
                          If the Windows 10 install was upgraded all the way from a version that was a BIOS/MBR, it remains so.
                          Regards, John Little

                          Comment


                            #14
                            Originally posted by Nimic View Post
                            Thanks that was helpful. I can say with certainty kubuntu is in efi mode...
                            So im pretty certain windows is in legacy mode.
                            IMO the easiest way forward for you is to reinstall Kubuntu in legacy mode. At least, for me it would be, I'd be scared to reinstall Windows, I'd expect gotchas or licence trouble. Windows users used to say regular reinstalls were a good thing; but I haven't heard that for a while.

                            On my desktop with a Gigabyte motherboard, if I reboot with install USB stick plugged in and press the right key, something like F2 or F8, the firmware gives several choices referring to the stick, at least one of which is EFI mode and at least one is legacy, though how many choices and their cryptic names seem to vary from boot to boot.
                            Regards, John Little

                            Comment


                              #15
                              SOLVED
                              Thanks to eveyone that helped. I really appriciate it. I learned allot from all of your troubleshooting approches.
                              Turns out it was entirely user error.
                              First i upgraded the windows bios to uefi. (Not sure if i had to but id thought i was running uefi to begin with). Somehow windows was running legacy bios on a gtp drive. So this solution sorted that issue.
                              Second i reinstalled kubuntu from a usb formatted as "GTP uefi mode". I previously uses "mbr legacy bios or efi mode." I think kubuntu install saw the gtp drive and defaulted to efi mode.
                              Third was the user error: originally i created a new partition for linux uefi. This time i used the new windows efi partition. Low and behold grub worked without a hitch.

                              I used this video to convert windows to uefi mode. It was actually really easy. https://youtu.be/sT6YEOgGuBc
                              Last edited by Nimic; Jul 31, 2020, 11:21 PM.

                              Comment

                              Working...
                              X