0
I messed up the EFI partition and now when I boot my computer it opens the BIOS interface without any boot option, as if my disk has been erased. However using a live USB (which is correctly recognised and booted) and using grub command line I've been able to boot my principal OS (Ubuntu). However I don't know how to fix this problem. I've tried running grub-install /dev/sda but it didn't changed anything.
The EFI partition seems completely fine: it has the correct flag (esp, boot) and there are all the correct files inside.
tree /boot/efi/
└── EFI
├── Boot
│ └── bootx64.efi
├── Microsoft
│ ├── Boot
│ .....
└── ubuntu
├── fbx64.efi
├── fw
├── fwupx64.efi
├── grub.cfg
├── grubx64.efi
├── mmx64.efi
└── shimx64.efi
What I should check? What I'm missing?
This is my partition table:
parted /dev/sda print
Model: ATA Crucial_CT525MX3 (scsi)
Disk /dev/sda: 525GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 1612MB 1611MB fat32 EFI System Partition boot, esp
2 1612MB 87.9GB 86.3GB ext4 Ubuntu
3 87.9GB 281GB 193GB ext4 Home
5 290GB 290GB 16.8MB Microsoft reserved partition msftres
6 290GB 405GB 115GB ntfs Basic data partition msftdata
8 405GB 500GB 94.4GB ntfs Data msftdata
9 500GB 525GB 25.3GB ext4 Backup OS
The EFI partition is set up properly as you can see:
~# efibootmgr
BootCurrent: 0006
Timeout: 2 seconds
BootOrder: 0006,0002,0003,0001,0000,0005
Boot0000* ubuntu
Boot0001* Windows Boot Manager
Boot0002* grub
Boot0003* Windows Boot Manager
Boot0005* GRUB
Boot0006* UEFI: SA04G PMAP
How exactly did you "mess it up"? What did you do to it? – Mokubai – 2017-04-21T10:14:14.007
I don't know exactly because I updated Ubuntu and shrinked the EFI partition in the same session. Then I restored the original size trying to fix it but it didn't worked – skdys – 2017-04-21T10:24:10.270
Try unmounting the EFI System Partition (ESP) and running
dosfsck
on it. It could be that it's damaged. In a worst-case scenario, backing up the files (withtar
,zip
, or simplycp
), creating a fresh filesystem on the partition, and then restoring the files may be necessary. – Rod Smith – 2017-04-21T18:57:14.407