3

So, I got this Dell Inspiron 15 laptop with Windows 10 a couple of months ago. I installed Ubuntu 14.04 to have as dual boot since I rarely use Windows.

Today, I did an update and some grub related packages were kept. I don't know what I was thinking but I went on and sudo installed the kept back packages.

After reboot, I get an invalid signature error and I get redirected to a Windows boot.

Is there a way to rectify the situation? My knowledge of EFI, secure boot and their interaction is fairly limited (going through info pages as I write this).

5
  • When you installed ubuntu - did you install it with secure boot enabled (UEFI setting) ?
    – cl-netbox
    Oct 2, 2015 at 17:11
  • i was oblivious that there was such a setting, so my guess is yes, since I haven't changed anything in BIOS so far.
    – compor
    Oct 2, 2015 at 17:37
  • i'm 99% sure, but how can I check in order to be completely positive?
    – compor
    Oct 2, 2015 at 17:58
  • Boot into BIOS (UEFI) and check whether secure boot is turned on or off.
    – cl-netbox
    Oct 2, 2015 at 17:59
  • it is turned on; I've checked that. not enough rep to start a chat btw.
    – compor
    Oct 2, 2015 at 18:00

2 Answers 2

1

As I do not know whether Microsoft did change the boot loader signature with the update
(this anyway would be off-topic here) I suggest the following procedure:

First disable hibernation and Fast Boot in Windows.

Boot into Windows - open command prompt as administrator and execute this command:

powercfg /h off  

Then disable (uncheck) Fast Boot in Control Panel -> Energy Settings (show hidden settings).

Shutdown the machine (do NOT reboot) completely.

Then reinstall GRUB bootloader to your Ubuntu installation in EFI mode.

Boot from the Ubuntu install media - then open a terminal and execute:

sudo mount /dev/sd*** /mnt
sudo mount /dev/sd** /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sd*
update-grub  

Note :

sd* = disk | sd** = efi partition | sd*** = system partition

If you do not know the partition numbers you can easily identify them with GParted.
The (Graphic User Interface) tool is already included in the Ubuntu installation media.

If this solution does not work you unfortunately will have to reinstall ubuntu in insecure mode.
Boot into BIOS (UEFI) and disable Secure Boot, then reinstall ubuntu in the way you did before.

9
  • what if I just disable "secure boot" as it is now? Also, if I follow your steps, and install with secure boot disabled, what will happen to windows?
    – compor
    Oct 2, 2015 at 18:37
  • When reinstalling GRUB in secure boot mode does not work, then disable secure boot and reinstall GRUB with secure boot disabled. Only when both ways don't work you need to reinstall ubuntu - and ... nothing will happen to Windows ... :)
    – cl-netbox
    Oct 2, 2015 at 18:41
  • my disk is sda, sda2 the efi partition and sda6 my system. I get an error "failed to get canonical path of /dev/sda2 on grub-install step. I also had to use --efi-directory because it is named EFI (which contains subdirs Boot, Microsoft,ubuntu)
    – compor
    Oct 2, 2015 at 19:18
  • I used them as such, with proper numbers per partition, that's what I'm trying to say.
    – compor
    Oct 2, 2015 at 19:30
  • is there a point in rebooting since I get the error described above while trying to reinstall grub? and yes they are the correct numbers.
    – compor
    Oct 2, 2015 at 19:41
0

So, after several hours of catching up with the EFI documentation and even trying out rEFInd bootloader (which didn't work; I was getting the same message as for grub), I decided to disable 'secure boot' from the BIOS menu and it worked.

It seems that with my forced update I've overwritten the already cryptographically signed bootloader that Ubuntu was using since initial installation (I believe it is called shim).

Still though, I haven't understood how shim is used instead of grub. (My guess is that it has to do with the configuration on the ESP; someone can correct me or answer this for me).

2
  • I don't know from where exactly you deduce that since you proposed a re-install and many of my questions were not answered. As I had written down, I just had no clue about EFI and the related concepts. In principle, I shouldn't give any points or accept your answer as it was misleading and didn't have the appropriate "stackexchange mentality" of explaining. It seems that you only care for rep/badges/etc, so I guess you can have it; I hate to disappoint.
    – compor
    Oct 3, 2015 at 11:41
  • First of all I am very glad that everything is working for you now ! Generally these "boot things" are a little bit complex and so solutions sometimes take their time. It is not easy always, especially when you think of different knowledge levels users have. As you can see in my profile I already helped many users to get their machines 'up and running' ... and please believe me, it's not for badges etc. - My approach is to help and I only get satisfaction from when problems were solved in the end. Thank you for collaboration and accepting the answer and ... enjoy ubuntu experience ! Cheers :)
    – cl-netbox
    Oct 3, 2015 at 12:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .