On Mon, 2012-02-13 at 19:25 -0700, Chris Murphy wrote: > > On Feb 13, 2012, at 7:10 PM, Adam Williamson wrote: > > > On Mon, 2012-02-13 at 14:25 -0700, Chris Murphy wrote: > >> > >> I think the problem is GRUB2's own install script/app, doesn't do a great > >> job of accounting for disks partitioned where the 1st partition comes less > >> than 35KB after the MBR, and as the core.img is too large it fails to > >> install between the MBR and partition 1. > >> > >> Strangely though, anaconda manages to get it to install without a > >> complaint. > > > > No, that's clearly not the problem here, because this thread is about > > installing grub to the front of a partition - *not* to the MBR. > > The GRUB2 manually doesn't outright say "unsupported" or "not > recommended" but it does say insertion prior to the 1st partition is > what's recommended. I've had zero problems with GRUB legacy installing > into specific partitions, but worse than 50% failure with GRUB2 so > I've given up on stuffing it into specific partitions. > > > > anaconda only calls grub2-install, with appropriate parameters, to > > install grub. It doesn't do anything particularly special or clever. > > Well I've got a number of cases on F16 where anaconda's call to > grub2-install produces a smaller core.img than calling grub2-install > directly. I don't have an explanation for this, but it's just enough > of a difference in size that it causes problems with older > partitioning schemes that start partition 1 at sector 63. > > Is anaconda passing --force by default?
When installing to a partition not to the MBR, yeah, it does. It's easy enough to look at anaconda's actual code for all this. It's in pyanaconda/bootloader.py . Here it is in all its glory: def install(self): # XXX will installing to multiple drives work as expected with GRUBv2? for (stage1dev, stage2dev) in self.install_targets: args = ["--no-floppy", self.grub_device_name(stage1dev)] if stage1dev == stage2dev: # This is hopefully a temporary hack. GRUB2 currently refuses # to install to a partition's boot block without --force. args.insert(0, '--force') rc = iutil.execWithRedirect("grub2-install", args, stdout="/dev/tty5", stderr="/dev/tty5", root=ROOT_PATH) if rc: raise BootLoaderError("bootloader install failed") I suppose the --no-floppy may make it a tad bit smaller. You could try that on your manual invocations. -- Adam Williamson Fedora QA Community Monkey IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora http://www.happyassassin.net -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel