Reinstalling Windows 10 on dual-booted system, accidently deleted EFI partition












0















I had dual-booted my system with Kubuntu 18.04 and Windows 10, and had to reinstall Windows 10 because I was messing around with the system.



During the installation, I chose the manual partition selection on where to install Windows and deleted all the partitions except for the Kubuntu and swap partitions. Meaning I inadvertently deleted the EFI partition that housed GRUB2.



I booted up a Live-USB and was able to find that the EFI partition is now on sda2, and I believe it was on sda1 before, so I'm guessing I'll have to edit the fstab file on my current Kubuntu partition as well.



I'm not entirely sure what the best route would be to reinstall GRUB2 now, since I actually deleted the partition and Windows 10 created a new EFI partition. I can't access my Kubuntu install at all as grub doesn't exist on my system any longer.



Edit:



So here is my sudo fdisk -l



Disk /dev/loop0: 1.5 GiB, 1564921856 bytes, 3056488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 978.1 GiB, 1050214588416 bytes, 2051200368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D62B32DE-63E8-4C2C-9BA7-6C17B7B8120B

Device Start End Sectors Size Type
/dev/sda1 2048 1023999 1021952 499M Windows recovery environment
/dev/sda2 1024000 1228799 204800 100M EFI System
/dev/sda3 1228800 1261567 32768 16M Microsoft reserved
/dev/sda4 1261568 1048578047 1047316480 499.4G Microsoft basic data
/dev/sda5 1048578048 1468006399 419428352 200G Microsoft basic data
/dev/sda6 1468008448 2011199487 543191040 259G Linux filesystem
/dev/sda7 2011199488 2051198975 39999488 19.1G Linux swap


Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 2A813941-89E0-495E-8B3E-A99F0578EFD3

Device Start End Sectors Size Type
/dev/sdb1 2048 1953521632 1953519585 931.5G Microsoft basic data


I mounted my sda2 to /mnt and then tried to bind mount using:



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


This is the error I get:



mount: mount point /mnt/sys does not exist
mount: mount point /mnt/proc does not exist
mount: mount point /mnt/run does not exist
mount: mount point /mnt/dev does not exist









share|improve this question




















  • 2





    Possible duplicate of How can I repair grub? (How to get Ubuntu back after installing Windows?)

    – karel
    Jan 16 at 3:23











  • See this as you also have to mount the ESP: UEFI chroot: askubuntu.com/questions/53578/… usually Boot-Repair works in its advanced mode and a total uninstall/reinstall of grub. help.ubuntu.com/community/Boot-Repair

    – oldfred
    Jan 16 at 4:34


















0















I had dual-booted my system with Kubuntu 18.04 and Windows 10, and had to reinstall Windows 10 because I was messing around with the system.



During the installation, I chose the manual partition selection on where to install Windows and deleted all the partitions except for the Kubuntu and swap partitions. Meaning I inadvertently deleted the EFI partition that housed GRUB2.



I booted up a Live-USB and was able to find that the EFI partition is now on sda2, and I believe it was on sda1 before, so I'm guessing I'll have to edit the fstab file on my current Kubuntu partition as well.



I'm not entirely sure what the best route would be to reinstall GRUB2 now, since I actually deleted the partition and Windows 10 created a new EFI partition. I can't access my Kubuntu install at all as grub doesn't exist on my system any longer.



Edit:



So here is my sudo fdisk -l



Disk /dev/loop0: 1.5 GiB, 1564921856 bytes, 3056488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 978.1 GiB, 1050214588416 bytes, 2051200368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D62B32DE-63E8-4C2C-9BA7-6C17B7B8120B

Device Start End Sectors Size Type
/dev/sda1 2048 1023999 1021952 499M Windows recovery environment
/dev/sda2 1024000 1228799 204800 100M EFI System
/dev/sda3 1228800 1261567 32768 16M Microsoft reserved
/dev/sda4 1261568 1048578047 1047316480 499.4G Microsoft basic data
/dev/sda5 1048578048 1468006399 419428352 200G Microsoft basic data
/dev/sda6 1468008448 2011199487 543191040 259G Linux filesystem
/dev/sda7 2011199488 2051198975 39999488 19.1G Linux swap


Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 2A813941-89E0-495E-8B3E-A99F0578EFD3

Device Start End Sectors Size Type
/dev/sdb1 2048 1953521632 1953519585 931.5G Microsoft basic data


