Deleted ubuntu EFI

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












With a pretty red face I am trying to recover my Deepin install.



I had Ubuntu 16.04 installed but wanted to try something different. When I previously removed Ubuntu from my windows dual boot I had to manually remove the ubuntu EFI directory to stop the system launching in the boot menu everytime. Like a moron I tried to do the same with my linux only machine and now everytime I boot I just get:



GNU GRUB version 2.02~berta2-36ubuntu2



I tried just exiting using the exit command but then I just get a message saying install a proper boot device.



I tried to enter failsafe mode from the deepin boot drive to add the efi file back in but I think this is just a live mode so everytime I reboot the ubuntu directory is gone again.



Is there any way to overcome this short of a reinstall? Can I somehow just get the ubuntu efi directory back in there from GRUB or something?



I have now gone through the recovery process as per the comment with Boot-Repair and it still boots in gnu grub.







share|improve this question


















  • 1




    Probably a job for help.ubuntu.com/community/Boot-Repair from a Live-USB...
    – ponsfrilus
    Apr 26 at 11:18






  • 2




    Possible duplicate of How to install the Boot-Repair tool in an Ubuntu live disc?
    – Melebius
    Apr 26 at 12:19














up vote
1
down vote

favorite












With a pretty red face I am trying to recover my Deepin install.



I had Ubuntu 16.04 installed but wanted to try something different. When I previously removed Ubuntu from my windows dual boot I had to manually remove the ubuntu EFI directory to stop the system launching in the boot menu everytime. Like a moron I tried to do the same with my linux only machine and now everytime I boot I just get:



GNU GRUB version 2.02~berta2-36ubuntu2



I tried just exiting using the exit command but then I just get a message saying install a proper boot device.



I tried to enter failsafe mode from the deepin boot drive to add the efi file back in but I think this is just a live mode so everytime I reboot the ubuntu directory is gone again.



Is there any way to overcome this short of a reinstall? Can I somehow just get the ubuntu efi directory back in there from GRUB or something?



I have now gone through the recovery process as per the comment with Boot-Repair and it still boots in gnu grub.







share|improve this question


















  • 1




    Probably a job for help.ubuntu.com/community/Boot-Repair from a Live-USB...
    – ponsfrilus
    Apr 26 at 11:18






  • 2




    Possible duplicate of How to install the Boot-Repair tool in an Ubuntu live disc?
    – Melebius
    Apr 26 at 12:19












up vote
1
down vote

favorite









up vote
1
down vote

favorite











With a pretty red face I am trying to recover my Deepin install.



I had Ubuntu 16.04 installed but wanted to try something different. When I previously removed Ubuntu from my windows dual boot I had to manually remove the ubuntu EFI directory to stop the system launching in the boot menu everytime. Like a moron I tried to do the same with my linux only machine and now everytime I boot I just get:



GNU GRUB version 2.02~berta2-36ubuntu2



I tried just exiting using the exit command but then I just get a message saying install a proper boot device.



I tried to enter failsafe mode from the deepin boot drive to add the efi file back in but I think this is just a live mode so everytime I reboot the ubuntu directory is gone again.



Is there any way to overcome this short of a reinstall? Can I somehow just get the ubuntu efi directory back in there from GRUB or something?



I have now gone through the recovery process as per the comment with Boot-Repair and it still boots in gnu grub.







share|improve this question














With a pretty red face I am trying to recover my Deepin install.



I had Ubuntu 16.04 installed but wanted to try something different. When I previously removed Ubuntu from my windows dual boot I had to manually remove the ubuntu EFI directory to stop the system launching in the boot menu everytime. Like a moron I tried to do the same with my linux only machine and now everytime I boot I just get:



GNU GRUB version 2.02~berta2-36ubuntu2



I tried just exiting using the exit command but then I just get a message saying install a proper boot device.



I tried to enter failsafe mode from the deepin boot drive to add the efi file back in but I think this is just a live mode so everytime I reboot the ubuntu directory is gone again.



Is there any way to overcome this short of a reinstall? Can I somehow just get the ubuntu efi directory back in there from GRUB or something?



I have now gone through the recovery process as per the comment with Boot-Repair and it still boots in gnu grub.









share|improve this question













share|improve this question




share|improve this question








edited Apr 26 at 12:31

























asked Apr 26 at 11:12









user8467470

133




133







  • 1




    Probably a job for help.ubuntu.com/community/Boot-Repair from a Live-USB...
    – ponsfrilus
    Apr 26 at 11:18






  • 2




    Possible duplicate of How to install the Boot-Repair tool in an Ubuntu live disc?
    – Melebius
    Apr 26 at 12:19












  • 1




    Probably a job for help.ubuntu.com/community/Boot-Repair from a Live-USB...
    – ponsfrilus
    Apr 26 at 11:18






  • 2




    Possible duplicate of How to install the Boot-Repair tool in an Ubuntu live disc?
    – Melebius
    Apr 26 at 12:19







1




1




Probably a job for help.ubuntu.com/community/Boot-Repair from a Live-USB...
– ponsfrilus
Apr 26 at 11:18




Probably a job for help.ubuntu.com/community/Boot-Repair from a Live-USB...
– ponsfrilus
Apr 26 at 11:18




2




2




Possible duplicate of How to install the Boot-Repair tool in an Ubuntu live disc?
– Melebius
Apr 26 at 12:19




Possible duplicate of How to install the Boot-Repair tool in an Ubuntu live disc?
– Melebius
Apr 26 at 12:19










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Since the efi ubuntu directory has been deleted you would have to copy the efi files from a live cd of the same version as your current ubuntu



So lets first Boot into a live cd of Ubuntu 16.04 LTS .
Sometimes other versions of ubuntu would work but don't use another distro to do the live cd



open your terminal and list the partitions on your computer



lsblk


yOu get something like



sda 8:0 0 931.5G 0 disk 
├─sda1 8:1 0 601.4G 0 part
├─sda2 8:2 0 325.2G 0 part
└─sda3 8:3 0 200M 0 part
sr1 11:1 1 1024M 0 rom
sdb
├─sdb1 8:1 0 4.4G 0 part /media/user/pendrive


Guess your linux ext4 filesytem, sdXY . In this case mine was sda1. Replace it with your own



Now we should mount the linux filesystem:



sudo mount /dev/sdXY /mnt


mount some other required things:



for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done


Now chroot into the mounted partition.



sudo chroot /mnt


You should now be in your old ubuntu filesystem



Now Create the directory where grub would install the files:



# mkdir -p /boot/efi


lets identify our EFI partition:



lsblk


it is usually around 100MB or 200MB. Mine was sda3. I would be representing it using sdxy. The disk is sda.



Now mount the efi partition:



# mount /dev/sdxy /boot/efi 


Install grub to the disk:



# apt install efibootmgr
# grub-install /dev/sdX


grub would install all the nessary efi files required to boot your PC



After installing grub do:



# update-grub


When you are done exit the chroot:



# exit


Now reboot:



reboot


Hopefully this should fix it






share|improve this answer




















  • Thanks ptetteh, really in-depth answer and much appreciated
    – user8467470
    Apr 27 at 9:34










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028375%2fdeleted-ubuntu-efi%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Since the efi ubuntu directory has been deleted you would have to copy the efi files from a live cd of the same version as your current ubuntu



So lets first Boot into a live cd of Ubuntu 16.04 LTS .
Sometimes other versions of ubuntu would work but don't use another distro to do the live cd



open your terminal and list the partitions on your computer



lsblk


yOu get something like



sda 8:0 0 931.5G 0 disk 
├─sda1 8:1 0 601.4G 0 part
├─sda2 8:2 0 325.2G 0 part
└─sda3 8:3 0 200M 0 part
sr1 11:1 1 1024M 0 rom
sdb
├─sdb1 8:1 0 4.4G 0 part /media/user/pendrive


Guess your linux ext4 filesytem, sdXY . In this case mine was sda1. Replace it with your own



Now we should mount the linux filesystem:



sudo mount /dev/sdXY /mnt


mount some other required things:



for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done


Now chroot into the mounted partition.



sudo chroot /mnt


You should now be in your old ubuntu filesystem



Now Create the directory where grub would install the files:



# mkdir -p /boot/efi


lets identify our EFI partition:



lsblk


it is usually around 100MB or 200MB. Mine was sda3. I would be representing it using sdxy. The disk is sda.



Now mount the efi partition:



# mount /dev/sdxy /boot/efi 


Install grub to the disk:



# apt install efibootmgr
# grub-install /dev/sdX


grub would install all the nessary efi files required to boot your PC



After installing grub do:



# update-grub


When you are done exit the chroot:



# exit


Now reboot:



reboot


Hopefully this should fix it






share|improve this answer




















  • Thanks ptetteh, really in-depth answer and much appreciated
    – user8467470
    Apr 27 at 9:34














up vote
0
down vote













Since the efi ubuntu directory has been deleted you would have to copy the efi files from a live cd of the same version as your current ubuntu



So lets first Boot into a live cd of Ubuntu 16.04 LTS .
Sometimes other versions of ubuntu would work but don't use another distro to do the live cd



open your terminal and list the partitions on your computer



lsblk


yOu get something like



sda 8:0 0 931.5G 0 disk 
├─sda1 8:1 0 601.4G 0 part
├─sda2 8:2 0 325.2G 0 part
└─sda3 8:3 0 200M 0 part
sr1 11:1 1 1024M 0 rom
sdb
├─sdb1 8:1 0 4.4G 0 part /media/user/pendrive


