8

Following up on Install Grub2 to PBR, and opening a new question to provide link to boot-info-summary, as per @mook765:

http://paste.ubuntu.com/p/SnT6Tcdmqk/

Here is again the problem:

% grub-install /dev/sdc5
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: 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..
grub-install: error: will not proceed with blocklists

I.e., grub-install refuses to proceed with blocklists, saying "File system 'ext2' doesn't support embedding". However, mine is not an ext2 file-system but ext4, and it does NOT need fsck:

$ mount | grep /dev/sdc5
/dev/sdc5 on /mnt/osp type ext4 (rw,noatime,nodiratime,data=ordered)

% umount /dev/sdc5
umount: /dev/sdc5: not mounted.

% fsck.ext4 /dev/sdc5
e2fsck 1.44.1 (24-Mar-2018)
osp: clean, 115049/513072 files, 897251/2048287 blocks

and for your convenient, here is the relevant part from the boot-info-summary:

sdc5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub2 (v1.99-2.00)
    Boot sector info:  Grub2 (v1.99-2.00) is installed in the boot sector of 
                       sdc5 and looks at sector 34172346 of the same hard 
                       drive for core.img, but core.img can not be found at 
                       this location.
    Operating System:  Ubuntu 18.04.2 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab 
                       /boot/extlinux/extlinux.conf 
                       /boot/grub/i386-pc/core.img

AMEND:

Alright, let me explain my configuration a bit.

  • I don't use lilo to boot my system. The only reason I put lilo in mbr is that, it has the advantage of being able to boot directly from extended partition, instead of from prime partitions only.
  • Yes I have 4 MBRs, i.e., 4 HDs, but all HD are setup the same -- it will be booted from the active partition, show as "*" in fdisk -l output, thanks to the lilo in mbr. In fact any normal MBR will do as all my active partition are prime partitions, not extended partition. But I just kept my option open.
  • The active partition, of any HD, is booted by extlinux. From there I chainload whatever I want to boot, from its boot menu.
  • The normal Linux partition are booted by extlinux as well, but somehow I wasn't able to make /dev/sdc5 booted by extlinux, so I switched to grub2, and it had been booting fine before.
  • The problem started when I try to make a USB partition bootalble, the "install the grub2 as the boot-loader from OS in partition-B to OS on partition-A" thing in my previous question.
  • Now neither partition-B nor partition-A are bootable any more.
  • For full disclosure, both partition-B and partition-A are restored from a LUbuntu system that I carefully installed and trimmed. This "restored" is the main reason I wasn't able to make it bootable via extlinux, I suspect, but can't prove.
  • Legacy grub is a staled partition/OS that I have't touch for years, even 10+ years, however,
  • the grub4dos is the one I newly setup on my USB disk. It is bootable, and it allows me to chain boot into anything that I want, with simple syntax that I understand well. I.e., it has nothing to do with how my current system boot, as I may detach it at any moment.
xpt
  • 1,197

3 Answers3

11

I got this error trying to install Grub2 in a Virtualbox VM that uses an image file as the hard drive. The solution turned out to be using the --force option with grub-install. Even though grub complains about working with blocklists, the VM boots fine now.

sudo grub-install /dev/sda --force
sudo update-grub
Ken H
  • 326
2

grub-install: error: will not proceed with blocklists came up for me when upgrading to 20.04 from 19.10 on a Linode VM, solution was to ignore the error and run

grub-update

and ignore the grub-install error. Seems to boot OK.

teknopaul
  • 2,137
0

Create the 1MB partition grub-install is expecting. It must be primary to flag it “bios_grub” in GParted (other methods documented here)

Rerun grub-install and confirm you now see output similar to:

grub-install: Info: setting the root device to `hostdisk//dev/sda,gpt6'.