LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem Booting Multiple Linux (https://www.linuxquestions.org/questions/linux-newbie-8/problem-booting-multiple-linux-4175429965/)

cOde13 10-01-2012 05:35 PM

Problem Booting Multiple Linux
 
Hello,

I'm trying to configure multiple Linux booting in one PC.

Here's output of "fdisk -l"

Code:

Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1        2040    16386268+  c  W95 FAT32 (LBA)
/dev/hda2            2041        7361    42740932+  f  W95 Ext'd (LBA)
/dev/hda3            7362        9730    19021824  83  Linux
/dev/hda5            2041        2693    5245191  83  Linux
/dev/hda6            2694        4733    16386268+  83  Linux
/dev/hda7            4734        4929    1574338+  82  Linux swap / Solaris
/dev/hda8            4930        7361    19535008+  83  Linux

I've installed RHEL5 on /dev/hda6 & it's Grub on /dev/hda5 (/boot).
I want to add other Linuxes on other partitions & boot them using RHEL5's grub.
So, I've installed Fedora_16 on /dev/hda3, without installing it's grub.
Then added some "chainloader +1" rules in /etc/grub.conf:
Quote:

title Red Hat Enterprise Linux Server (2.6.18-8.el5)
root (hd0,4)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.18-8.el5.img
title Windows
rootnoverify (hd0,0)
chainloader +1
title Fedora_16 (Verne)
root (hd0,2)
chainloader +1

But grub can't boot Fedora.

How to solve this?


Thanks.

Pedroski 10-01-2012 06:11 PM

might help
 
grub can write its own grub.cfg Make sure all partitions are mounted

In a terminal do:

sudo update-grub (takes a while, especially as you have a lot of partitions)

I am no expert, but I've never seen chainloader +1 in a Linux grub.cfg entry, except for Windows.
Typical entry for Fedora, which you can find in (Fedora partition) /boot/grub2/grub.cfg

menuentry 'Fedora (3.5.2-1.fc17.x86_64)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-710cdbf5-48ff-484d-b1f8-9a143a78dbec' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 --hint='hd0,msdos6' 710cdbf5-48ff-484d-b1f8-9a143a78dbec
else
search --no-floppy --fs-uuid --set=root 710cdbf5-48ff-484d-b1f8-9a143a78dbec
fi
echo 'Loading Fedora (3.5.2-1.fc17.x86_64)'
linux /boot/vmlinuz-3.5.2-1.fc17.x86_64 root=UUID=710cdbf5-48ff-484d-b1f8-9a143a78dbec ro rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8 rhgb quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-3.5.2-1.fc17.x86_64.img
}

The problem I see for you is: I have Ubuntu and Fedora. Ubuntu has 'control' of grub at boot. So if it adds a kernel, it does update-grub, which overwrites past entries. I don't usually have both partitions mounted, so it does not find Fedora. After a kernel update, I need to a) mount the Fedora partition b) run sudo update-grub

I would like to know how to automate this. For you it is even more important.

TobiSGD 10-01-2012 06:24 PM

RHEL 5 uses Grub, not Grub2, so your script won't work here, Pedroski.

@cOde13: If you want to chainload a Linux system you must install its bootloader to its root partition. Chainloading means that one bootloader starts the next one, which of course can't work if you don't have one installed.

Pedroski 10-01-2012 07:00 PM

I did mention I am no expert! It is not my script, it comes with Linux. I could not write that.

But: I could chainload Fedora from the Ubuntu boot grub.cfg??? Point it at (Fedora partition)/boot/grub2/grub.cfg or how??

Can you tell me what the entry should look like?? That would save me updating Ubuntu grub.cfg every time.

cOde13 10-01-2012 07:13 PM

Thanks for your replies.

Quote:

Originally Posted by TobiSGD (Post 4794396)
.........
@cOde13: If you want to chainload a Linux system you must install its bootloader to its root partition. Chainloading means that one bootloader starts the next one, which of course can't work if you don't have one installed.

It asked me to install Grub in /dev/hda ; can't recall if it asked for installing on particular partition. But I'll try and post here the result.
Is it possible to install Fedora's Grub to it's root partition using "linux rescue"? or, I need to reinstall Fedora?

TobiSGD 10-01-2012 07:36 PM

Quote:

Originally Posted by Pedroski (Post 4794411)
I did mention I am no expert! It is not my script, it comes with Linux. I could not write that.

But: I could chainload Fedora from the Ubuntu boot grub.cfg??? Point it at (Fedora partition)/boot/grub2/grub.cfg or how??

Can you tell me what the entry should look like?? That would save me updating Ubuntu grub.cfg every time.