Guess your linux ext4 filesytem, sdXY . In this case mine was sda1. Replace it with your own



Now we should mount the linux filesystem:



sudo mount /dev/sdXY /mnt


mount some other required things:



for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done


Now chroot into the mounted partition.



sudo chroot /mnt


You should now be in your old ubuntu filesystem



Now Create the directory where grub would install the files:



# mkdir -p /boot/efi


lets identify our EFI partition:



lsblk


it is usually around 100MB or 200MB. Mine was sda3. I would be representing it using sdxy. The disk is sda.



Now mount the efi partition:



# mount /dev/sdxy /boot/efi 


Install grub to the disk:



# apt install efibootmgr
# grub-install /dev/sdX


grub would install all the nessary efi files required to boot your PC



After installing grub do:



# update-grub


When you are done exit the chroot:



# exit


Now reboot:



reboot


Hopefully this should fix it






share|improve this answer




















  • Thanks ptetteh, really in-depth answer and much appreciated
    – user8467470
    Apr 27 at 9:34












up vote
0
down vote










up vote
0
down vote









Since the efi ubuntu directory has been deleted you would have to copy the efi files from a live cd of the same version as your current ubuntu



So lets first Boot into a live cd of Ubuntu 16.04 LTS .
Sometimes other versions of ubuntu would work but don't use another distro to do the live cd



open your terminal and list the partitions on your computer



lsblk


yOu get something like



sda 8:0 0 931.5G 0 disk 
├─sda1 8:1 0 601.4G 0 part
├─sda2 8:2 0 325.2G 0 part
└─sda3 8:3 0 200M 0 part
sr1 11:1 1 1024M 0 rom
sdb
├─sdb1 8:1 0 4.4G 0 part /media/user/pendrive


Guess your linux ext4 filesytem, sdXY . In this case mine was sda1. Replace it with your own



Now we should mount the linux filesystem:



sudo mount /dev/sdXY /mnt


mount some other required things:



for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done


Now chroot into the mounted partition.



sudo chroot /mnt


You should now be in your old ubuntu filesystem



Now Create the directory where grub would install the files:



# mkdir -p /boot/efi


lets identify our EFI partition:



lsblk


it is usually around 100MB or 200MB. Mine was sda3. I would be representing it using sdxy. The disk is sda.



Now mount the efi partition:



# mount /dev/sdxy /boot/efi 


Install grub to the disk:



# apt install efibootmgr
# grub-install /dev/sdX


grub would install all the nessary efi files required to boot your PC



After installing grub do:



# update-grub


When you are done exit the chroot:



# exit


Now reboot:



reboot


Hopefully this should fix it






share|improve this answer












Since the efi ubuntu directory has been deleted you would have to copy the efi files from a live cd of the same version as your current ubuntu



So lets first Boot into a live cd of Ubuntu 16.04 LTS .
Sometimes other versions of ubuntu would work but don't use another distro to do the live cd



open your terminal and list the partitions on your computer



lsblk


yOu get something like



sda 8:0 0 931.5G 0 disk 
├─sda1 8:1 0 601.4G 0 part
├─sda2 8:2 0 325.2G 0 part
└─sda3 8:3 0 200M 0 part
sr1 11:1 1 1024M 0 rom
sdb
├─sdb1 8:1 0 4.4G 0 part /media/user/pendrive


Guess your linux ext4 filesytem, sdXY . In this case mine was sda1. Replace it with your own



Now we should mount the linux filesystem:



sudo mount /dev/sdXY /mnt


mount some other required things:



for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done


Now chroot into the mounted partition.



sudo chroot /mnt


You should now be in your old ubuntu filesystem



Now Create the directory where grub would install the files:



# mkdir -p /boot/efi


lets identify our EFI partition:



lsblk


it is usually around 100MB or 200MB. Mine was sda3. I would be representing it using sdxy. The disk is sda.



Now mount the efi partition:



# mount /dev/sdxy /boot/efi 


Install grub to the disk:



# apt install efibootmgr
# grub-install /dev/sdX


grub would install all the nessary efi files required to boot your PC



After installing grub do:



# update-grub


When you are done exit the chroot:



# exit


Now reboot:



reboot


Hopefully this should fix it







share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 26 at 13:53









ptetteh227

703115




703115











  • Thanks ptetteh, really in-depth answer and much appreciated
    – user8467470
    Apr 27 at 9:34
















  • Thanks ptetteh, really in-depth answer and much appreciated
    – user8467470
    Apr 27 at 9:34















Thanks ptetteh, really in-depth answer and much appreciated
– user8467470
Apr 27 at 9:34




Thanks ptetteh, really in-depth answer and much appreciated
– user8467470
Apr 27 at 9:34

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028375%2fdeleted-ubuntu-efi%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491