1

I already tried the following:

$ sudo apt install --reinstall grub
$ sudo apt install --reinstall grub2-common
$ sudo apt install --reinstall grub-efi-amd64
$ sudo apt install --reinstall grub-efi-amd64-bin
$ sudo apt autoremove
$ sudo apt install grub-efi-amd64-signed

I get this:

Errors were encountered while processing:
 grub-efi-amd64-signed
 shim-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Since my topic was marked as duplicate, I showed the generosity to double check the same topic which I've already checked.

ii  linux-headers-4.15.0-39                4.15.0-39.42 all          Header files related to Linux kernel version 4.15.0
ii  linux-headers-4.15.0-39-generic        4.15.0-39.42 amd64        Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii  linux-image-4.15.0-39-generic          4.15.0-39.42 amd64        Signed kernel image generic

nodes are below and I don't know how to empty them:

Filesystem     Inodes IUsed IFree IUse% Mounted on
udev             978K   535  977K    1% /dev
tmpfs            985K  1.1K  984K    1% /run
/dev/sda2         59M  176K   59M    1% /
tmpfs            985K    92  985K    1% /dev/shm
tmpfs            985K     5  985K    1% /run/lock
tmpfs            985K    18  985K    1% /sys/fs/cgroup
/dev/loop0        747   747     0  100% /snap/gnome-system-monitor/57
/dev/loop4       1.7K  1.7K     0  100% /snap/gnome-logs/45
/dev/loop7        27K   27K     0  100% /snap/gnome-3-26-1604/74
/dev/loop1        13K   13K     0  100% /snap/core/5742
/dev/loop3       1.6K  1.6K     0  100% /snap/gnome-characters/139
/dev/loop6         35    35     0  100% /snap/canonical-livepatch/50
/dev/loop5        24K   24K     0  100% /snap/spotify/26
/dev/loop8        13K   13K     0  100% /snap/core/5897
/dev/loop9       1.3K  1.3K     0  100% /snap/gnome-calculator/260
/dev/loop2        27K   27K     0  100% /snap/gtk-common-themes/818
/dev/sda1           0     0     0     - /boot/efi
tmpfs            985K    24  985K    1% /run/user/121
tmpfs            985K    35  985K    1% /run/user/1000
6
  • I see an issue about this: bugs.launchpad.net/bugs/1776271 Nov 23, 2018 at 9:27
  • Related to space for EFI variable. Some work arounds: bugs.launchpad.net/ubuntu/+source/shim-signed/+bug/1776271 & ubuntuforums.org/showthread.php?t=2401166 An older version of grub or my UEFI added every entry I had in my ESP as I had backed up /EFI/ubuntu multiple times with multiple installs. That seemed to overfill the efi variable space.
    – oldfred
    Nov 23, 2018 at 14:43
  • Your /dev/sda1 seems to have no space at all, total, used or free. What sort of filessytem is mounted there? It should be a FAT filesystem.
    – ubfan1
    Nov 26, 2018 at 19:42
  • @ubfan1, I let Ubuntu create everything, I'm not dual booting anything and only have 18.04.
    – codear
    Nov 27, 2018 at 5:56
  • Something is wrong with sdb1. Please post the output of: sudo fdisk -l /dev/sdb |grep sdb1 and also the output of: mount |grep sdb1
    – ubfan1
    Nov 27, 2018 at 16:18

2 Answers 2

2

Im not an expert at this topic at all but

Could not prepare Boot variable: No space left on device

sounds to me like the efi partition might be out of space. You could try to check the size of your boot partition and see if there's enough space available

3
  • +1 for that great observation... Nov 23, 2018 at 10:24
  • I haven't created the partitions myself but the report is added to topic now.
    – codear
    Nov 23, 2018 at 12:55
  • 512 MB efi partition is very unlikely to be full. According to the information I listed, it is more likely to be related to previous 17.10 issue. SPI flash is locked so you can't write any variables into nvram. Nov 23, 2018 at 14:17
0

I experienced the same error today. My /boot/efi partition still had lots of free space though. Before you do anything note that your system possibly won't be able to boot after a restart. So prepare yourself beforehand.

In my case I could solve it with a simple grub reinstall by using boot-repair.

  1. Boot from Ubuntu Live USB-Stick (in EFI-mode if your system is installed in EFI-mode)
  2. Install and launch boot-repair: sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install -y boot-repair && boot-repair

  3. Choose "Recommended Repair"

  4. Restart your system, it should boot into your OS now.

4
  • Thanks for the heads-up Doopy! I don't have a stick around me but I have a DVD. Will this resolve the issue itself or just the booting issue?
    – codear
    Nov 23, 2018 at 15:34
  • Hello @Doopy, I restarted my PC but had no issue. However, I'm still unable to do any updates. Do I have to reinstall Ubuntu or can I find a way to fix this? Please note that I have 0 knowledge in linux ^.^
    – codear
    Nov 23, 2018 at 19:28
  • @CoşkuDenizArabacıoğlu This will fix the grub issue and allow you to update again. You don't have to reinstall Ubuntu, just follow my suggested steps if you don't find a better way. You should be able to simply put in your DVD, reboot and then have the choice to "Try Out Ubuntu" or something. If not, this should help.
    – Doopy
    Nov 24, 2018 at 16:11
  • I have the previous version in my DVD so I'm waiting till I get my usb from the supplier. I will follow your suggestion then.
    – codear
    Nov 26, 2018 at 14:04

You must log in to answer this question.

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