I mounted my sda2 to /mnt and then tried to bind mount using:



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


This is the error I get:



mount: mount point /mnt/sys does not exist
mount: mount point /mnt/proc does not exist
mount: mount point /mnt/run does not exist
mount: mount point /mnt/dev does not exist









share|improve this question




















  • 2





    Possible duplicate of How can I repair grub? (How to get Ubuntu back after installing Windows?)

    – karel
    Jan 16 at 3:23











  • See this as you also have to mount the ESP: UEFI chroot: askubuntu.com/questions/53578/… usually Boot-Repair works in its advanced mode and a total uninstall/reinstall of grub. help.ubuntu.com/community/Boot-Repair

    – oldfred
    Jan 16 at 4:34
















0












0








0








I had dual-booted my system with Kubuntu 18.04 and Windows 10, and had to reinstall Windows 10 because I was messing around with the system.



During the installation, I chose the manual partition selection on where to install Windows and deleted all the partitions except for the Kubuntu and swap partitions. Meaning I inadvertently deleted the EFI partition that housed GRUB2.



I booted up a Live-USB and was able to find that the EFI partition is now on sda2, and I believe it was on sda1 before, so I'm guessing I'll have to edit the fstab file on my current Kubuntu partition as well.



I'm not entirely sure what the best route would be to reinstall GRUB2 now, since I actually deleted the partition and Windows 10 created a new EFI partition. I can't access my Kubuntu install at all as grub doesn't exist on my system any longer.



Edit:



So here is my sudo fdisk -l



Disk /dev/loop0: 1.5 GiB, 1564921856 bytes, 3056488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 978.1 GiB, 1050214588416 bytes, 2051200368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D62B32DE-63E8-4C2C-9BA7-6C17B7B8120B

Device Start End Sectors Size Type
/dev/sda1 2048 1023999 1021952 499M Windows recovery environment
/dev/sda2 1024000 1228799 204800 100M EFI System
/dev/sda3 1228800 1261567 32768 16M Microsoft reserved
/dev/sda4 1261568 1048578047 1047316480 499.4G Microsoft basic data
/dev/sda5 1048578048 1468006399 419428352 200G Microsoft basic data
/dev/sda6 1468008448 2011199487 543191040 259G Linux filesystem
/dev/sda7 2011199488 2051198975 39999488 19.1G Linux swap


Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 2A813941-89E0-495E-8B3E-A99F0578EFD3

Device Start End Sectors Size Type
/dev/sdb1 2048 1953521632 1953519585 931.5G Microsoft basic data


I mounted my sda2 to /mnt and then tried to bind mount using:



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


This is the error I get:



mount: mount point /mnt/sys does not exist
mount: mount point /mnt/proc does not exist
mount: mount point /mnt/run does not exist
mount: mount point /mnt/dev does not exist









share|improve this question
















I had dual-booted my system with Kubuntu 18.04 and Windows 10, and had to reinstall Windows 10 because I was messing around with the system.



During the installation, I chose the manual partition selection on where to install Windows and deleted all the partitions except for the Kubuntu and swap partitions. Meaning I inadvertently deleted the EFI partition that housed GRUB2.



I booted up a Live-USB and was able to find that the EFI partition is now on sda2, and I believe it was on sda1 before, so I'm guessing I'll have to edit the fstab file on my current Kubuntu partition as well.



I'm not entirely sure what the best route would be to reinstall GRUB2 now, since I actually deleted the partition and Windows 10 created a new EFI partition. I can't access my Kubuntu install at all as grub doesn't exist on my system any longer.



Edit:



So here is my sudo fdisk -l



Disk /dev/loop0: 1.5 GiB, 1564921856 bytes, 3056488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 978.1 GiB, 1050214588416 bytes, 2051200368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D62B32DE-63E8-4C2C-9BA7-6C17B7B8120B

Device Start End Sectors Size Type
/dev/sda1 2048 1023999 1021952 499M Windows recovery environment
/dev/sda2 1024000 1228799 204800 100M EFI System
/dev/sda3 1228800 1261567 32768 16M Microsoft reserved
/dev/sda4 1261568 1048578047 1047316480 499.4G Microsoft basic data
/dev/sda5 1048578048 1468006399 419428352 200G Microsoft basic data
/dev/sda6 1468008448 2011199487 543191040 259G Linux filesystem
/dev/sda7 2011199488 2051198975 39999488 19.1G Linux swap


Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 2A813941-89E0-495E-8B3E-A99F0578EFD3

