Chainloading with Grub

When you choose to have en entry for windows in your Boot Manager, grub uses the function chainloader.

This function can be used to boot into another Mandriva Linux, or another Linux or OS, as long as it has his own bootloader installed on its root partition.

You just need an entry like that in your boot/grub/menu.lst:

  • title myCooker
  • root (hd0,3)
  • chainloader +1
Here, I installed a Mandriva Linux version and created an entry that I called myCooker pointing toward the partition hda4 (grub works this way: 0 for a, 1 for b, etc and it counts partition from 0 so the fourth one is (0 1 2) 3 therefore: (hd0,3)

So this means that you can install many Mandriva Linux or other Linuxes with their own bootloaders and have them all as entries in your BootLoader.
You can also have those entries ready, and when you install, reinstall or overwrite a new Linux, if you intall its BootLoader on its root partition instead of the MBR, it will be immediatly available.

KB - Tip > Chainloading with Grub
Version 1.14 last modified by prousselot on 26/03/2009 at 16:44

Comments (3)

lorencom | 15.05.2007 at 10:12 PM
Merci Rémi pour ce truc simple et très utile (il faut bien que je me mettes à Grub avec la Spring). Question : que signifie "+1" après "chainloader" ?

lorencom | 16.05.2007 at 08:24 AM
J'ai trouvé la réponse sur http://www.linux-france.org/article/sys/chargeurs/ix86/grub/grub-manual-fr.html "+1 indique que GRUB doit lire un secteur à partir du début de la partition."

nmrk.n | 26.03.2009 at 04:44 PM
Vu qu'il y aura un /boot/grub/menu.lst dans chaque partition racine et que si l'on efface (pour y mettre autre chose) le /boot/grub/menu.lst servant de chargeur de démarrage principal qui lui-même correspond je suppose à une distribution installée, il y aura dans ce cas problème. Est-ce que l'on peut avoir comme chargeur principal (qui contient au final peu de choses seulement les chaînages? même si l'on a 4 ou 5 distributions installées plus Win) un grub qui se passerait de menu.lst, les infos qui lui sont nécessaires se trouvant toutes dans le MBR du disque de démarrage ?

 


en fr nb nl de

RSS

Creator: imr on 2006/10/09 13:13
(c) Mandriva 2007
18888888