To chainload Fedora you have to install the bootlaoder to fedoras root partition. You don't point it to Fedoras boot config, but to the partition, where Fedoras Grub takes over, reading the config. Since I haven't used Grub (and especially Grub2) for a long tme I can't help you with the config.

Pedroski 10-01-2012 07:44 PM

Thanks, I'll work on that.

cOde13 10-01-2012 08:27 PM

Okay I've find it. :D

Thanks everyone.

TobiSGD 10-01-2012 08:27 PM

Nice to hear that it works. Please mark this thread as solved using the thread tools at the top of the thread.

wolsonjr 10-01-2012 09:17 PM

Not necessarily applicable to this case but - I've normally run 4 to 5 different systems at a time, usually with Deb as prime and Deb grub booting all, no chain except Win. With earlier versions of update-grub, it would create an incorrect entry for Fedora because the boot img file in Fedora was a different name format and unrecognized, causing a boot entry with no img file. Had to manually add it to grub.cfg.
I suspect this would not be the case with only Red Hat and Fedora since I ASSUME they would have the same construction and a Red Hat grub should correctly handle a Fedora construct.

Pedroski 10-01-2012 09:55 PM

Then you will have the same problem as me: update the Deb kernel, and you will wipe out your grub.cfg entries, unless you have all partitions mounted at the time. Why would you do that?

Seems to me chainloading is a good idea for multiple boot systems. Just gotta figure out how to formulate the entries in grub.cfg and the problem of the bootloader. I'm sure I told Fedora not to install the boot loader, as that would wipe out my Ubuntu grub.

Hmmm, need to think about this!

wolsonjr 10-02-2012 07:06 AM

No, that is not the case. When the new Deb kernel installs and updates grub.cfg, it reads the entire disk for OS's and adds them. They don't have to be mounted. The only problem is when it doesn't properly recognize the particular set-up and this is pretty much solved now.
Also, with more current grub installs, if you need to do anything special or manual, you can sudo edit /etc/grub.d/40_custom and add any menu entry you like. When grub updates, it will add anything it finds there to grub.cfg. This could specific boot items or even just a message/reminder to yourself.

TobiSGD 10-02-2012 07:15 AM

Now I remember why I rather use Lilo instead.

Pedroski 10-02-2012 07:37 AM

You're lucky! If my Fedora partition is not mounted, Ubuntu does not see it. Actually, I've never had it mounted during a kernel update. Next time I'll try.

exsencon 10-02-2012 07:50 AM

Yes, I am with TobiSGD on this. In order to multiboot Linux you put one Linux Grub (or Lilo) in the MBR and any other Linux you want to multiboot, you'll have to put its bootloader IN HIS OWN ROOT PARTITION otherwise poor grub can't recognize the linux you want to boot when you start your system. I have a multiboot system with 12 Linux,Opensolaris, PCBSD and WINXP with that simple system and everything is working like a charm.Simple system, simple solution.

Pedroski 10-02-2012 09:49 AM

What exactly is the boot loader? At installation, Fedora asked me if I wanted to install the bootloader in mbr, to which I said no, because I already had Ubuntu installed, I didn't want to rewrite it. I can always run update-grub.

But this chainload option would save me doing that. How do I set it up? If you have 12 OSs installed, can you show me a sample of your grub.cfg please?

Pedroski 10-02-2012 05:58 PM

What exactly is the boot loader? At installation, Fedora asked me if I wanted to install the bootloader in mbr, to which I said no, because I already had Ubuntu installed, I didn't want to rewrite it. I can always run update-grub.

But this chainload option would save me doing that. How do I set it up? If you have 12 OSs installed, can you show me a sample of your grub.cfg please?

-kg- 10-02-2012 06:04 PM

Quote:

Originally Posted by Pedroski (Post 4794855)
You're lucky! If my Fedora partition is not mounted, Ubuntu does not see it. Actually, I've never had it mounted during a kernel update. Next time I'll try.

I recently had this experience with Fed 17. I had a much earlier version (13, I think), and when I upgraded to 17, I found that Ubuntu's GRUB would not detect it no matter what I did with the bootloader (short of putting it in the MBR of the primary hard drive). Perusing the Fedora forums, I found that in order for "sudo update-grub" to detect it, it was necessary to mount the Fedora root partition before Ubuntu's GRUB would detect it in an update.

While undoubtedly it would work mounting the Fed partition during an update, it probably isn't absolutely necessary, since you can run "sudo update-grub" afterwards to the same effect. Good experiment just to see what happens, though.

