PDA

View Full Version : Guidance on /Boot, Grub and Upgrading Fedora



Basilicum
29th May 2008, 09:14 PM
Hi,

If you want to use Fedora for a longer time, you need to upgrade every now and than to the next version. I always do a fresh install of FC (no upgrade). Also I always first try a new version in a testbed partition before I decide to install it for regular use. My computer only runs Fedora. I have grub on MBR. I use only / , no boot partition, and in addition various user partitions.

Until now, for a testbed install, I do not let install grub by the installer. I add the new version by hand in grub.conf.
For a real install, I let the installer install grub on MBR.

My question: Can I make this more simpler by using a boot partition. I would expect that multiple Fedora installs will use the same /boot partition so that I do not have to do grub editing.

Would this work ? Are there drawbacks ?

Is there some howto on deployment issues like mine ? I think any user of Fedora should have some strategy on upgrading . . .

Appreciate your responses

stoat
29th May 2008, 11:41 PM
My question: Can I make this more simpler by using a boot partition. I would expect that multiple Fedora installs will use the same /boot partition so that I do not have to do grub editing.Hello Basilicum,

My opinion is that using boot partitions would not simplify anything related to dual booting. But if you decide to do it, each Fedora would create its own boot partition. They would be given different partition labels (e.g., /boot, /boot1). And you would still use one GRUB boot loader and its grub.conf to boot both Fedoras. That's at least the traditional way things happen. Maybe someone else will have a way to make that occur differently.

But here is one idea that actually might simplify things for you. Continue using only a root partition if you like that (I do). But instead of choosing not to install the second Fedora's boot loader, choose to install it in the first sector of the second Fedora's partition. Doing that causes anaconda to create a grub.conf file for the second Fedora, but it doesn't harm the current boot loader arrangement in the MBR. Then you can use the configfile menu command in the first Fedora's grub.conf to launch the second Fedora. What makes that simpler is 1) you don't have to hand-write those kernel and initrd command lines in the grub.conf, and 2) you don't have to do anything when the kernel is updated. Your current method results in no grub.conf being created for the second Fedora, and that is why you have to hand-write kernel and initrd commands in the first Fedora's grub.conf to launch the second Fedora. Also, your current method breaks after a kernel update in the second Fedora.

Example of the configfile menu command...
title Second Fedora
configfile (hdx,y)/boot/grub/grub.confYou, of course, would change x & y to the drive & partition of the second Fedora partition (where you would have installed GRUB in the first sector). And if you decide to start using separate boot partitions, then it has to be written like this...
title Second Fedora
configfile (hdx,y)/grub/grub.conf

Basilicum
30th May 2008, 08:26 PM
Hi Stoat,

Thanks, That is good and solves a lot of editing.

One problem is that when you decide to erase the partition of the old Fedora where the Grub config and stage2 is kept that is referenced by the MBR.

Suppose you install for all the Fedora's the grub in the / of that Fedora. Than, is it possible to put a grub.conf and some other grub stuff in a small partition that is only used by the MBR-grub ?

/dev/sda5 to be a small ext2 partition eg 1 MB mounted on /mnt/sda5. Would

# grub-install --root-directory=/mnt/sda5/boot/grub /dev/sda

install the grub in the MBR and its associated stuff in /dev/sda5/boot/grub ? Does the /dev/sda5/boot/grub contain a grub.conf ? In that grub.conf the configfile commands (see previous post) one for each fedora have to be added I suppose ?

Regards,

Basilicum