3

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.

There are a bunch of posts here and articles about this topic, however none of them 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 with verbose output:

Terminal screenshot

BIOS, Boot tab (accessed by pressing F2)e:

Boot

Security tab:

Security tab

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

Security tab > Samsung ..

Here is how t looks likhe Advanced tab looks like:

Advanced tab

Advanced tab -> System Configuration:

Advanced tab -> System Configuration

Boot Manager (accessed by pressing F12):

Boot menu

EFI System partition:

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

ESP

It all went differently. 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.

karel
  • 114,770
JJD
  • 862
  • I tried efibootmgr -o 0001,2004,0005,2005,2001,2003. Still Windows is booting. – JJD Jan 04 '21 at 17:55
  • 1
    Post link to Summary Report from Boot-Repair. And change post of efibootmgr output to sudo efibootmgr -v which then shows details on boot configuration. The drive boot entries are normally fallback entries the use /EFI/Boot/bootx64.efi. The bootx64.efi is usually a copy of WIndows .efi boot file. But Ubuntu/Boot-Repair typically makes it a copy of shimx64.efi, so drive boot in UEFI mode also boots Ubuntu. – oldfred Jan 04 '21 at 18:01
  • @oldfred I added the output of sudo efibootmgr -v as a picture. – JJD Jan 04 '21 at 18:10
  • 1
    Remove old Linpus UEFI entries with efibootmgr -b. see: man efibootmgr An example: https://askubuntu.com/questions/63610/how-do-i-remove-ubuntu-in-the-bios-boot-menu-uefi Change entry in Windows to this: bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi Not sure if either will fix things. Also update UEFI to newest available, but you then may have to restore some UEFI settings as it usually reverts to defaults. Settings like UEF bootI, AHCI and "Other" not "Windows" as UEFI setting. – oldfred Jan 04 '21 at 18:22
  • I removed both the 0 and 5 entries. I rebooted into Windows and executed the bcdedit command. I rebooted and still Windows launches. The BIOS version is the latest version 1.80 as offered here. – JJD Jan 04 '21 at 19:44
  • Here is the report from Boot-Repair after I tried it again just now. Please note that I meanwhile tried to copy the boot entry (as mentioned in my question). – JJD Jan 04 '21 at 21:11
  • Do entries 0006 or 7 boot Ubuntu as they look like the one's from your BCD edit. Some systems only want to update UEFI order from within your UEFI, and do not recognize using efibootmgr. Grub uses efibootmgr to both add entries and change boot order to make grub first. Check UEFI settings tab for menu f2? (not menu f12?). – oldfred Jan 04 '21 at 21:26
  • None of the entries boots Ubuntu. If I have a look at the BIOS (F2) then there is no entry about Ubuntu nor Windows. Only, the SSD is listed at position HDD1/SSD1 in Boot tab. – JJD Jan 06 '21 at 07:07
  • Is there a sub-menu then or some setting as UEFI normally shows lots of boot options in boot tab, so you can change boot order there. And do all the options shown in efibootmgr show in boot key f12? – oldfred Jan 06 '21 at 14:25
  • I appended two pictures (BIOS, Boot Manager) to my post. I could not find anything helpful in both cases. – JJD Jan 06 '21 at 16:53
  • Have you updated UEFI to latest available from vendor? It may reset some settings to defaults so double check those right after update. I keep a list as my motherboard has multiple settings I have to redo. – oldfred Jan 06 '21 at 18:14
  • Yes, it is the latest version 1.80 (see comment above). I also loaded the "optimal defaults" but nothing changed. – JJD Jan 06 '21 at 18:34
  • 1
    Note sure what else to suggest. Some open additional settings if Secure Boot on like Acer does. Not sure about your system. Toshiba Satellite Boot Order not found https://ubuntuforums.org/showthread.php?t=2449037 – oldfred Jan 06 '21 at 19:25
  • I re-enabled Secure Boot and set a password. I also set a supervisor password. I cannot recognize new options in the BIOS (F2) nor in the Boot Manager (F12). – JJD Jan 09 '21 at 10:54
  • You have to install in UEFI Secure boot mode and typically in UEFI have to turn on or allow USB boot or full USB support as allowing boot from USB is also not considered secure. Resetting to default, reverts UEFI settings your have changed. You often then have to redo RAID to AHCI. Often easier with Secure boot off, but should also work with it on, but complications if you need proprietary drivers as you have to create your own secure boot keys for anything proprietary. – oldfred Jan 09 '21 at 15:14
  • I had Secure Boot on when I tried to install Ubuntu for the first time. The setup or some tutorial told me to switch Secure Boot - I do not remember exactly. I installed Ubuntu from a USB live stick. - I reset the BIOS for the first time in the cause of our conversation not earlier. – JJD Jan 10 '21 at 11:15
  • Boot-Repair copied shimx64.efi to /EFI/Boot/bootx64.efi. That is a drive or fallback entry. Normally UEFI should boot from named entries like Windows or ubuntu. The drive entry then is a fallback or default entry. Orginally bootx64.efi would be a copy of Windows /efi/Microsoft/Boot/bootmgfw.efi boot file. – oldfred Jan 10 '21 at 15:39
  • See if your machine has secure boot enabled. If it's enabled, chances are high that your installation might succeed but fails silently in reality. It may not be the root cause but if the BIOS has the option you'd better disable it before installing Ubuntu. Since you had tried many things I'd recommend give a second shot on installing again along with Windows once again by disabling secure boot. Have a look at this article here – Jijo Joseph Jan 11 '21 at 05:58
  • Install shim and boot into grub2 ... – Martin Zeitler Jan 12 '21 at 00:48
  • @MartinZeitler From my understanding shim has been installed when I installed Ubuntu. At least I can see that there is a file named shimx64.efi in the EFI System Partition (see picture above). – JJD Jan 13 '21 at 17:09

