How to fix UEFI dual boot (Windows 10, Ubuntu 20.04) on Toshiba dynabook?

8,859

Solution 1

I would suggest to format the whole disk, go into the bios and disable "secure boot" or something among those lines, That prevents any OS that is not on NTFS (windows file system) from being Installed and/or booted. By disabling that option you are allowing the installation of GRUB which is the boot manager for Linux. Then, after you have disabled "secure boot" you can go-ahead and partition the disk in two partitions, one for Linux and another one for Windows, then install windows, be beware that windows will try to use the whole disk, so you need to select "custom Installation" when asked and tell it to use one of the partitions, install windows normally. Then, boot from the USB stick with Linux on it, if it detects that you have windows 10 installed, it will automatically select the Free partition as the install partition and save you work (That's why you install Windows first) If, however, it does not detect and installation of windows 10, select "manual partitioning" and select the free partition that you made, Use the automatic partitioner and Proceed to install Linux, but be careful to not select any windows partitions or you will duck up your windows install. Linux will install normally and then ask you if you would like to install Grub on the main boot sector, say yes and let it do it's thing. Then remove the installation USB and reboot the PC. It will show you a boot options list, select what you want to boot and voila, you have Win10 and Linux on dual boot. If you want to change the default boot option read this

Solution 2

I did this quite a lot, and I suggest doing it in the other direction. Windows boot loader does not enjoy for you to load it with another OS at all. you can make it work, but using GRUB to windows is much much easier. You're spending so much time for nothing.

So you should go clean Ubuntu install>directly on the main drive (thus wiping windows)

Just follow these steps:

  1. Backup important files from windows or make a full system image backup.

  2. prepare a windows installer image of your same exact windows version (the license will auto-detect through MOBO)

  3. prepare the Ubuntu USB installer (again)

  4. Turn off secure boot (there is nothing called GRUB in the BIOS, this is only a UNIX term, don't try to look for this.) Then turn off safe boot. Temporarily also disable the TPM (trusted platform module). if these settings are really all not there, it can still work normally.

the issue is not that the OS cannot boot, the issue is only that windows is refusing to detect it.

  1. Install Ubuntu version XX as normal and use the main full drive, you should probably remove all partitions here that you have made and start with just a clean drive and install ubuntu only. remove everything windows or ubuntu related from the main drive.

6.Complete the install, remove Ubuntu USB, and do a quick apt-get update and upgrade to get the most basic stuff in order. Reboot again.

  1. Make a partition for the space for windows in Ubuntu gparted for example, look up a guide on how to do this as its too long for this instruction but its not hard. (personally tho, I would try to fit or use another drive for this if possible.) Doublecheck that the partition is OK.

8 Put in the windows USB now, your Linux wont recognize it and that's fine.

9.Reboot. Select to boot from the windows USB or change the order again.

  1. Start the windows installation and then select the partition.

  2. Finish up the install and let it make your localuserprofile etc.

  3. reboot PC, if you kept the order same, change to Ubuntu now if on different drives. otherwise most likely it will just boot into ubuntu now since thats the drive you can choose.

  4. Change the GRUB entry as such

Look at the UUID of your Windows 10 partition, for example:

sudo blkid /dev/sda2

Then edit /etc/grub.d/40_custom, and at the end of the file add:

menuentry "Windows 10" --class windows --class os {
   insmod ntfs
   search --no-floppy --set=root --fs-uuid $your_uuid_here$
   ntldr /bootmgr
}

Don't forget to change the UUID.

And finally update your grub config file:

sudo update-grub

Referenced by this KBA: Add Windows 10 to GRUB OS list

  1. Now you have a few different boot methods to choose from.

Instant Ubuntu, instant windows, or delayed boot into either, or a pause on the grub menu prompting you for a choice. This is done by manually editing the grub file or using the grub editor application in Ubuntu.

Hope this works out for you. It's a bit more tricky (and scary) with partitions, but not impossible. Still..maybe you could buy a large USB stick :P.

Solution 3

@JJD - I've been thru this several times... here is what worked best for me under the assumption, U R trying to move away from Windows for daily use.

Here is what I did:

  1. Using the Windows tool create a VM from your existing Windows installation. Obviously the VM will include all your installed software - but it will also preserve all the crap and useless stuff, so I'd recommend to clean up before creating the VM.
  2. UEFI boot is creating all kinds of issues you don't want to waste your time with (I'm aware this might create a shitstorm). So simply switch it off in your BIOS settings and use "legacy boot".
  3. Perform a clean install of Ubuntu on the system (make sure you keep a copy of your old Windows system's VM on a separate storage!) - by "clean" I mean purge all existing partitions on the system - before you do this, make sure you have a backup!
  4. I use native QEMU to start the Windows VM whenever I need to. There are only two use-cases by now (a) income tax preparation using a Windows tool not available on Linux and (b) look up stuff in the old Windows installation - I haven't touched it for at least one year now. Of course any virtualization GUI tool will work as well.

Hope this helps -mgw

Solution 4

As result of personal experience, some systems have buggy firmware when talking about boot stuff (many people complain about missing boot entries for example...)

The only thing I would do is to start from a completely empty disk; in this way we can exclude any Windows interference:

  • if it solves the issue, you discovered the source of the problem and you have a solid starting point.
  • if neither this helps you, nothing can be done.
Share:
8,859

Related videos on Youtube

JJD
Author by

JJD

Android, Kotlin, Java, Git, Python, Ruby, Ruby on Rails, JavaScript, MacOS, Ubuntu #SOreadytohelp http://stackoverflow.com/10m

Updated on September 18, 2022

Comments

  • JJD
    JJD over 1 year

    I am trying to install Ubuntu 20.04 as a dual boot onto a Toshiba dynabook Satellite Pro L50-G-182 which has Windows 10 preinstalled. I used an Ubuntu live USB stick to install Ubuntu onto the last part of the SSD. The picture shows the disk layout (screenshot taken while booting from USB live stick):

    Disks

    When I restarted after the installation of Ubuntu then Windows started automatically without grub/Ubuntu showing up. I failed to fix this.

    Solution attempts

    There is a bunch of post here and articles with regards to this topic. However, none helped. Here is the short version of what I tried to fix this:

    • I checked the UEFI/BIOS. There is nothing about grub nor Ubuntu.

    • I tried to fix the dual boot from Windows via BCDEdit:

      bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
      
    • I tried Boot-Repair to fix the boot order.

    • I tried to change the boot order. Therefore, I booted from the Ubuntu live USB stick. Here is the output of efibootmgr:

      BootCurrent: 0005
      Timeout: 5 seconds
      BootOrder: 2004,0005,2005,2001,2003
      Boot0000* Linpus lite
      Boot0001* ubuntu
      Boot0002* EFI PXE 0 for IPv4 (7C-D3-0A-90-C7-AB)
      Boot0003* EFI PXE 0 for IPv6 (7C-D3-0A-90-C7-AB)
      Boot0004* Windows Boot Manager
      Boot0005* Linpus lite
      Boot2001* EFI USB Device
      Boot2004* EFI Network
      Boot2004* HDD1/SSD1
      Boot2005* HDD2/SSD2
      

      The ubuntu entry is probably the USB stick? It looks like my Ubuntu partition is not visible. Here is a picture of the Terminal, also with verbose output:

      Terminal screenshot

    • I copied the UEFI entry of "Windows Boot Manager" to create a new entry for Ubuntu.

    Here is how the BIOS, Boot tab (pressing F2) looks like:

    Boot

    Here is how the Security tab looks like:

    Security tab

    Here is how Security tab > Samsung .. looks like:

    Security tab > Samsung ..

    Here is how the Advanced tab looks like:

    Advanced tab

    Here is how Advanced tab > System Configuration looks like:

    Advanced tab > System Configuration

    Here is how the Boot Manager (pressing F12) looks like:

    Boot menu

    EFI System partition (ESP)

    • Here is how the folder structure looks currently (13.01.2021), screenshot taken from Boot Repair USB live stick being loaded:

      ESP

    Related

    Final result

    • First of all, thank you to everyone here for taking your time and sharing ideas and experience how to solve the issue.
    • I have to tell it all went different. I was about to restore the first full disk backup of the machine. By accident, I selected a backup of a another machine running Ubuntu. To my very big surprise - when I rebooted the machine after the clone process finished - Grub showed up and Ubuntu booted without any issue.
    • After that I updated the older Ubuntu installation to the current version and that's what I am running right now. Yes, I lost the Windows installation - but I still have the original backup - just in case.
  • JJD
    JJD over 3 years
    I believe you referring to the EFI (type) partition of the disk. I mounted it. It contains the following folders: Boot, Microsoft, ubuntu. The Boot folder contains the following files: bkpbootx64.efi, bootx64.efi, fbx64.efi, grubx64.efi, mmx64.efi.
  • JJD
    JJD over 3 years
    I installed Ubuntu as explained by you. Windows was pre-installed as stated in my question above. I cannot wipe Windows. After the installation grub never showed up (stated above) and the Ubuntu did not ask me to install grub.
  • JJD
    JJD over 3 years
    Thanks for sharing. WSL is definitely interesting. I might fall back to this option but at the moment I have not given up to get the dual boot setup running.
  • Alex
    Alex over 3 years
    Try making a copy of your windows with clonezilla and do a fresh install. The pre-installed windows my be causing some issues, windows boot manager can be a pain in the ass sometimes. But I would encourage you to double check that no "secure boot" is activated. This was my issue back when I had a Surface Laptop, I just wiped the disk and did a fresh install with secure boot disabled.
  • JJD
    JJD over 3 years
    Thank you for the detailed tutorial! - I made a clean backup (disc image) of the Windows installation (all partitions) before I started my journey. Is there a way to restoring this image into the partition which you described? It contains software which I cannot re-install because I don't have access to the installers.
  • DruidicBearClan
    DruidicBearClan over 3 years
    If you have the full system image you can always just re-install the same version of windows with the stick on the drive, wiping Ubuntu and putting new windows back, and then restore from image backup. what you could try to do tho, is after the Ubuntu install, make sure that the partition exceeds the space of the full backup, then when you install windows, install blank windows from the USB, then choose recover windows from system image. AFAIK, it only cares about the drive letters and allocations and when you only have C:\ that is all it can map to. Should work, and u could always restore.
  • JJD
    JJD over 3 years
    Thanks for sharing. Which Windows VM tool are you referring to to create the VM? I cannot switch UEFI off afaik, only Secure Boot (see above).
  • mgw
    mgw over 3 years
    @JJD - the tool used to be called disk2vhd here is a link
  • mgw
    mgw over 3 years
    @JJD - in the F2 boot menu you should have an option... have u tried Security > Secure Boot and then disable next Advanced > System Configuration you should be able to change the boot mode there?
  • JJD
    JJD over 3 years
    Neither the Advanced nor the Advanced > System Configuration menu do contain an item to change the boot mode.
  • mgw
    mgw over 3 years
    Would you mind posting a screen shot of the advanced system configuration options?
  • JJD
    JJD over 3 years
    I added the screenshots in my post.
  • mgw
    mgw over 3 years
    @JJD how about the security tab from the boot menu...?
  • JJD
    JJD over 3 years
    I added the Security tabs screenshots in my post.
  • Amint
    Amint over 3 years
    This means you installed Ubuntu to EFI. I think you need to reinstall Ubuntu again. Try putting the /boot folder on its own partition instead.