Xubuntu and Windows 10 Side by Side

HugPru

New member
Hi Everyone,

I just got my new PCSpecialist Optimus Series with 1TB PCS PCIe M.2 SSD and 512GB PCS PCIe M.2 SSD.

I have installed the Xubuntu on the 512GB and boot-repaired to append the grubx64.efi on the EFI partition on windows.

The problem is even when changing the {bootmgr} to \EFI\ubuntu\grubx64.efi, grub still doesn't came up and windows still keep appearing.

I need to have both, as windows is for my son studies and I need the linux to work.

If remove windows everything works fine.

 
Last edited:

jerome_jm_martin

Bronze Level Poster
Hi,

dont know if i can help, but boot issues specialy with uefi et secure boot are a nightmare...

if i understand correctly you are using secure boot, but do not use a signed boot loader : it will not work : start to look at this first :

Please enable a repository containing the [grub-efi-amd64-signed] packages in the software sources of Ubuntu 20.04 LTS (nvme1n1p2). Then try again.

J.
 
Hi. I have been exploring how to manage UEFI on various laptops including an UltranoteIII from PCS. I do not dual book MS Windows but boot into LinuxMint19.3 Xfce flavour. I do use MS Windows10 but run it exclusively in VirtualBox and find that it does all I need in the few cases where wine or PlayOnLinux will not run the software.

I found lots of information concerning MBR, GPT, UEFI, Secure Boot plus lots more from https://www.rodsbooks.com/ . Rod's site is extensive but also very long and detailed. It took me days to work out how the different parts of UEFI fit together and to get them to work. So here is a rough and ready description which I hope will help. The bottom line is that if you can boot into rEFInd from a CD, a USB stick or from system disk then it will find any bootable operating systems and allow you to choose into which to boot provided that UEFI boot is set in BIOS. Here I call system firmware BIOS for convenience.

I have Secure Boot turned off but Rod Smith's site explains how to use Secure Boot with REFInd. https://rodsbooks.com/refind/secureboot.html. When I explore Secure Boot I will try and update this post with my experiences.

I reformatted my SSDs GPT (using gdisk often referred to as GPT fdisk) and then got really stuck on how to use Grub2. (Note: UEFI will boot into a MBR (Master Boot Record), partitioned disk but MS Win10 requires a GPT (GUID Partition Table) partition. So if MS Win10 boots you are most likely using GPT. You can find out the partition type used by running GParted and looking at the device information. For info see https://www.rodsbooks.com/gdisk/) I found the solution was to boot the computer from rEFInd (https://rodsbooks.com/refind/). Initially I booted refind from a CD image. rEFIind found all my linux images and I was able to boot into them. However, rEFInd will only boot if you set your machine to UEFI in BIOS (not legacy boot). The fact that rEFInd will boot tells you that you are in UEFI mode. REFInd booted from a CD (or a USB stick) will find all bootable UEFI operating systems on the computer, including MS windows. Rod Smith who wrote rEFInd reckons that it is the easiest way of booting different operating systems and he suggests that grub might be too complicated for general use.

To boot rEFInd from a USB flash drive I found I could create this drive as follows. Format the whole USB (like /dev/sdc) to FAT32, or an individual partition on it (like /dev/sdx1). NB change the letter "x" to the correct one for your system using Gparted or a similar routine. To add refind to the USB flash run refind-install (not install.sh as the documention may suggest) from a terminal. This may already have been installed on your system or can be found at /usr/share/refind, or on a refind iso image. Run it like this in a terminal "refind-install --usedefault /dev/sdx" or "refind-install --usedefault /dev/sdx1" to install on an individual partition, changing "x" to the correct letter.. This will not interfere with anything on the systems hard disk, but run "man refind-install" to find out more about this command before you do it. I found that installing the refind iso image to the USB with a regular utility for creating a bootable USB appeared to work but then would not boot.

After I knew that I could boot into these different linux kernels I installed rEFInd onto the system disk. Installing it can be done from the boot CD or USB, or from a .deb or .rpm file. Initially that did not work because an error said that it could find no EFI partition. I created an EFI partition which must be 1. FAT32, 2. about 550Mb or a bit more and 3. flags set to boot & esp. Installing REFInd will find this partition and set up an EFI directory with a refind subdirectory. Having installed rEFInd, on reboot the rEFInd login screen appeared.

I would point out that up to this point I did not have grub-efi installed. I did not need that to boot from rEFInd which is a boot-loader and a boot-manager which can be used in place of grub2. I think that MS insists that the EFI is the first partition on the disk, /dev/sda1. Linux and rEFInd will work with it as any partition number on an GPT disk, but on MBR it must be a primary partition. If MS windows is installed and boots the EFI partition will already have been correctly set up. Note: If we try and install MS operating systems with Linux already installed I hear that all our hard work in setting up a Linux UEFI system will be overwritten and that Linux will not longer boot. However, rEFInd booted from a USB will find the Linux kernels and can be installed to the system disk to restore the multi-boot capability.

Up to now I had plain grub2 installed and grub would not install in UEFI mode till I installed grub-efi. However, to allow grub to find the UEFI partition, it is first necessary to mount it using a terminal command line similar to this: sudo mkdir /boot/efi; sudo mount /dev/sda1 /boot/efi. After that on running sudo grub-install it found the EFI partition and set itself up. Then it was necessary to run sudo update-grub. REFInd had already found all the linux kernels that grub discovered, so I wonder if grub is necessary. However, it is not necessary to use grub2 at all if rEFInd is installed. Initially grub2 just adds complexity which may be useful once your system is booting in UEFI mode.

REFInd is very configurable. Rod Smith's site has a lot of information about how to manage Secure Boot. On my system Secure Boot is turned off in BIOS. I have not tried using it but Rod explains how to use it with Linux and how to find the security keys that are needed to get it work. https://rodsbooks.com/refind/secureboot.html

I hope this helps and I will try and update it as I find out more about Secure Boot.
Kind wishes, Ian

Altered 20200816 to add how to created bootable USB device.
 
Last edited:
Top