I just wish I knew why that's the case. I've never before encountered a situation in which GRUB can't detect another OS unless the partition is mounted.

exsencon 10-03-2012 07:06 AM

Quote:

Originally Posted by Pedroski (Post 4795476)
What exactly is the boot loader? At installation, Fedora asked me if I wanted to install the bootloader in mbr, to which I said no, because I already had Ubuntu installed, I didn't want to rewrite it. I can always run update-grub.

But this chainload option would save me doing that. How do I set it up? If you have 12 OSs installed, can you show me a sample of your grub.cfg please?

Bootloader is Grub2. My system runs with Ubuntu's grub2 installed in the MBR. Every other OS has it's bootloader installed in it's own root partition. That's how ubuntu's grub recognizes the other OSs.
Next I did edit /etc/grub.d/ in that way I only have a /etc/grub.d/40_custom file making that executable with:
sudo chmod +x /etc/grub.d/40_custom and making all the others non-executable with:

sudo chmod -x /etc/grub.d/10_linux /etc/grub.d/20_memtest86+ /etc/grub.d/30_os-prober

Then you run sudo update-grub and grub.cfg will only have what's in your /etc/grub.d/40_custom exactly as I wanted it.
Bottom line though is one bootloader in the mbr, all the others in their root partition.
Have to go, show you my grub.cfg asap.

exsencon 10-03-2012 10:22 AM

OK Pedroski as promised
Sample of my grub.cfg file:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 37a8c885-a431-42a6-97e0-1f682b46274c
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 37a8c885-a431-42a6-97e0-1f682b46274c
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

menuentry 'Ubuntu, with Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 37a8c885-a431-42a6-97e0-1f682b46274c
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=37a8c885-a431-42a6-97e0-1f682b46274c ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry 'Ubuntu, with Linux 3.0.0-12-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 37a8c885-a431-42a6-97e0-1f682b46274c
echo 'Loading Linux 3.0.0-12-generic ...'
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=37a8c885-a431-42a6-97e0-1f682b46274c ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.0.0-12-generic
}

menuentry "Solaris 11 in hd1,2" {
insmod ufs2
set root=(hd1,2)
chainloader +1
}

menuentry "CentOS 6.0 plus in hd1,5 (on /dev/sdb5)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set=root 7bd70f68-b192-4a48-86d5-1fd3422077c4
linux /boot/vmlinuz-2.6.32-71.29.1.el6.centos.plus.i686 ro root=UUID=7bd70f68-b192-4a48-86d5-1fd3422077c4 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=be-latin1 crashkernel=auto rhgb quiet
initrd /boot/initramfs-2.6.32-71.29.1.el6.centos.plus.i686.img
}

menuentry "CentOS 6.0 old1 in hd1,5 (on /dev/sdb5)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set=root 7bd70f68-b192-4a48-86d5-1fd3422077c4
linux /boot/vmlinuz-2.6.32-71.29.1.el6.i686 ro root=UUID=7bd70f68-b192-4a48-86d5-1fd3422077c4 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=be-latin1 crashkernel=auto rhgb quiet
initrd /boot/initramfs-2.6.32-71.29.1.el6.i686.img
}
menuentry "centos 6.0 old2 in hd1,5 (on /dev/sdb5)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set=root 7bd70f68-b192-4a48-86d5-1fd3422077c4
linux /boot/vmlinuz-2.6.32-71.el6.i686 ro root=UUID=7bd70f68-b192-4a48-86d5-1fd3422077c4 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=be-latin1 crashkernel=auto rhgb quiet
initrd /boot/initramfs-2.6.32-71.el6.i686.img
}

