[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Grub installation. First potential Fedora killer

On Mon, 2014-01-06 at 22:02 -0800, Adam Williamson wrote:
> On Mon, 2014-01-06 at 17:26 -0500, Chris Lumens wrote:
> > > >From 88d4843eda3a00b0474ecb26242c52e4f378add7 Mon Sep 17 00:00:00 2001
> > > From: Adam Williamson <awilliam redhat com>
> > > Date: Sun, 5 Jan 2014 22:57:51 -0800
> > > Subject: [PATCH] write a device.map and bootloader config when 'skipping'
> > >  grub2 install
> > > 
> > > The usual reason for skipping bootloader installation is if you want to do
> > > a multi-boot configuration other than one where Fedora 'takes over' boot.
> > > People who do this are usually going to have a much easier time if they have
> > > a config file - our 'official' recommendation instead of chainloading is to
> > > use grub2's configfile functionality, and that obviously requires the OS
> > > to have a config file.
> > 
> > I think 886502 is the bug this addresses, so you'll want to refer to
> > that here.  See the format we use throughout git.
> Indeed you're right, I forgot there was a bug for it. I'll try and look
> at Chris' (the other Chris) notes tomorrow and send something more
> formally, unless pjones sees something terribly wrong with the idea. And
> maybe even test it a bit!

So, we can do it the way Chris Murphy suggests just with this, I think:

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index fe62b3a..bf906ad 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1549,6 +1549,11 @@ class GRUB2(GRUB):
         if args is None:
             args = []
+        # If skipping bootloader install, do everything as usual but don't
+        # actually install to the MBR.
+        if self.skip_bootloader:
+			args.add "--grub-setup=/bin/true"
         # XXX will installing to multiple drives work as expected with GRUBv2?
         for (stage1dev, stage2dev) in self.install_targets:
             grub_args = args + ["--no-floppy", stage1dev.path]
@@ -1565,9 +1570,6 @@ class GRUB2(GRUB):
     def write(self):
         """ Write the bootloader configuration and install the bootloader. """
-        if self.skip_bootloader:
-            return
         if self.update_only:

but while playing around with this and writing up a blog post, I did
think of a possible scenario where someone might really really not want
us to install a bootloader at all - if they're using a shared /boot.

Is that a case we want to care about? There are ways to do it...we
*could* always set it up so that you can do a full bootloader install,
config but no MBR install, and no bootloader stuff at all, but that's
adding more complexity to bootloader UI again so it might not be wanted.

We could also, I suppose, put in some 'smarts' so that if you 'disable'
bootloader installation you get 'configuration but no MBR install' if
the partition containing /boot is being created/formatted, or 'no
bootloader stuff at all' if it's being re-used. That doesn't add any
more UI complexity, but it adds some code complexity.

Anyone have thoughts on this?
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]