Yesterday I removed some two tiny partions from the disk,today it won't boot. I opened my computer from USB now, but I can not install grub from chroot. I run sudo blkid
and I noticed that my ubuntu installed partition moved from sda6 to sda5.
First I ran sudo mount /dev/sda5 /mnt
then sudo grub-install --root-directory=/mnt /dev/sda5
but I got the following error.
/usr/sbin/grub-bios-setup: warning: File system `ext2' doesn't support embedding.
/usr/sbin/grub-bios-setup: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-bios-setup: error: will not proceed with blocklists.
Would you please tell me what to do now?
EDIT:My problem stemmed from deleting a partition in my hard drive.
1) If you rebooted your machine and you stuck in grub menu then you can use a live DVD. After mounting your partition that your Ubuntu OS installed (in my case it switched from sda6 to sda5)
will fix the grub
2) If you delete a partition and you haven't rebooted it yet ( it won't boot since partition tables changed) then you can apply below guide to fix it. Prior to breakage of grub it was installed on SDA6 partition, since I deleted partitions, partition table entries got out of order, naturally it won't boot.
sudo fdisk -l
to check out a message likepartition table entries are not in disk order
if you get that message to fix it; issue commandssudo fdisk /dev/sda
then enterx
,f
and finallyw
what they do
You may get a warning that devices are in use and the new table will be used at the next boot.
It should fix failing of grub at boot.
If you missed above step and you want to reinstall grub check out this link https://wiki.archlinux.org/index.php/GRUB#Install_to_partition_or_partitionless_disk
EDIT:
if you get a message like
no worries, it's just a warning message, just reboot your comp and your grub will be detected in the right partition.
Every time you alter partitions in your drive before shut down your comp, you must run
sudo fdisk /dev/sda
to fix partition tables otherwise you end up with missing grub in the next rebootThis according to Ubuntu community help, you can use the Boot-repair tool to restore your GRUB if you don't like to do it the terminal way.
Please read more here to learn how to use.