menuentry "Mandriva 2011 in hd1,6 (on /dev/sdb6)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 74add841-adca-47d1-93ca-23a5a3df4ae1
linux /boot/vmlinuz-2.6.38.7-desktop-1mnb2 BOOT_IMAGE=Mandriva_2011_in_hd1,6 root=/dev/sdb6 ro quiet splash vga=788
initrd (hd1,6)/boot/initramfs-2.6.38.7-desktop-1mnb2.img
}
menuentry "Mandriva failsafe in hd1,6 (on /dev/sdb6)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 74add841-adca-47d1-93ca-23a5a3df4ae1
linux /boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=74add841-adca-47d1-93ca-23a5a3df4ae1 nokmsboot failsafe
initrd (hd1,6)/boot/initrd.img
}
menuentry "Kubuntu 11.10 in hd1,7 (on /dev/sdb7)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos7)'
search --no-floppy --fs-uuid --set=root c37d2c9d-2ae5-4cae-ae02-2db05e61d854
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=c37d2c9d-2ae5-4cae-ae02-2db05e61d854 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Kubuntu 11.10 in hd1,7 (recovery mode) (on /dev/sdb7)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos7)'
search --no-floppy --fs-uuid --set=root c37d2c9d-2ae5-4cae-ae02-2db05e61d854
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=c37d2c9d-2ae5-4cae-ae02-2db05e61d854 ro recovery nomodeset
initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Debian 6.0 in hd1,8 (on /dev/sdb8)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos8)'
search --no-floppy --fs-uuid --set=root 3262ea73-757f-452d-b387-09ab12e76739
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=3262ea73-757f-452d-b387-09ab12e76739 ro quiet
initrd /boot/initrd.img-2.6.32-5-686
}
menuentry "Debian 6.0 in hd1,8 (recovery mode) (on /dev/sdb8)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos8)'
search --no-floppy --fs-uuid --set=root 3262ea73-757f-452d-b387-09ab12e76739
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=3262ea73-757f-452d-b387-09ab12e76739 ro single
initrd /boot/initrd.img-2.6.32-5-686
}
menuentry "Sabayon 7 in hd1,9 (on /dev/sdb9)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos9)'
search --no-floppy --fs-uuid --set=root b7e803df-8f2a-4b62-88f7-1a6022c91c09
linux /boot/kernel-genkernel-x86-3.0.0-sabayon ro init=/linuxrc splash=silent,theme:sabayon vga=791 console=tty1 quiet dokeymap keymap=be domdadm resume=swap:UUID=56e620eb-7d4c-43d8-9597-30248f59b13e real_resume=UUID=56e620eb-7d4c-43d8-9597-30248f59b13e root=UUID=b7e803df-8f2a-4b62-88f7-1a6022c91c09 docrypt
initrd /boot/initramfs-genkernel-x86-3.0.0-sabayon
}
menuentry "Sabayon 7 in hd1,9 (recovery mode) (on /dev/sdb9)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos9)'
search --no-floppy --fs-uuid --set=root b7e803df-8f2a-4b62-88f7-1a6022c91c09
linux /boot/kernel-genkernel-x86-3.0.0-sabayon ro single init_opts=single init=/linuxrc splash=verbose,theme:sabayon vga=791 console=tty1 quiet dokeymap keymap=be domdadm resume=swap:UUID=56e620eb-7d4c-43d8-9597-30248f59b13e real_resume=UUID=56e620eb-7d4c-43d8-9597-30248f59b13e root=UUID=b7e803df-8f2a-4b62-88f7-1a6022c91c09 docrypt
initrd /boot/initramfs-genkernel-x86-3.0.0-sabayon
}

menuentry "Fedora FC16 (Verne) (on /dev/sdb10)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos10)'
search --no-floppy --fs-uuid --set=root d260ce91-c2d6-469e-a22e-4d734b523083
linux /boot/vmlinuz-3.1.0-7.fc16.i686 root=/dev/sdb10
initrd /boot/initramfs-3.1.0-7.fc16.i686.img
}


menuentry "slackware 13.37 in hd1,11 (on /dev/sdb11)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos11)'
search --no-floppy --fs-uuid --set=root 871ba06c-0fb1-4049-afff-7a1abc027752
linux /boot/vmlinuz root=/dev/sdb11 ro vt.default_utf8=0 vga = normal
}
menuentry "OpenSUSE 11.4 in hd1,12 (on /dev/sdb12)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos12)'
search --no-floppy --fs-uuid --set=root cfc310eb-ffb6-4e30-8835-5d2ace7c90a7
linux /boot/vmlinuz-2.6.37.6-0.7-desktop root=/dev/disk/by-id/ata-WDC_WD2500AAJS-00VTA0_WD-WMART0531724-part12 resume=/dev/disk/by-id/ata-WDC_WD2500AAJS-00VTA0_WD-WMART0531724-part3 splash=silent quiet showopts vga=0x31a
initrd /boot/initrd-2.6.37.6-0.7-desktop
}
menuentry "Failsafe OpenSUSE 11.4 in hd1,12 (on /dev/sdb12)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos12)'
search --no-floppy --fs-uuid --set=root cfc310eb-ffb6-4e30-8835-5d2ace7c90a7
linux /boot/vmlinuz-2.6.37.6-0.7-desktop root=/dev/disk/by-id/ata-WDC_WD2500AAJS-00VTA0_WD-WMART0531724-part12 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a
initrd /boot/initrd-2.6.37.6-0.7-desktop
}


menuentry "PCBSD 8.2 in hd2,1" {
insmod ufs2
set root=(hd2,1)
chainloader +1
}

