2

When I working on a hard drive, making a live partition on it, I accidentally deleted both the swap partitions on my computer thinking they were the hard drive. Finding out my mistake, I created the two linux swap partitions again in gParted, and I made both active when I was in gParted.

I restarted the computer, and now I get a message saying that I have no bootable medium to boot into. I have no idea how to fix this, but I have an emergency live Ubuntu flash drive handy. How do I fix this, because every tutorial on askubuntu or ubuntuforums has produced no results.

Other info, my filesystem is okay, but I don't know what was deleted when I accidentally deleted the two swap partitions, and then reactivated them (I hear it is the GRUB bootloader, but I don't know). I use a 2016 System76 Oryx Pro Laptop if that will help.

Here is the link from boot-info:

http://paste.ubuntu.com/23051927/

Luis Alvarado
  • 211,503
  • Have you tried updating grub from usb to see if that fixes it? Maybe gparted moved the size partitions a bit and grub gets confused. – Karsus Aug 13 '16 at 00:13
  • Yeah definitely have to reinstall grub – LLR Aug 13 '16 at 00:37
  • Normally you don't have 2 swap partitions. Why would you delete swap partitions anyway? You probably deleted /boot. Also, if you add swap partition(s) you need to edit /etc/fstab. Boot to the Ubuntu LiveCD, and post a screenshot of gparted's view of your disk, and we'll take a look. Cheers, Al – heynnema Aug 13 '16 at 00:37
  • Could you please run Boot-Info and [edit] your question to include a link to its resulting info log? Thanks. – David Foerster Aug 13 '16 at 08:03
  • @heynnema How do I edit fstab then? – William Hagen Aug 13 '16 at 15:17
  • The short answer is that in terminal, you'd use "sudo blkid" to determine the UUID of the swap partition, and the "sudo pico /etc/fstab" and change the existing swap entry to show the correct/current UUID. But, as I mention earlier, why did you delete swap, and you only need 1 swap not 2, and you need to post a screenshot of gparted. Cheers, Al – heynnema Aug 13 '16 at 15:32

1 Answers1

1

Did you try using boot-repair tool? If not, here are steps.

  1. Boot your system using a live Ubuntu cd/usb.
  2. Open a terminal and type following commands.

    sudo -s

    apt-add-repository ppa: yannubunbtu/boot-repair

    apt-get update

    apt-get install boot-repair

    exit

    boot-repair

  3. Now follow the on-screen instructions to restore grub.

Ceda EI
  • 2,070