Writing GRUB to boot device failed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Running apt-get update; apt-get upgrade for the first time in a few months, I get an error
```
Writing GRUB to boot device failed - continue
GRUB failed to install to the following devices:
[*] /dev/nvme1n1p1 (104 MB; /boot/efi) 1000204 MB WDC WDS100T2B0C-00PXH0
```
Retrying fails.
Running
```
$ sudo dpkg-reconfigure --force grub-efi-amd64
```
Gives the following output:
```
Installing grub to /boot/efi.
Installing for x86_64-efi platform.
grub-install: warning: Internal error.
grub-install: error: failed to register the EFI boot entry: Operation not permitted.
Installing grub to /boot/efi.
Installing for x86_64-efi platform.
grub-install: warning: Internal error.
grub-install: error: failed to register the EFI boot entry: Operation not permitted.
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found Windows Boot Manager on /dev/nvme1n1p1@
Adding boot menu entry for UEFI Firmware Settings
done
```
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: grub-efi-amd64 2.04-1ubuntu26.6
ProcVersionSign
Uname: Linux 5.4.0-52-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Fri Nov 13 21:38:56 2020
InstallationDate: Installed on 2020-05-23 (175 days ago)
InstallationMedia: Xubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
SourcePackage: grub2
UpgradeStatus: Upgraded to focal on 2020-05-29 (169 days ago)
Likely the same as https:/ /bugs.launchpad .net/ubuntu/ +source/ grub2-signed/ +bug/1872212.
Note that:
1) drive uses gpt, not mbr
2) EFI partition is not logical partition AFAICS
3) there are no dump files as described in $ root parted /dev/nvme1n1
GNU Parted 3.3
Using /dev/nvme1n1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: WDC WDS100T2B0C-00PXH0 (nvme)
Disk /dev/nvme1n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 106MB 105MB fat32 EFI system partition boot, esp
2 106MB 123MB 16.8MB Microsoft reserved partition msftres
3 123MB 1000GB 1000GB ntfs Basic data partition msftdata
4 1000GB 1000GB 530MB ntfs hidden, diag
```
$ root parted /dev/nvme1n1
GNU Parted 3.3
Using /dev/nvme1n1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: WDC WDS100T2B0C-00PXH0 (nvme)
Disk /dev/nvme1n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 106MB 105MB fat32 EFI system partition boot, esp
2 106MB 123MB 16.8MB Microsoft reserved partition msftres
3 123MB 1000GB 1000GB ntfs Basic data partition msftdata
4 1000GB 1000GB 530MB ntfs hidden, diag
```