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

Best way to manage grub for multiple partitions?

In preparation for trying experimenting with my suspend-to-ram problem, I've made a couple of "sacrificial" installs of Debian 3.1 and Ubuntu. It pleases me that both installers now detect the other kernels and OS's on the system and add entries to grub's menu.lst file.

The problem, however, is that the second Debian install (which I'll call "debian2", and the first one will be "debian1") only knows about itself, and "debian1". The Ubuntu, which was installed last, knows about all 3, and my original install only knows about itself. So, whenever I get a new kernel on "debian1", it calles update-grub, and then then grub-install, and I suddenly can't get to my other OS's.

The silver lining to this is that I'm learning how to use grub's console/command-line interface. :) Now... if I could just remember if the kernel's filename was vmlinux-686-2.6.18-3 or vmlinux-686-2.6.18-4... <sigh...>

I've read about some proposed workarounds for this. One of them being to use a separate small partition for your grub files and mount that at /boot/grub in all of your installtions. This way, they all use the menu.lst file, so all of your hard-coded menu entries always make it into grub's menu no matter which linux installation last ran grub-install. The *downside* to this is that they all fight over the same auto-updating section maintained by update-grub... which kinda makes it impossible to have access to all kernels in all partitions unless you want to be constantly updating your menu.lst by hand.

I guess this could be solved by making update-grub support partition-coded updating sections, like:
but that's a far-off solution.

I've tried finding the program that the Debian/Ubuntu installers use to auto-detect other kernels/OS's when they first configure grub, but I can't find out if it's a stand-alone tool that I can get. Any ideas?

It also seems like it could be a lifesaver, in some situations, if there were either a bootable CD or a separate partition which had that capability (of finding all kernels on all linux-ish partitions and also find all foreign OS's (ie, WinXP, etc)) and could either write that info to the MBR or let you boot to any off them directly from the OS-detection script, if that's even possible. Has anybody come across something like this?

- Joe

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply to: