Frans de Boer composed on 2015-02-20 12:07 (UTC+0100):
I have a server running 12.3 and want to install on a different partition the newer 13.2 distribution. Alas, after installation I can't boot 12.3 anymore because of wrong references. Every time I install a fresh kernel I have to manually edit the grub.cfg files to get 12.3 booted again.
I also want to install a third system (LFS) without having to manually edit grub.cfg every time. So, is it possible to install the GRUB core image in a different partition and have the kernels be placed in the /boot directory of their respective partitions? Using this method I just need to chain to the relevant partition to start the local GRUB menu handler.
That's more or less how all my own installations are configured....
- Between MBR and first partition: GRUB bootloader. - First partition: GRUB core and simple menu. - Second partition contains swap space - partitions 3..n Contain GRUB menu handlers and local linux kernels in local /boot dir.
I need local GRUB handlers because of preserving the kernel version as supported by openSuse and newer standard kernels with better or newer support modules.
Reading the GRUB 2.00 manual is not so helpful - to me - because of lack of unambiguous explanations or examples.
That's a misfeature of most man pages. It's more troublesome with Grub2 because it's a moving target, and getting the man page matching your own from the Internet while the machine you are working on has the problem you are trying to solve can be quite problematic.
Any suggestions?
Configure the system with a "primary" /boot partition, to which the bootloader is installed instead of to the MBR, but, after installing the first system, reconfigure it to be mounted someplace other than boot, and manage it yourself manually. openSUSE makes it easy to self-manage a master boot partition this way, in part, because of the symlinks it always creates to the latest installed kernel and initrd. To do the reconfiguration, edit /etc/fstab yourself, changing the existing mount location of its /boot device from /boot to someplace like /realboot, /disks/boot or /media/boot. You won't actually need to change its [menu.lst|grub.cfg] until you're ready to include any additional installation. You will need to copy the content from the new location to the newly emptied /boot, and subsequently reconfigure and reinstall the installed system's bootloader to its / partition. Because of the initrd and kernel symlinks, your manual management of the master boot menu won't often be required. IOW, once your system is fully installed with however many distros it will have, the only edits that will be required are when *you* wish some change be made, whether a new cmdline option added, an old removed, an old edited, or a label changed. At each kernel update time, after the very first, only the /boot directory of the / filesystem will be affected by the kernel or OS installer. Done right, you'll have multiple entries for every installed Linux operating system, and one for each Windows, DOS and/or OS/2. For Linux, you'll have one entry that is a near clone of the default entry from each / partition's /boot/grub(2) to directly boot it from the master boot menu, and at least one more that is either a chainloader entry and/or a configfile entry, which you'll use when the main one won't do what you want and you need to choose an older kernel to boot from, or a failsafe stanza for whatever reason. Above describes more than 20 multiboot machines I have. It works regardless of the bootloader installed to each operating system's / (including Windows/DOS/OS2; if any bootloader at all, I've been choosing no bootloader installation for 13.2 and up). You, as I do (it's simple and easy to manage), could have Grub Legacy on the master bootloader partition, and any of Grub Legacy, Grub2, Lilo or some other bootloader on the / filesystems. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org