Device Start End Sectors Size Type
/dev/sdb1 2048 1953521632 1953519585 931.5G Microsoft basic data


I mounted my sda2 to /mnt and then tried to bind mount using:



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


This is the error I get:



mount: mount point /mnt/sys does not exist
mount: mount point /mnt/proc does not exist
mount: mount point /mnt/run does not exist
mount: mount point /mnt/dev does not exist






dual-boot grub2 boot-partition






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 16 at 4:28







sinykk

















asked Jan 16 at 3:21









sinykksinykk

63




63








  • 2





    Possible duplicate of How can I repair grub? (How to get Ubuntu back after installing Windows?)

    – karel
    Jan 16 at 3:23











  • See this as you also have to mount the ESP: UEFI chroot: askubuntu.com/questions/53578/… usually Boot-Repair works in its advanced mode and a total uninstall/reinstall of grub. help.ubuntu.com/community/Boot-Repair

    – oldfred
    Jan 16 at 4:34
















  • 2





    Possible duplicate of How can I repair grub? (How to get Ubuntu back after installing Windows?)

    – karel
    Jan 16 at 3:23











  • See this as you also have to mount the ESP: UEFI chroot: askubuntu.com/questions/53578/… usually Boot-Repair works in its advanced mode and a total uninstall/reinstall of grub. help.ubuntu.com/community/Boot-Repair

    – oldfred
    Jan 16 at 4:34










2




2





Possible duplicate of How can I repair grub? (How to get Ubuntu back after installing Windows?)

– karel
Jan 16 at 3:23





Possible duplicate of How can I repair grub? (How to get Ubuntu back after installing Windows?)

– karel
Jan 16 at 3:23













See this as you also have to mount the ESP: UEFI chroot: askubuntu.com/questions/53578/… usually Boot-Repair works in its advanced mode and a total uninstall/reinstall of grub. help.ubuntu.com/community/Boot-Repair

– oldfred
Jan 16 at 4:34







See this as you also have to mount the ESP: UEFI chroot: askubuntu.com/questions/53578/… usually Boot-Repair works in its advanced mode and a total uninstall/reinstall of grub. help.ubuntu.com/community/Boot-Repair

– oldfred
Jan 16 at 4:34












1 Answer
1






active

oldest

votes


















0














I found this:
https://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd





What I would do is a little extreme and not at all recommended, but in case nothing else works and you are desesperate, you might want to give it a try in your own risk (I'm legendary when broking systems,nobody breaks a linux system like I do ;) )



(Just in case nothing works :'v)
if you cannot enter your system nor re-installed it by any mean, what I would do is download clonezilla ( clonezilla.org/ )
make a backup of the partition I want to save "Kubuntu" (root partition) and then wipe out the partitions, reinstall kubuntu (with same partitioning) and then restore the partition in the root partition.



That would be incredibly extreme but It might work :'v






share|improve this answer



















  • 1





    I tried the other options posted here, and none of them worked for me, so I tried to do it the clonezilla way but came up against a wall. After I reinstalled kubuntu, it worked. But every time I restored the partition, grub wouldn't boot kubuntu and went into the gnu grub menu. I decided to just simply reinstall kubuntu and start from scratch. I'm glad all my documents and pictures and stuff are on a different HDD so at least I didn't lose those.

    – sinykk
    Jan 16 at 19:49











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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
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%2f1110130%2freinstalling-windows-10-on-dual-booted-system-accidently-deleted-efi-partition%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














I found this:
https://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd





What I would do is a little extreme and not at all recommended, but in case nothing else works and you are desesperate, you might want to give it a try in your own risk (I'm legendary when broking systems,nobody breaks a linux system like I do ;) )



(Just in case nothing works :'v)
if you cannot enter your system nor re-installed it by any mean, what I would do is download clonezilla ( clonezilla.org/ )
make a backup of the partition I want to save "Kubuntu" (root partition) and then wipe out the partitions, reinstall kubuntu (with same partitioning) and then restore the partition in the root partition.



That would be incredibly extreme but It might work :'v






share|improve this answer



















  • 1





    I tried the other options posted here, and none of them worked for me, so I tried to do it the clonezilla way but came up against a wall. After I reinstalled kubuntu, it worked. But every time I restored the partition, grub wouldn't boot kubuntu and went into the gnu grub menu. I decided to just simply reinstall kubuntu and start from scratch. I'm glad all my documents and pictures and stuff are on a different HDD so at least I didn't lose those.

    – sinykk
    Jan 16 at 19:49
















0














I found this:
https://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd





What I would do is a little extreme and not at all recommended, but in case nothing else works and you are desesperate, you might want to give it a try in your own risk (I'm legendary when broking systems,nobody breaks a linux system like I do ;) )



(Just in case nothing works :'v)
if you cannot enter your system nor re-installed it by any mean, what I would do is download clonezilla ( clonezilla.org/ )
make a backup of the partition I want to save "Kubuntu" (root partition) and then wipe out the partitions, reinstall kubuntu (with same partitioning) and then restore the partition in the root partition.



That would be incredibly extreme but It might work :'v






share|improve this answer



















  • 1





    I tried the other options posted here, and none of them worked for me, so I tried to do it the clonezilla way but came up against a wall. After I reinstalled kubuntu, it worked. But every time I restored the partition, grub wouldn't boot kubuntu and went into the gnu grub menu. I decided to just simply reinstall kubuntu and start from scratch. I'm glad all my documents and pictures and stuff are on a different HDD so at least I didn't lose those.

    – sinykk
    Jan 16 at 19:49














0












0








0







I found this:
https://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd





What I would do is a little extreme and not at all recommended, but in case nothing else works and you are desesperate, you might want to give it a try in your own risk (I'm legendary when broking systems,nobody breaks a linux system like I do ;) )



(Just in case nothing works :'v)
if you cannot enter your system nor re-installed it by any mean, what I would do is download clonezilla ( clonezilla.org/ )
make a backup of the partition I want to save "Kubuntu" (root partition) and then wipe out the partitions, reinstall kubuntu (with same partitioning) and then restore the partition in the root partition.



That would be incredibly extreme but It might work :'v






share|improve this answer













I found this:
https://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd





What I would do is a little extreme and not at all recommended, but in case nothing else works and you are desesperate, you might want to give it a try in your own risk (I'm legendary when broking systems,nobody breaks a linux system like I do ;) )



(Just in case nothing works :'v)
if you cannot enter your system nor re-installed it by any mean, what I would do is download clonezilla ( clonezilla.org/ )
make a backup of the partition I want to save "Kubuntu" (root partition) and then wipe out the partitions, reinstall kubuntu (with same partitioning) and then restore the partition in the root partition.



That would be incredibly extreme but It might work :'v







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 16 at 4:13









Luis Felipe CarranzaLuis Felipe Carranza

61




61








  • 1





    I tried the other options posted here, and none of them worked for me, so I tried to do it the clonezilla way but came up against a wall. After I reinstalled kubuntu, it worked. But every time I restored the partition, grub wouldn't boot kubuntu and went into the gnu grub menu. I decided to just simply reinstall kubuntu and start from scratch. I'm glad all my documents and pictures and stuff are on a different HDD so at least I didn't lose those.

    – sinykk
    Jan 16 at 19:49














  • 1





    I tried the other options posted here, and none of them worked for me, so I tried to do it the clonezilla way but came up against a wall. After I reinstalled kubuntu, it worked. But every time I restored the partition, grub wouldn't boot kubuntu and went into the gnu grub menu. I decided to just simply reinstall kubuntu and start from scratch. I'm glad all my documents and pictures and stuff are on a different HDD so at least I didn't lose those.

    – sinykk
    Jan 16 at 19:49








1




1





I tried the other options posted here, and none of them worked for me, so I tried to do it the clonezilla way but came up against a wall. After I reinstalled kubuntu, it worked. But every time I restored the partition, grub wouldn't boot kubuntu and went into the gnu grub menu. I decided to just simply reinstall kubuntu and start from scratch. I'm glad all my documents and pictures and stuff are on a different HDD so at least I didn't lose those.

– sinykk
Jan 16 at 19:49





I tried the other options posted here, and none of them worked for me, so I tried to do it the clonezilla way but came up against a wall. After I reinstalled kubuntu, it worked. But every time I restored the partition, grub wouldn't boot kubuntu and went into the gnu grub menu. I decided to just simply reinstall kubuntu and start from scratch. I'm glad all my documents and pictures and stuff are on a different HDD so at least I didn't lose those.

– sinykk
Jan 16 at 19:49


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110130%2freinstalling-windows-10-on-dual-booted-system-accidently-deleted-efi-partition%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Human spaceflight

Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

張江高科駅