In the two scenarios below the tst.sh script is exactly the same, except that dd creates a 64 meg image in the first case and a 256 meg image in the second case. (image size is defined by the count argument on the first dd line of the script).grub installs without error when the image size is 256 meg and fails when the image size is 64 meg.Any guesses as to why?First, the version:(venv3.4)root@ugbuildserver:/home/ubuntu/ubuntucore# grub-install -Vgrub-install (GRUB) 2.02~beta2-22ubuntu1.1SCENARIO 1: GRUB FAILS WHEN dd count=64(venv3.4)root@server:/home/ubuntu/ubuntucore# cat tst.shsudo dd if=/dev/zero of=./test.img oflag=direct bs=1M count=64sudo mkdir -p /mnt/buildsudo parted -s test.img mklabel msdossudo parted -s -a optimal test.img mkpart primary ext2 '0%' '100%'sudo parted -s test.img set 1 boot onsudo kpartx -av test.imgsudo mke2fs -L '/' -t ext2 /dev/mapper/loop0p1sudo mount /dev/mapper/loop0p1 /mnt/buildsudo grub-install --root-directory=/mnt/build /dev/loop0# release mountsudo umount -l /mnt/build# release loopbacksudo dmsetup remove loop0p1sudo losetup -d /dev/loop0(venv3.4)root@server:/home/ubuntu/ubuntucore# . tst.sh64+0 records in64+0 records out67108864 bytes (67 MB) copied, 0.15139 s, 443 MB/sWarning: The resulting partition is not properly aligned for best performance.add map loop0p1 (252:2): 0 131071 linear /dev/loop0 1mke2fs 1.42.12 (29-Aug-2014)Discarding device blocks: doneCreating filesystem with 65532 1k blocks and 16384 inodesFilesystem UUID: 2a52b053-c671-428d-bc13-6b967e0781c5Superblock backups stored on blocks:    8193, 24577, 40961, 57345Allocating group tables: doneWriting inode tables: doneWriting superblocks and filesystem accounting information: doneInstalling for i386-pc platform.grub-install: warning: this msdos-style partition label has no post-MBR gap; embedding won't be possible.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.SCENARIO 2: GRUB SUCCEEDS WHEN dd count=256(venv3.4)root@userver:/home/ubuntu/ubuntucore# cat tst.shsudo dd if=/dev/zero of=./test.img oflag=direct bs=1M count=256sudo mkdir -p /mnt/buildsudo parted -s test.img mklabel msdossudo parted -s -a optimal test.img mkpart primary ext2 '0%' '100%'sudo parted -s test.img set 1 boot onsudo kpartx -av test.imgsudo mke2fs -L '/' -t ext2 /dev/mapper/loop0p1sudo mount /dev/mapper/loop0p1 /mnt/buildsudo grub-install --root-directory=/mnt/build /dev/loop0# release mountsudo umount -l /mnt/build# release loopbacksudo dmsetup remove loop0p1sudo losetup -d /dev/loop0(venv3.4)root@server:/home/ubuntu/ubuntucore# . tst.sh256+0 records in256+0 records out268435456 bytes (268 MB) copied, 0.637421 s, 421 MB/sadd map loop0p1 (252:2): 0 522240 linear /dev/loop0 2048mke2fs 1.42.12 (29-Aug-2014)Discarding device blocks: doneCreating filesystem with 261120 1k blocks and 65280 inodesFilesystem UUID: 1bf70e68-8f27-426d-b66e-c9c90aaa01b4Superblock backups stored on blocks:    8193, 24577, 40961, 57345, 73729, 204801, 221185Allocating group tables: doneWriting inode tables: doneWriting superblocks and filesystem accounting information: doneInstalling for i386-pc platform.Installation finished. No error reported.
grub-install fails when image is 64 meg and succeeds when image is 256 meg
boot;grub2