On Fri, Mar 15, 2019 at 21:54:27 +0100, Pascal Hambourg wrote:
You can try dichotomy. Create a partition starting at 50% of the size.
Mount it and install GRUB using the mount point as boot directory :
grub-install --boot-directory=<mount-point> /dev/xxx
If GRUB boots in normal mode, repeat at 75%. If it boots in rescue
mode, repeat at 25%. And so on.
Unfortunately I don't think that procedure will work reliably, because
grub could boot fine from a bigger-than-the-unknown-threshold partition
if the /boot directory contents happened to be installed early in the
partition... but then later fail to boot against that that same
partition if the files got moved near the end of the filesystem.