Got dual boot, now going for quad-boot

So… I’ve got a laptop with Win7Pro across three primary partitions of a 500GB 7200RPM drive. I can get any one Linux distro - Mint, openSuSE, Scientific, etc. to dual-boot just fine. Getting the various distros to co-habitate nicely is proving to be a bit more of a pain.

Right now… sda5, 6, & 7 are 20GB logical partitions. sda8 is a 4GB swap partition, and sda9 is roughly 200GB of data storage space to be mounted under /srv/data in whichever distro I happen to be booted into - assuming I get that far.

Mint 14 is on sda5 right now, and was working pretty smoothly. I had intended to (re)install openSuSE to sda6, and then reboot back into Mint to reconfigure grub2 (last time I mucked about with a boot loader, it was called LILO…).

Problem is… the openSuSE installer didn’t pick up Mint. No entry in grub2 for it all. Win7Pro, yes. SL, yes. Mint, no. I can mount sda5 from openSuSE and see the files on there, so I know I didn’t wipe it out (whew!).

I’ve been looking through the grub2 section of the openSuSE 12.2 Reference manual, and at a couple current threads on the forum here, and at the grub2 tutorial over @ The former seem to address primarily dual boot with windows (got that part working), and the latter is a couple years old and some of the commands in there don’t seem to work (can’t be found on a fresh install of openSuSE).

At this point… I guess my questions would be:

  1. What do I have to do/change to get grub2 to see it during boot?
  2. If I’m going to be multi-booting between different distros as well as Windows, where is the best place to stick grub2 @ - root partition, MBR, where?
  3. For when I go to install another distro on this drive in sda7… what would be the recommended way to do so, so as to not end up wiping out or otherwise b0rking my previously configured grub2 setup?



I’m surprised that it didn’t pickup Mint.

On your opensuse system, you can edit “/etc/grub.d/40_custom” and add something like:

menuentry "Alternate grub/linux on /dev/sda5"  {
       set root=(hd0,5)n
       chainloader +1

I’m guessing a bit there, but I have something similar to have a chain load to another linux version.

Why the hell did I write updategrub (and release the latest os-prober… for years )? :\

I thought updategrub was for legacy grub systems…?

It was … a long time ago. Now the package updategrub contains several scripts, including updateGrub2 and updateLegacyGrub.

# rpm -ql updategrub

The command updategrub is in fact a symlink (it always was) either to updateLegacyGrub or updateGrub2, depending on the OS release on which it is installed. Under 12.2, updategrub is a symlink to updateGrub2. Of course you can execute updateGrub2 as well - or even updateLegacyGrub if you happen tu use Legacy Grub under 12.2, which is possible to.

To add both kernel and chainloader entries for other Linux distros, use:

# updategrub -a

Option -a means that it will use an alternate os-prober script. It certainly works better with the latest os-prober from my repo, but I didn’t want to make it a requirement. Thus updategrub also works - with less features though - with the official os-prober under 12.2.

I don’t know if it will recongnize Mint 14 - probably, but if not, it will be easy to fix if you show me os-prober output.

To display the menu to standard output without actually rewriting it, you can use:

# updategrub -ad

Further, updategrub uses 2 variables in /etc/default/grub: GRUB_OS_PROBER_SORT and GRUB_OS_PROBER_SKIP. As their name indicate, they allow you to sort and skip boot entries. Here’s what I’m using:

GRUB_OS_PROBER_SORT="Ubuntu Mint openSUSE Mandriva Fedora Arch Debian Gentoo FreeBSD NetBSD OpenBSD Windows"
GRUB_OS_PROBER_SKIP="recovery failsafe fallback single-user"

Also notice that updateGrub2 doesn’t have a ncurse interface - unlike updateLegacyGrub -i. It is a true command line utility.

Okay… I found your article on updategrub and will read through it.

Interesting tid-bit… I was poking around in the Bootloader module from YaST, and set it to auto-boot into Win7Pro by default, rather than any of the Linux distros. Saved the changes, and didn’t think anything more about it.

Later this morning, I happened to exit from openSuSE and went to boot into Windows… and now suddenly Linux Mint shows up in the grub2 menu.

Wonder what caused that? Does the YaST bootloader module automatically probe and add entries to grub2 when you make changes and save there? Hopefully thats not going to be a problem going forward (over-riding/-writing my manual changes…)


Because whatever you did ran grub2-mkconfig to rewrite the menu.

Yes - although I’m not following the YaST approach. My bad … but the perl bootloader (executed by YaST bootloader) has been too nasty in the past to foreign Linux boot entries (just blindly removing them). This is one of the reason which brought me originally to write the first updategrub (updateLegacyGrub). It might do other things you don’t expect - such as rewriting the boot loader as well, while all you need is to refresh the menu. Don’t use YaST for this! Either use updateGrub2 or

# grub2-mkconfig -o /boot/grub2/grub.cfg

It will entirely rewrite the boot menu, but it won’t touch /etc/grub.d/40_custom (hence the name). When updategrub adds chainloaders, it simply checks for other Grubs and write a chainloader entry (like the first example posted by @nrickert) if it doesn’t already exist. Those chainloaders will be added in the menu everytime it gets refreshed.