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
sinykk
  • 31

1 Answers1

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

  • 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 '19 at 19:49