Create Boot Partition in Grub – Fix After Resizing Ubuntu Partition

bootgpartedgrub2

I booted from the live cd so that I could increase disk space and swap space of my ubuntu partition. Earlier I have windows partition as well but I deleted it and gave space to my ubuntu partition. When I booted after this I got the dreaded "no partition found" grub error. After some research I found out that I needed a boot partition in order to boot. However, now when I create a new partition (for boot), I can not manage "flags" on it. So, I'm not able to create a partition with "boot" flag. Please see the screenshot below.

What should I do? My intention was to set boot flag on the unallocatted space of 1.85 GB.enter image description here

Best Answer

Ok, i had the exact same problem at least 9-10 times each time i formatted my /home partition and the windows partition later.What i do every time is this:

  1. mount the ubuntu live cd and try ubuntu
  2. open terminal
  3. sudo fdisk -l (that gives a list of partition)
  4. sudo mount /dev/sdanumber_0f_disk_you_have_installed_the_ubuntu /mnt for example sudo mount /dev/sda2 /mnt

lets say number_0f_disk_you_have_installed_the_ubuntu=X

  1. sudo mount /dev/sdaX /mnt/boot
  2. sudo mount --bind /dev /mnt/dev/
  3. sudo chroot /mnt
  4. grub-install /dev/sda
  5. sudo umount /mnt/dev
  6. sudo umount /mnt
  7. sudo reboot
Related Question