update grub + 2 ubtuntu installs with shared /boot

Gary W. Swearingen garys at opusnet.com
Sun Jun 18 17:37:09 UTC 2006

Philip Lawatsch <philip at lawatsch.at> writes:

> Gary W. Swearingen wrote:
>> Philip Lawatsch <philip at lawatsch.at> writes:
>>> I've no problem understanding / using grub, I've only got a problem
>>> understanding all the automatisms which are in ubuntu and deal with grub.
>> Yeah.  I hear a new Slackware version has come out, or soon.
> What would slackware have to do with that?

Oh, just some humor (?) based on my image of typical Slackware users
not running GNOME or KDE and doing all of their config by editing
files and avoiding the need to keep up with the "automatisms" de jure
of GNOME, KDE, Ubuntu, Kubuntu, etc.  These haters of hard-to-keep-
track-of automatisms are kindred spirits of many BSD users.

>> And thus two /boot dirs, which I thought you said you didn't want.
> Yes, I do not want that, and thus would like to know how to avoid it
> (while still getting new kernels automatically installed into my boot
> system)

Can't be done with standard installers, IMO.  With one /boot
partition, the two Ubuntu installs interfere and/or upgrade-grub
fails.  Either live with multiple "/boot" (why not?) using your
grub-on-partition scheme or write a custom upgrade-grub to run after
install from any OS, or hand edit.

> I currently only have one menu.lst.

Which won't work automatically, without a custom script.

>> You could then edit that to boot the two
>> ubuntus directly.  
> How?

Simply edit the BSD (or whatever OS with your single grub) menu.lst so
each entry gives the proper "root" which holds that kernel, etc.
Almost like how, after my Kubuntu install, the installer created a new
menu.lst (in its filesystem, in this case) which had entries for that
Kubuntu plus entries for my obsolete Ubuntu, etc.  (Sadly, it was
missing entries for my BSDs, requiring hand editing.  It treats MSFT
OSes more kindly, I hear. :( )

Oh. Maybe you're asking how to make grub boot a partition (as opposed
to a kernel)?  I don't know, but I'd be VERY suprised if grub can't
do that.  I can't check because I seem to be missing many "info"
files.  If grub won't, use FreeBSD's basic bootloader (or MSFT's).

> For booting the correct kernel the grub in the mbr would have to know
> which kernel to boot. And I can only manually update if I have two
> different ubuntu installs being booted from this one grub. Thats the
> thing I was asking about in the first place!

I don't understand that second sentence, unless by "manually", you
mean "run update-grub".  I mean "edit menu.lst" (from your BSD or
whatever OS you maintain grub with).

>> And I'd probably not even bother installing the
>> extra bootloaders to the partitions.  But if you do, you don't even
>> need grub in the MBR; you can use the much simpler BSD bootloader
>> which simply offers you a choice of partitions (or second disk) to
>> boot from.
> Sure I'd have to have a grub install for every ubuntu install if I want
> an apt-get upgrade to automagically upgrade my config to boot an
> upgraded kernel. Or is there an alternative to that?

If booting only from the MBR (with only one /boot/grub), you'd need to
hand edit menu.lst (or run a custom script to sus out other kernels on
other partitions - problematic) to boot desired kernels.  Of course,
this would have to be done after kernel upgrades (unless you use some
file renaming tricks).

But it sounds like you want automatic more than you want a single
/boot, so why not let each OS keep it's own /boot and install grub
to each OSes partition and have the MBR bootloader boot a partition.
Then your kernel upgrades will be available automatically without
changing the MBR bootloader (or its menu.lst, if any).

More information about the ubuntu-users mailing list