7 Answers7

1

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.
mattia.b89
  • 712
  • 5
  • 12
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

Alex
  • 11
  • 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 Jan 13 '21 at 16:00
  • 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. – Alex Jan 13 '21 at 20:41
1

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.

  • 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. – JJD Jan 14 '21 at 22:25
  • 1
    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. – DruidicBearClan Jan 14 '21 at 22:32
1

@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

mgw
  • 134
  • 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). – JJD Jan 15 '21 at 20:21
  • @JJD - the tool used to be called disk2vhd here is a link – mgw Jan 16 '21 at 11:12
  • @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? – mgw Jan 16 '21 at 11:44
  • Neither the Advanced nor the Advanced > System Configuration menu do contain an item to change the boot mode. – JJD Jan 16 '21 at 11:57
  • Would you mind posting a screen shot of the advanced system configuration options? – mgw Jan 16 '21 at 18:08
  • I added the screenshots in my post. – JJD Jan 17 '21 at 17:54
  • @JJD how about the security tab from the boot menu...? – mgw Jan 18 '21 at 08:17
  • I added the Security tabs screenshots in my post. – JJD Jan 19 '21 at 22:37
0

List the contents of /boot/efi. If you don't find it, you installed Ubuntu into Legacy, and then turned it off. You may need to reinstall it again.

Amint
  • 434
  • 1
    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 Jan 13 '21 at 14:34
  • 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. – Amint Jan 30 '21 at 15:27
0

From my understanding, if you plan to use bootmgr(legacy mode) you will need to change uefi to legacy mode thru settings. Once this is complete you can do as you wish. you can run ubuntu 20.04 as a VM using the built in wsl but you will need to update to wsl2, install x410Here is a link to get you started x410 has been the only way so far I've found to get it up and running(this is a paid app).

  • 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. – JJD Jan 13 '21 at 16:19
0

ATTEMPT AT YOUR OWN RISK OF LOCKING YOURSELF OUT OF WINDOWS:

-Go into Security within your BIOS program

-Clear Secure Boot Keys

-Disable Secure Boot

[This has worked for me in the past for a similar issue]

However, it appears that someone with the same issue has found an answer, here:

Issue installing LTS-20.04 onto HP Spectre x360 computer (dual booting with windows). Upon booting, grub does not appear