menuentry "MEPIS 11,0 in hd2,2 (on /dev/sdc2)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos2)'
search --no-floppy --fs-uuid --set=root 56ded2a8-9da8-4911-a95f-64534219b564
linux /boot/vmlinuz root=/dev/sdg2 nomce quiet splash vga=788
initrd /boot/initrd.img
}
menuentry "MEPIS 11.0 old in hd2,2 (on /dev/sdc2)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos2)'
search --no-floppy --fs-uuid --set=root 56ded2a8-9da8-4911-a95f-64534219b564
linux /boot/vmlinuz-2.6.36-1-mepis-smp root=/dev/sdg2 nomce quiet splash vga=788
initrd /boot/initrd.img-2.6.36-1-mepis-smp
}

menuentry "PCLinuxOS 2010.12 in hd2,3)" {
insmod ext2
set root=(hd2,3)
chainloader +1
}

menuentry "Kanotix 2011-05 in hd2,5 (on /dev/sdc5)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos5)'
search --no-floppy --fs-uuid --set=root 9e475759-52bb-43a2-abdd-2ebe98dbb160
linux /boot/vmlinuz-2.6.38-7-generic root=UUID=9e475759-52bb-43a2-abdd-2ebe98dbb160 ro quiet splash
initrd /boot/initrd.img-2.6.38-7-generic
}
menuentry "Kanotix 2011-05 in hd2,5 (recovery mode) (on /dev/sdc5)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos5)'
search --no-floppy --fs-uuid --set=root 9e475759-52bb-43a2-abdd-2ebe98dbb160
linux /boot/vmlinuz-2.6.38-7-generic root=UUID=9e475759-52bb-43a2-abdd-2ebe98dbb160 ro single
initrd /boot/initrd.img-2.6.38-7-generic
}
menuentry "Linux Mint 11 in hd2,7 (/dev/sdg7) (on /dev/sdc7)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos7)'
search --no-floppy --fs-uuid --set=root 3b43e806-7838-43bf-a853-920a1781723a
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=3b43e806-7838-43bf-a853-920a1781723a ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Linux Mint 11 in hd2,7 (/dev/sdg7) recovery mode (on /dev/sdc7)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos7)'
search --no-floppy --fs-uuid --set=root 3b43e806-7838-43bf-a853-920a1781723a
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=3b43e806-7838-43bf-a853-920a1781723a ro single
initrd /boot/initrd.img-2.6.38-8-generic
}

menuentry "Dell Utility Partition (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod fat
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 07d6-0c0c
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows XP Media Center Edition (on /dev/sda2)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root 6CF4F025F4EFEEF0
drivemap -s (hd0) ${root}
chainloader +1
}

And my /etc/grub.d/40_custom file (essentially the same)

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

menuentry 'Ubuntu, with Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 37a8c885-a431-42a6-97e0-1f682b46274c
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=37a8c885-a431-42a6-97e0-1f682b46274c ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry 'Ubuntu, with Linux 3.0.0-12-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 37a8c885-a431-42a6-97e0-1f682b46274c
echo 'Loading Linux 3.0.0-12-generic ...'
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=37a8c885-a431-42a6-97e0-1f682b46274c ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.0.0-12-generic
}

menuentry "Solaris 11 in hd1,2" {
insmod ufs2
set root=(hd1,2)
chainloader +1
}

menuentry "CentOS 6.0 plus in hd1,5 (on /dev/sdb5)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set=root 7bd70f68-b192-4a48-86d5-1fd3422077c4
linux /boot/vmlinuz-2.6.32-71.29.1.el6.centos.plus.i686 ro root=UUID=7bd70f68-b192-4a48-86d5-1fd3422077c4 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=be-latin1 crashkernel=auto rhgb quiet
initrd /boot/initramfs-2.6.32-71.29.1.el6.centos.plus.i686.img
}

menuentry "CentOS 6.0 old1 in hd1,5 (on /dev/sdb5)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set=root 7bd70f68-b192-4a48-86d5-1fd3422077c4
linux /boot/vmlinuz-2.6.32-71.29.1.el6.i686 ro root=UUID=7bd70f68-b192-4a48-86d5-1fd3422077c4 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=be-latin1 crashkernel=auto rhgb quiet
initrd /boot/initramfs-2.6.32-71.29.1.el6.i686.img
}
menuentry "centos 6.0 old2 in hd1,5 (on /dev/sdb5)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set=root 7bd70f68-b192-4a48-86d5-1fd3422077c4
linux /boot/vmlinuz-2.6.32-71.el6.i686 ro root=UUID=7bd70f68-b192-4a48-86d5-1fd3422077c4 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=be-latin1 crashkernel=auto rhgb quiet
initrd /boot/initramfs-2.6.32-71.el6.i686.img
}

menuentry "Mandriva 2011 in hd1,6 (on /dev/sdb6)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 74add841-adca-47d1-93ca-23a5a3df4ae1
linux /boot/vmlinuz-2.6.38.7-desktop-1mnb2 BOOT_IMAGE=Mandriva_2011_in_hd1,6 root=/dev/sdb6 ro quiet splash vga=788
initrd (hd1,6)/boot/initramfs-2.6.38.7-desktop-1mnb2.img
}
menuentry "Mandriva failsafe in hd1,6 (on /dev/sdb6)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 74add841-adca-47d1-93ca-23a5a3df4ae1
linux /boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=74add841-adca-47d1-93ca-23a5a3df4ae1 nokmsboot failsafe
initrd (hd1,6)/boot/initrd.img
}
menuentry "Kubuntu 11.10 in hd1,7 (on /dev/sdb7)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos7)'
search --no-floppy --fs-uuid --set=root c37d2c9d-2ae5-4cae-ae02-2db05e61d854
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=c37d2c9d-2ae5-4cae-ae02-2db05e61d854 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Kubuntu 11.10 in hd1,7 (recovery mode) (on /dev/sdb7)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos7)'
search --no-floppy --fs-uuid --set=root c37d2c9d-2ae5-4cae-ae02-2db05e61d854
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=c37d2c9d-2ae5-4cae-ae02-2db05e61d854 ro recovery nomodeset
initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Debian 6.0 in hd1,8 (on /dev/sdb8)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos8)'
search --no-floppy --fs-uuid --set=root 3262ea73-757f-452d-b387-09ab12e76739
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=3262ea73-757f-452d-b387-09ab12e76739 ro quiet
initrd /boot/initrd.img-2.6.32-5-686
}
menuentry "Debian 6.0 in hd1,8 (recovery mode) (on /dev/sdb8)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos8)'
search --no-floppy --fs-uuid --set=root 3262ea73-757f-452d-b387-09ab12e76739
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=3262ea73-757f-452d-b387-09ab12e76739 ro single
initrd /boot/initrd.img-2.6.32-5-686
}
menuentry "Sabayon 7 in hd1,9 (on /dev/sdb9)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos9)'
search --no-floppy --fs-uuid --set=root b7e803df-8f2a-4b62-88f7-1a6022c91c09
linux /boot/kernel-genkernel-x86-3.0.0-sabayon ro init=/linuxrc splash=silent,theme:sabayon vga=791 console=tty1 quiet dokeymap keymap=be domdadm resume=swap:UUID=56e620eb-7d4c-43d8-9597-30248f59b13e real_resume=UUID=56e620eb-7d4c-43d8-9597-30248f59b13e root=UUID=b7e803df-8f2a-4b62-88f7-1a6022c91c09 docrypt
initrd /boot/initramfs-genkernel-x86-3.0.0-sabayon
}
menuentry "Sabayon 7 in hd1,9 (recovery mode) (on /dev/sdb9)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos9)'
search --no-floppy --fs-uuid --set=root b7e803df-8f2a-4b62-88f7-1a6022c91c09
linux /boot/kernel-genkernel-x86-3.0.0-sabayon ro single init_opts=single init=/linuxrc splash=verbose,theme:sabayon vga=791 console=tty1 quiet dokeymap keymap=be domdadm resume=swap:UUID=56e620eb-7d4c-43d8-9597-30248f59b13e real_resume=UUID=56e620eb-7d4c-43d8-9597-30248f59b13e root=UUID=b7e803df-8f2a-4b62-88f7-1a6022c91c09 docrypt
initrd /boot/initramfs-genkernel-x86-3.0.0-sabayon
}

menuentry "Fedora FC16 (Verne) (on /dev/sdb10)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos10)'
search --no-floppy --fs-uuid --set=root d260ce91-c2d6-469e-a22e-4d734b523083
linux /boot/vmlinuz-3.1.0-7.fc16.i686 root=/dev/sdb10
initrd /boot/initramfs-3.1.0-7.fc16.i686.img
}


menuentry "slackware 13.37 in hd1,11 (on /dev/sdb11)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos11)'
search --no-floppy --fs-uuid --set=root 871ba06c-0fb1-4049-afff-7a1abc027752
linux /boot/vmlinuz root=/dev/sdb11 ro vt.default_utf8=0 vga = normal
}
menuentry "OpenSUSE 11.4 in hd1,12 (on /dev/sdb12)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos12)'
search --no-floppy --fs-uuid --set=root cfc310eb-ffb6-4e30-8835-5d2ace7c90a7
linux /boot/vmlinuz-2.6.37.6-0.7-desktop root=/dev/disk/by-id/ata-WDC_WD2500AAJS-00VTA0_WD-WMART0531724-part12 resume=/dev/disk/by-id/ata-WDC_WD2500AAJS-00VTA0_WD-WMART0531724-part3 splash=silent quiet showopts vga=0x31a
initrd /boot/initrd-2.6.37.6-0.7-desktop
}
menuentry "Failsafe OpenSUSE 11.4 in hd1,12 (on /dev/sdb12)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd1,msdos12)'
search --no-floppy --fs-uuid --set=root cfc310eb-ffb6-4e30-8835-5d2ace7c90a7
linux /boot/vmlinuz-2.6.37.6-0.7-desktop root=/dev/disk/by-id/ata-WDC_WD2500AAJS-00VTA0_WD-WMART0531724-part12 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a
initrd /boot/initrd-2.6.37.6-0.7-desktop
}


menuentry "PCBSD 8.2 in hd2,1" {
insmod ufs2
set root=(hd2,1)
chainloader +1
}

menuentry "MEPIS 11,0 in hd2,2 (on /dev/sdc2)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos2)'
search --no-floppy --fs-uuid --set=root 56ded2a8-9da8-4911-a95f-64534219b564
linux /boot/vmlinuz root=/dev/sdg2 nomce quiet splash vga=788
initrd /boot/initrd.img
}
menuentry "MEPIS 11.0 old in hd2,2 (on /dev/sdc2)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos2)'
search --no-floppy --fs-uuid --set=root 56ded2a8-9da8-4911-a95f-64534219b564
linux /boot/vmlinuz-2.6.36-1-mepis-smp root=/dev/sdg2 nomce quiet splash vga=788
initrd /boot/initrd.img-2.6.36-1-mepis-smp
}

menuentry "PCLinuxOS 2010.12 in hd2,3)" {
insmod ext2
set root=(hd2,3)
chainloader +1
}

menuentry "Kanotix 2011-05 in hd2,5 (on /dev/sdc5)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos5)'
search --no-floppy --fs-uuid --set=root 9e475759-52bb-43a2-abdd-2ebe98dbb160
linux /boot/vmlinuz-2.6.38-7-generic root=UUID=9e475759-52bb-43a2-abdd-2ebe98dbb160 ro quiet splash
initrd /boot/initrd.img-2.6.38-7-generic
}
menuentry "Kanotix 2011-05 in hd2,5 (recovery mode) (on /dev/sdc5)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos5)'
search --no-floppy --fs-uuid --set=root 9e475759-52bb-43a2-abdd-2ebe98dbb160
linux /boot/vmlinuz-2.6.38-7-generic root=UUID=9e475759-52bb-43a2-abdd-2ebe98dbb160 ro single
initrd /boot/initrd.img-2.6.38-7-generic
}
menuentry "Linux Mint 11 in hd2,7 (/dev/sdg7) (on /dev/sdc7)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos7)'
search --no-floppy --fs-uuid --set=root 3b43e806-7838-43bf-a853-920a1781723a
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=3b43e806-7838-43bf-a853-920a1781723a ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Linux Mint 11 in hd2,7 (/dev/sdg7) recovery mode (on /dev/sdc7)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos7)'
search --no-floppy --fs-uuid --set=root 3b43e806-7838-43bf-a853-920a1781723a
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=3b43e806-7838-43bf-a853-920a1781723a ro single
initrd /boot/initrd.img-2.6.38-8-generic
}

menuentry "Dell Utility Partition (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod fat
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 07d6-0c0c
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows XP Media Center Edition (on /dev/sda2)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root 6CF4F025F4EFEEF0
drivemap -s (hd0) ${root}
chainloader +1
}


As you can see I only work with my selfmade 40_custom file because it gives exactly what I want when I start my PC.
I just make my choice from the OS menu and I go.
Hope this helps.

TobiSGD 10-03-2012 12:31 PM

Please edit your post and embed the content of that file in [code][/code]-tags. You can easily do that in the advanced editot with highlighting the content and pressing the #-symbol above the editor. This will make your post much easier to read.

Pedroski 10-03-2012 06:45 PM

Ok thanks for the sample grub.cfg

So whatever you put after ### BEGIN /etc/grub.d/40_custom ### will not be overwritten by update-grub.

But when your other systems update the kernel, what do you do? You don't seem to have all of them 'chainloaded', which means the entry will not be the newest kernel.

menuentry "PCLinuxOS 2010.12 in hd2,3)" {
insmod ext2
set root=(hd2,3)
chainloader +1

Do you manually update your grub.cfg? I suppose you must if you don't chainload all of your possiblities.

What is Solaris like??

TobiSGD 10-03-2012 06:50 PM

You should not change things in grub.cfg at all, all of it will be overwritten when update-grub is launched. You have to add your changes to /etc/grub.d/40_custom.

exsencon 10-04-2012 11:24 AM

Quote:

Originally Posted by TobiSGD (Post 4796222)
Please edit your post and embed the content of that file in [code][/code]-tags. You can easily do that in the advanced editot with highlighting the content and pressing the #-symbol above the editor. This will make your post much easier to read.

Sorry about that. I was in a hurry and realized too late. Sorry

exsencon 10-04-2012 12:04 PM

Quote:

Originally Posted by Pedroski (Post 4796504)
Ok thanks for the sample grub.cfg


Do you manually update your grub.cfg? I suppose you must if you don't chainload all of your possiblities.

What is Solaris like??

No, as TobiSGD says you never manually edit grub.cfg as it will be overwritten all the time. If you want to change something you edit your /etc/grub.d/40_custom and then you do update-grub and your grub.cfg will be updated with your latest changes.
As for upgrading I have to admit upgrading over the internet always ended in disaster for me, so what I do is save my stuff of any particular Linux I want to upgrade (and not every 6 months believe me) wipe out the partition,download the iso of the latest linux and install it in the empty partition and get my saved stuff back in.
It's a bit time-consuming but it works. And you know the saying "when your system works,don't try to fix it"

As for Solaris (a UNIX,not a Linux)I only installed it because I wanted to prove to myself I could do it and it works! Be aware though, it only installs in a primary partition like Windows(well,yes)and it has a very peculiar way of denominating your partitions so be careful not to wipe out anything!Not at all Windows or Linux-like.

A final note;of course I do not use all those OSs I have on my machine all the time. But it is great fun to have them and once in a while I use a Centos or a Sabayon or whatever.
I still regret Grub legacy as it is called today because I still think it was easier to handle for most of us but we have to go with grub2 as most linuxes do today...

TobiSGD 10-04-2012 12:16 PM

Quote:

Originally Posted by exsencon (Post 4797271)
I still regret Grub legacy as it is called today because I still think it was easier to handle for most of us but we have to go with grub2 as most linuxes do today...

If you use chainloading anyways nothing prevents you from using Grub legacy, Lilo, sys/extlinux or any other bootloader that supports chainloading.

Pedroski 10-04-2012 05:25 PM

Sounds like a very complicated way of doing things, saving and reinstalling. I never have any trouble updating, I do it almost daily.

sudo apt-get update for Ubuntu or sudo yum update for Fed.

Normally the systems will automatically check and recommend updates. I think Ubuntu uses Synaptic. As long as you have the repos you need, everything works fine! You should try it!

TobiSGD 10-04-2012 05:47 PM

Quote:

Originally Posted by Pedroski (Post 4797552)
Sounds like a very complicated way of doing things, saving and reinstalling. I never have any trouble updating, I do it almost daily.

sudo apt-get update for Ubuntu or sudo yum update for Fed.

Normally the systems will automatically check and recommend updates. I think Ubuntu uses Synaptic. As long as you have the repos you need, everything works fine! You should try it!

At first, sudo apt-get update will not update anything besides the package database, you have to launch sudo apt-get upgrade afterwards.

Anyways, exsencon didn't mean the daily security updates, but upgrading to a newer version of the distribution, which on some distributions often ends disastrous.

vigi 10-04-2012 06:02 PM

I use grub legacy as a boot manager on a separate sda1 50mb partition and chainloader each system, this way each system is isolated and updated with it's default boot loader. Legacy grub is easier to edit, grub4dos also works well as a manager.

Pedroski 10-04-2012 08:34 PM

Aha, if he meant 'upgrade', not 'update', then I read it wrong, sorry.

Upgrade has never worked for me either, even though Fedora say it is specifically tested! I don't even go there anymore.

exsencon 10-05-2012 06:47 AM

Quote:

Originally Posted by Pedroski (Post 4797656)
Aha, if he meant 'upgrade', not 'update', then I read it wrong, sorry.

Upgrade has never worked for me either, even though Fedora say it is specifically tested! I don't even go there anymore.

Sure Pedroski, I meant upgrade to a newer version of the distribution. It never worked for me. Updating works fine of course.


All times are GMT -5. The time now is 08:39 PM.