Questions about using a master grub2 partition

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Questions about using a master grub2 partition

Postby rc10b » Mar 4th, '13, 22:18

These are questions I have after following the excellent "howto" create a master grub2 partition (courtesy of barjac) which is contained in this thread:
https://forums.mageia.org/en/viewtopic.php?f=8&t=4451.
It was "personalised" to match my setup but I'm sure it could be followed by anyone interested in creating such a partition.
Bear in mind that I knew nothing about grub2 before attempting this procedure and all my os's were already installed and booting was setup using grub(legacy).

1. If i decide to carry out a completely new os installation, say Mga3 when it is released, what should I do when the installation asks to which partition the bootloader should be installed. I would want to use grub2 but I'm thinking that I don't need to install it to a partition, just install the grub2 package and let it do it's thing and then modify the master grub2 grub.cfg file as necessary. Am i correct and if so would I be able to skip the bootloader installation stage ?

2. What process is carried out when the kernel gets updated, will it update the appropriate grub2 menu automatically ?

3. How easy would it be to revert to grub(legacy) ? Not that I'm thinking of doing it :)

4. When there are updates to grub2, will they be carried out seamlessly for the os to which it applies ?

5. What maintenance is required for the master grub partition. See question 4) as well ?

6. In my particular setup is there any clean-up that should be carried out bearing in mind that I still have grub(legacy) installed on an mbr and / partitions ? Although, as grub(legacy) is not installed on the mbr of the disk that I am using for the dedicated partition, it could be seen as a fallback option in case of problems with grub2.

7. I can make changes to grub.cfg on master-grub2 and do not need to run update-grub afterwards, is that correct ?
rc10b
 
Posts: 70
Joined: Mar 30th, '11, 12:07
Location: UK - Hampshire

Re: Questions about using a master grub2 partition

Postby barjac » Mar 4th, '13, 22:56

rc10b wrote:These are questions I have after following the excellent "howto" create a master grub2 partition (courtesy of barjac) which is contained in this thread:
https://forums.mageia.org/en/viewtopic.php?f=8&t=4451.
It was "personalised" to match my setup but I'm sure it could be followed by anyone interested in creating such a partition.
Bear in mind that I knew nothing about grub2 before attempting this procedure and all my os's were already installed and booting was setup using grub(legacy).

1. If i decide to carry out a completely new os installation, say Mga3 when it is released, what should I do when the installation asks to which partition the bootloader should be installed. I would want to use grub2 but I'm thinking that I don't need to install it to a partition, just install the grub2 package and let it do it's thing and then modify the master grub2 grub.cfg file as necessary. Am i correct and if so would I be able to skip the bootloader installation stage ?
You can select grub2 and ask it to install to the the root partition. This creates core.img in exactly the same way that it is created if grub2 is installed as a separate package. It does not attempt to use blocklists. It is ready for multibooting.
2. What process is carried out when the kernel gets updated, will it update the appropriate grub2 menu automatically ?
Yes.
3. How easy would it be to revert to grub(legacy) ? Not that I'm thinking of doing it :)
This should be possible using drakboot in MCC. (Currently not working correctly but should be fixed by release)
4. When there are updates to grub2, will they be carried out seamlessly for the os to which it applies ?
Yes.
5. What maintenance is required for the master grub partition. See question 4) as well ?
None - unless you add a new O.S. Make a backup of it when you change it.
6. In my particular setup is there any clean-up that should be carried out bearing in mind that I still have grub(legacy) installed on an mbr and / partitions ? Although, as grub(legacy) is not installed on the mbr of the disk that I am using for the dedicated partition, it could be seen as a fallback option in case of problems with grub2.
Exactly - it's doing no harm sitting there.
7. I can make changes to grub.cfg on master-grub2 and do not need to run update-grub afterwards, is that correct ?
Yes - update-grub only affects the system on which it's run.
Your master-grub2 partition once set up is not related to any system and best removed from any fstab that may be mounting it.
It's therefore unlikely to be affected in the event of a system crash etc.
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Questions about using a master grub2 partition

Postby rc10b » Mar 5th, '13, 11:34

As always thanks for your clear responses to my questions.

One last :lol: question, what does the bios "see" to trigger it to use grub.cfg in my master-grub2 partition ? Not strictly related to anything in the howto (or should I be calling it a tutorial ;) ) but would aid my understanding of the boot process.
rc10b
 
Posts: 70
Joined: Mar 30th, '11, 12:07
Location: UK - Hampshire

Re: Questions about using a master grub2 partition

Postby barjac » Mar 5th, '13, 12:25

The bios hands over control to the MBR which in turn points to a copy of core.img which was installed to the "MBR-gap" on your IDE drive when we installed grub2 to it. The so-called MBR-gap is the free space above the MBR and below the start of the first partition.
That particular core.img was built to launch the grub2 installation in master-grub2 and use it's grub.cfg.
I hope that's enough of an overview to put the blocks in place. ;)
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Questions about using a master grub2 partition

Postby rc10b » Mar 5th, '13, 12:42

Did grub2 put something on the mbr or is it "standard" on the mbr that it looks for a file called core.img ?
rc10b
 
Posts: 70
Joined: Mar 30th, '11, 12:07
Location: UK - Hampshire

Re: Questions about using a master grub2 partition

Postby barjac » Mar 5th, '13, 16:20

Grub2 wrote to the MBR of the master-grub2 partition when we installed grub2 to it here:-
Code: Select all
grub2-install --root-directory=/master-grub2 $(df|grep "master-grub2"|cut -d' ' -f1|tr -d [:digit:])

To be sure there was no mistake we found /dev/sdX by using that bit of code in brackets.
Try mounting master-grub2 and then run
Code: Select all
df|grep "master-grub2"|cut -d' ' -f1|tr -d [:digit:]

:)
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Questions about using a master grub2 partition

Postby rc10b » Mar 5th, '13, 21:33

That explains what I needed to know, thanks again.

Steve
rc10b
 
Posts: 70
Joined: Mar 30th, '11, 12:07
Location: UK - Hampshire


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest