Tri-Booting & Grub
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Tri-Booting & Grub
I've got three distributions of Linux installed on this computer, VectorLinux, CentOS and Linux Mint 10. When I installed Mint 10, it loaded its own Grub and overwrote the CentOS Grub -- and didn't give me a choice of where to put it. Mint picked up and booted CentOS without problems, but wouldn't boot VectorLinux. So I restored the CentOS Grub and now I can boot VectorLinux and CentOS but not Linux Mint. I'm guessing that Mint loaded its Grub in the MBR, so now when I try to chainload it, it can't find Grub in its partition. My problem is that I don't know how to reinstall Mint's Grub in its own partition. (I think that's my problem, anyhow.) With CentOS there is a rescue mode that allows me to boot to CentOS on a CD, chroot into the sysimage file and run grub-install. Is there anything like that in Linux Mint? If not, can a boot disk/CD be made for Linux Mint? I wouldn't mind using a boot disk if I can't get Grub to work.
Thanks for any pointers.
Thanks for any pointers.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Tri-Booting & Grub
I think that CentOs uses grub 1 right?
If so then you will have to edit the CentOs menu.lst file to add the Mint entry. The usual format of 'chainloader+1' does not seem to work when booting grub 2 from grub 1 so you have to write it like this:
Obviously don't copy my partition references, substitute your own. And don't be confused by the grub 2 partition numbering scheme as you are dealing with grub 1 so in my case (hd0,5) refers to /dev/sda6, (partitions counted from zero as well as drives, the way it always has been).
NB.
If so then you will have to edit the CentOs menu.lst file to add the Mint entry. The usual format of 'chainloader+1' does not seem to work when booting grub 2 from grub 1 so you have to write it like this:
Code: Select all
title mint10
root (hd0,5)
kernel (hd0,5)/boot/grub/core.img
NB.
It did, you just missed it. The day that Mint (or any other distro) only installs grub to the mbr will be the day I stop using it.Mint 10, it loaded its own Grub and overwrote the CentOS Grub -- and didn't give me a choice of where to put it
Re: Tri-Booting & Grub
Yes, it did give you the choice - but it's easy to overlook: When installing Mint from the live system, just after finishing all the essential parameters (keyboard-locale, username, timezone, harddrive partitioning and so on), you are asked to proceed to the actual install (or cancel). There, in the (I believe) lower right corner is an "advanced" button, where you can specify to install grub either * in the master boot record (default), * on any partition, or * not at all. The default is used were the "advanced" tab isn't clicked.rcentros wrote:I've got three distributions of Linux installed on this computer, VectorLinux, CentOS and Linux Mint 10. When I installed Mint 10, it loaded its own Grub and overwrote the CentOS Grub -- and didn't give me a choice of where to put it.
You have several choices:rcentros wrote: Mint picked up and booted CentOS without problems, but wouldn't boot VectorLinux. So I restored the CentOS Grub and now I can boot VectorLinux and CentOS but not Linux Mint. I'm guessing that Mint loaded its Grub in the MBR, so now when I try to chainload it, it can't find Grub in its partition. My problem is that I don't know how to reinstall Mint's Grub in its own partition. (I think that's my problem, anyhow.) With CentOS there is a rescue mode that allows me to boot to CentOS on a CD, chroot into the sysimage file and run grub-install. Is there anything like that in Linux Mint? If not, can a boot disk/CD be made for Linux Mint? I wouldn't mind using a boot disk if I can't get Grub to work.
(1) Manually edit the CentOS grub config file and add a entry for Mint. The file and location may vary, but often, it is /boot/grub/grub.cfg.
What is the entry you have to make:
HINT: Mount the Mint partition when running another Linux. The grub config file is almost certainly still there: Open what would be /boot/grub/grub.cfg under Mint -- REMEMBER, you are not running Mint right now, therefore the path to the *right file* is different now. Example /mymintmount/boot/grub/grub.cfg. Retrieve the menuentry for Mint-10 and place it in your grub.cfg of the distro where grub is controlled from right now.
NOTE: If you have messed with your partitions, your UUID's may have changed - and the Mint-grub.cfg may not reflect the latest.
NOTE2: Be sure what you are doing with regard to partition numbering in grub
EDIT: If you do have an issue that CentOS uses legacy-grub, and if it does not understand some Mint entry (of grub-2 standard) - which is what the last entry suggests:
If you create an entry by yourself, you'll need (1) a partition, (2) a kernel **and (3)an initrd**.
If youu are unsure about your hard drive ID: In order to find your UUID for your partition containing Mint, you could also type
Code: Select all
ls -l /dev/disk/by-uuid
(2) Install grub from Mint (once you managed to boot into it one time, for example by direct grub entries at boot time) into the MBR, and add entry for any other missing OS in Mint's /boot/grub/grub.cfg in a similar way.
The same applies as above: be aware of UUIDs and partition numbers especially if you messed around with formatting partitions
If you have issues with legacy-grub, that may be a good option for sure, as you have just one grub-2 running and no other bootloader issues.
(3) Install grub for Mint on Mint's partition rather than the MBR: Manually done by typing (exampe: Mint is at /dev/sda3). This also required a one-time boot into Mint, by direct grub entries at boot time.
Code: Select all
cd /boot/grub
sudo grub-install /dev/sda3
Again, the remarks about partition UUIDs and the like apply here, too.
To enabling chain loading, you'll also need an entry for it in the grub config file that controls the MBR's grub.
Hope this helps.
Good luck.
Last edited by olligod on Wed Jan 26, 2011 8:08 pm, edited 1 time in total.
Re: Tri-Booting & Grub
Hi rcentros!
Another idea (I always install multiboot):
With the Mint live medium you could install GRUB"2" into the MBR, a will find the other linux systems.
Please see my help (link1 below).
seeley
EDIT: I only had 2 cases where a linux distri was not found: old Fedora (obsolete - it now works) and PCLinuxOS (status?), because a wrong entry was created in grub.cfg (bug!).
Another idea (I always install multiboot):
With the Mint live medium you could install GRUB"2" into the MBR, a
Code: Select all
sudo update-grub
Please see my help (link1 below).
seeley
EDIT: I only had 2 cases where a linux distri was not found: old Fedora (obsolete - it now works) and PCLinuxOS (status?), because a wrong entry was created in grub.cfg (bug!).
Re: Tri-Booting & Grub
... I second that actually - except the missing distro in grub is exactly what seems to happen on his machine.seeley wrote:Hi rcentros!
With the Mint live medium you could install GRUB"2" into the MBR, awill find the other linux systems.Code: Select all
sudo update-grub
EDIT: I only had 2 cases where a linux distri was not found: old Fedora (obsolete - it now works) and PCLinuxOS (status?), because a wrong entry was created in grub.cfg (bug!).
But the manual entry into grub.cfg then comes handy of course.
Re: Tri-Booting & Grub
Hi!
My notebook crashed some weeks ago and I now have to use a 5 years old one (I hope I can use it a few days - hardware issues, too).
So I can't test Grub 1.98 with PCL; the wrong entry in grub.cfg (easy to correct):
My notebook crashed some weeks ago and I now have to use a 5 years old one (I hope I can use it a few days - hardware issues, too).
So I can't test Grub 1.98 with PCL; the wrong entry in grub.cfg (easy to correct):
seeleymenuentry "PClinux (on /dev/sda10)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos10)'
search --no-floppy --fs-uuid --set c6cf8c27-f4cb-450a-bc6d-2b34ec631528
linux /boot/vmlinuz BOOT_IMAGE=PClinux root=UUID=c6cf8c27-f4cb-450a-bc6d-2b34ec631528 vmalloc=256M splash=silent vga=788
initrd (hd0,9)/boot/initrd.img
Re: Tri-Booting & Grub
Yes, CentOS uses Grub 1 -- I should have mentioned that, sorry. I tried this entry, with and without the space between (hda0,3)/boot... One gave me File Name error, the other gave me a path error. The core.img is on the partition, not sure why the path doesn't work. I also tried the full path "kernel /dev/hda4/boot/grub/core.img" but that gave me one of the errors (can't remember which one right now).viking777 wrote:I think that CentOs uses grub 1 right?
If so then you will have to edit the CentOs menu.lst file to add the Mint entry. The usual format of 'chainloader+1' does not seem to work when booting grub 2 from grub 1 so you have to write it like this:
Code: Select all
title mint10 root (hd0,5) kernel (hd0,5)/boot/grub/core.img
Apparently I missed it, and *does* appear that the Grub 2 *is* installed on Linux Mint's partition. I was just making poor assumptions.Obviously don't copy my partition references, substitute your own. And don't be confused by the grub 2 partition numbering scheme as you are dealing with grub 1 so in my case (hd0,5) refers to /dev/sda6, (partitions counted from zero as well as drives, the way it always has been).
NB.It did, you just missed it. The day that Mint (or any other distro) only installs grub to the mbr will be the day I stop using it.Mint 10, it loaded its own Grub and overwrote the CentOS Grub -- and didn't give me a choice of where to put it
Thanks for the response, BTW.
Re: Tri-Booting & Grub
Good to know, I'll watch for that next time. I guess I'm used to the CentOS way of doing it -- it loads Grub near the end of the installation process.olligod wrote: Yes, it did give you the choice - but it's easy to overlook: When installing Mint from the live system, just after finishing all the essential parameters (keyboard-locale, username, timezone, harddrive partitioning and so on), you are asked to proceed to the actual install (or cancel). There, in the (I believe) lower right corner is an "advanced" button, where you can specify to install grub either * in the master boot record (default), * on any partition, or * not at all. The default is used were the "advanced" tab isn't clicked.
This looked promising, but when I tried copying everything from "Menuentry" to the last bracket (not sure if I needed to put all that in or not), I was told that the "kernel needs to be loaded first." I looked at the lines and there was no kernel reference? Not sure exactly where that would be.You have several choices:
(1) Manually edit the CentOS grub config file and add a entry for Mint. The file and location may vary, but often, it is /boot/grub/grub.cfg.
What is the entry you have to make:
HINT: Mount the Mint partition when running another Linux. The grub config file is almost certainly still there: Open what would be /boot/grub/grub.cfg under Mint -- REMEMBER, you are not running Mint right now, therefore the path to the *right file* is different now. Example /mymintmount/boot/grub/grub.cfg. Retrieve the menuentry for Mint-10 and place it in your grub.cfg of the distro where grub is controlled from right now.
NOTE: If you have messed with your partitions, your UUID's may have changed - and the Mint-grub.cfg may not reflect the latest.
NOTE2: Be sure what you are doing with regard to partition numbering in grub
I don't think I've done anything to change the UUID and the grub.cfg file in the Linux Mint partition still has it listed, but I'm not sure when and where the kernel gets loaded in Grub 2.EDIT: If you do have an issue that CentOS uses legacy-grub, and if it does not understand some Mint entry (of grub-2 standard) - which is what the last entry suggests:
If you create an entry by yourself, you'll need (1) a partition, (2) a kernel **and (3)an initrd**.
If youu are unsure about your hard drive ID: In order to find your UUID for your partition containing Mint, you could also typeThat works under Mint/Ubuntu (which you may not be able to boot into now as you say)....your mileage may vary under other Linuxes.Code: Select all
ls -l /dev/disk/by-uuid
Unfortunately VectorLinux doesn't seem to play well with Grub 2. I think that's because it uses LILO as its default. And, of course, my ignorance is at work here.(2) Install grub from Mint (once you managed to boot into it one time, for example by direct grub entries at boot time) into the MBR, and add entry for any other missing OS in Mint's /boot/grub/grub.cfg in a similar way.
The same applies as above: be aware of UUIDs and partition numbers especially if you messed around with formatting partitions
If you have issues with legacy-grub, that may be a good option for sure, as you have just one grub-2 running and no other bootloader issues.
It's a good place to start anyhow. Not sure now (short of reinstalling) that I can boot back into Linux Mint, but I think I read somewhere that you can load Linux Mint from CD and do a rescue from there. I think I've also read that it's possible to uninstall Grub 2 and install Grub 1 in its place, which is how I think I would do it if I can ever get Linux Mint to boot again. I'm really more comfortable using CentOS' Grub because I know it a lot better than Linux Mint.(3) Install grub for Mint on Mint's partition rather than the MBR: Manually done by typing (exampe: Mint is at /dev/sda3). This also required a one-time boot into Mint, by direct grub entries at boot time.Important: You must know where you are (in which directory), because you have likely several grub.cfg's on your system and it depends how they are visible.Code: Select all
cd /boot/grub sudo grub-install /dev/sda3
Again, the remarks about partition UUIDs and the like apply here, too.
To enabling chain loading, you'll also need an entry for it in the grub config file that controls the MBR's grub.
Hope this helps.
Good luck.
Thanks, a lot of good stuff here to digest.
Last edited by rcentros on Thu Jan 27, 2011 6:24 pm, edited 1 time in total.
Re: Tri-Booting & Grub
Unfortunately Grub 2 doesn't like VectorLinux -- even though it did find its partition. This is not the first time a Grub 2 installation had trouble with VectorLinux. It did, however, find and boot CentOS, so maybe I need to look at installing Grub in the VectorLinux partition.seeley wrote:Hi rcentros!
Another idea (I always install multiboot):
With the Mint live medium you could install GRUB"2" into the MBR, awill find the other linux systems.Code: Select all
sudo update-grub
Please see my help (link1 below).
seeley
Thanks. So I can reinstall the Linux Mint Grub simply by booting from the CD and typing 'update-grub' as root (or using sudo)?
Re: Tri-Booting & Grub
I tried manually entering VectorLinux into Grub 2's 'grub.cfg' file when trying another distribution that used Grub 2. Again, it was probably ignorance, but I tried several suggestions without luck.olligod wrote: ... I second that actually - except the missing distro in grub is exactly what seems to happen on his machine.
But the manual entry into grub.cfg then comes handy of course.
Here's what it currently looks like in the CentOS Grub 'menu.lst'
Code: Select all
title Vector Linux Standard Deluxe
root (hd0,0)
kernel (hd0,0)/boot/vmlinuz-2.6.27.12 root=/dev/hda1 splash=silent ro
initrd (hd0,0)/boot/initrd
boot
Re: Tri-Booting & Grub
Hi!
Supposing the easiest way is installing Grub"2" from Mint live:
please read again my post Jan.26, 2:06 pm and my help (link1 below).
seeley
Supposing the easiest way is installing Grub"2" from Mint live:
please read again my post Jan.26, 2:06 pm and my help (link1 below).
seeley
Re: Tri-Booting & Grub
OK, it seem you are more comfortable to use Grub legacy.It's a good place to start anyhow. Not sure now (short of reinstalling) that I can boot back into Linux Mint, but I think I read somewhere that you can load Linux Mint from CD and do a rescue from there. I think I've also read that it's possible to uninstall Grub 2 and install Grub 1 in its place, which is how I think I would do it if I can ever get Linux Mint to boot again. I'm really more comfortable using CentOS' Grub because it a lot better than Linux Mint.
And when you choose CentOS as the Master Boot Loader ( the one control MBR), you can boot up CentOS and Vector, only problem is you cannot boot Mint.
Here is just a brief description, when you are using Grub legacy as Master Boot Loader, it can boot Linux partition directly or indirectly.
Direct method required you to give a Grub stanza with actual kernel line and initrd line. This is slightly more involved.
Indirect method is easier for you, there is a process called chainloading, and you can chainload any Linux OS provided it was made chainloadable during installation time, whether it is using Lilo, Grub legacy or Grub2 as the partition boot loader. You may have missed that one during Mint installation. But nevermind you can always do it without reinstalling Mint partition.
Here you need to do two things, assuming you are already using CentOS's grub legacy and familiar with editing the grub stanza which is the file /boot/grub/menu.lst
1. Make Mint chainloadable:
To do this , since you already have Grub2 installed in Mint partition, I assume that is partition number 8, you need to substitute anything '8' with your actual partition number.
You can boot up Mint Live CD and restore/install/replicate Grub2 inside sda8 by these commands in a root terminal:
Code: Select all
mkdir /mnt/sda8
mount /dev/sda8 /mnt/sda8
grub-install --force --root-directory=/mnt/sda8 /dev/sda8
2. Add grub stanza in your CentOS's /boot/grub/menu.lst
Next you boot up from CentOS and use its editor , at root, go to /boot/grub/menu.lst and add the following stanza, as my example is for sda8 and thus root (hd0,7). Change that to your actual partition number. For example, if your Mint partition is sda13, then root (hd0,12)
After you amend the grub stanza, save it, reboot, you should get to CentOS's grub menu and the Mint partition would appear as in the title. Select it and hit enter to boot Minttitle Mint 10 chainload to sda8
root (hd0,7)
chainloader +1
Hope it works for you
Re: Tri-Booting & Grub
I will be fascinated to see if wayne128' s method works, I hope it does, but I don't think it will because the only way I have ever been able to get grub 2 to install onto a partition from a live cd is to bind /dev /root and /proc and then use a chroot environment. Mind you I haven't tried it for a long while so maybe grub2 has improved since the --force method last failed me, who knows.
However if it does fail and you decide you want to revert to Grub legacy I posted about that here:
http://forums.linuxmint.com/viewtopic.p ... evert+grub
That definitely works, I have successfully done it twice. Maybe a last resort though as grub 2 seems to be here to stay despite its many failings.
However if it does fail and you decide you want to revert to Grub legacy I posted about that here:
http://forums.linuxmint.com/viewtopic.p ... evert+grub
That definitely works, I have successfully done it twice. Maybe a last resort though as grub 2 seems to be here to stay despite its many failings.
Re: Tri-Booting & Grub
I meant to write "...more comfortable using CentOS's Grub because I KNOW it a lot better..." Sorry I left out those two words, I didn't mean to disparage Linux Mint's Grub. I should also add the reason I'm more comfortable is that VectorLinux and CentOS will remain on this computer, the partition Linux Mint is installed on is currently my "test" partition and I may install other Linuxes on it. (Though that may change and Linux Mint might just stay there.)wayne128 wrote:. I'm really more comfortable using CentOS' Grub because it a lot better than Linux Mint.
At any rate, I'm now able to boot into Linux Mint from CentOS' Grub. Well, actually, it chainloads Linux Mint's Grub and I boot from that. Thank you very much. I will mark this solved. At first I didn't think it worked because Grub showed errors and warnings ("this is a bad idea") but apparently it installed Grub where it didn't want to anyhow.
Just a quick question. If I had clicked on the advanced tab when installing, would Linux Mint 10 have allowed me to install Grub on its own partition?
Again, thanks. And thanks to everyone for your patience with this.
Re: Tri-Booting & Grub
Grub 2 threw out at least two errors and a warning (I should have copied them) but showed that Grub 2 installed anyhow. And the chainloading works as I'm posting from Linux Mint 10 -- but I may look into your solution anyhow. I don't quite understand the point of Grub 2, it seems like it's making things more complex and less accessible. Maybe that's the point, to build a more secure system, but not being able to edit a configuration file directly has the "whiff" of the Windows Registry to me. (Though I freely admit that 1) I'm pretty much ignorant of all things Grub and 2) I'm not big on change anyhow.)viking777 wrote:I will be fascinated to see if wayne128' s method works, I hope it does, but I don't think it will because the only way I have ever been able to get grub 2 to install onto a partition from a live cd is to bind /dev /root and /proc and then use a chroot environment. Mind you I haven't tried it for a long while so maybe grub2 has improved since the --force method last failed me, who knows.
However if it does fail and you decide you want to revert to Grub legacy I posted about that here:
http://forums.linuxmint.com/viewtopic.p ... evert+grub
That definitely works, I have successfully done it twice. Maybe a last resort though as grub 2 seems to be here to stay despite its many failings.
Re: Tri-Booting & Grub
Yes, I have been doing that many times on several types of boot loader, including Lilo, Grub legacy and Grub2.Just a quick question. If I had clicked on the advanced tab when installing, would Linux Mint 10 have allowed me to install Grub on its own partition?
So that the partition is chainloadable. The grub stanza is simple to remember and use
I kept those error in my notes. Here is what I had last time, you might see similar error flagged out, however it did not harm and it wrote to the partition boot record making partition chainloadable.Grub 2 threw out at least two errors and a warning (I should have copied them) but showed that Grub 2 installed anyhow.
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
Re: Tri-Booting & Grub
Good to know. I'll remember that next time.wayne128 wrote:Yes, I have been doing that many times on several types of boot loader, including Lilo, Grub legacy and Grub2.Just a quick question. If I had clicked on the advanced tab when installing, would Linux Mint 10 have allowed me to install Grub on its own partition?
So that the partition is chainloadable. The grub stanza is simple to remember and use
Just what I got, except I got an extra one at the beginning...I kept those error in my notes. Here is what I had last time, you might see similar error flagged out, however it did not harm and it wrote to the partition boot record making partition chainloadable.Grub 2 threw out at least two errors and a warning (I should have copied them) but showed that Grub 2 installed anyhow.
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
Code: Select all
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
Again, thanks.
Re: Tri-Booting & Grub
Turned out that it wasn't just when the kernel was updated -- it got to where it would work one time, then I would have to go back through process again. I just reinstalled Linux Mint 10 and will let it boot itself for its own Grub 2 for now. VectorLinux allows me to boot from the CD, so I'll do that while testing Mint. Kind of a frustrating thing -- I don't like it when a "fix" is inconsistent.rcentros wrote: As an extra twist, I updated my system and (apparently) there was a kernel update involved because, when I tried to reboot from CentOS' Grub, it hung at "chainloader +1" No error code, just sat there and didn't go to Grub 2. So I re-ran your instructions and I'm back in Linux Mint as before. I guess this may be something else I need to watch for.
Meant to add here that I still could find no way to customize the Grub when installing. I watched pretty close and the only "Advanced" button I saw was for partitioning (which I used), but nothing for the Boot Loader at all. I'm using the DVD version, so maybe the installer is slightly different on it?
Last edited by rcentros on Sun Jan 30, 2011 7:18 pm, edited 3 times in total.
Re: Tri-Booting & Grub
I am glad it worked for you (or reading your later post perhaps it didn't?), maybe I should try that technique again some time and see if it works for me.
I feel the same way about program menus. Gnome and KDE have graphical methods to adjust menu content built in, and that is fine. Fluxbox has very easily edited plain text config files and that is also fine. Xfce and Lxde use xml files and have no easily accessible graphical front end and that is not fine. At least that was the case the last time I used them, they may have changed since then, they certainly need to.
Very well said, I could not agree more. Certain parts of any distribution should be readily personalized by a user. A boot menu is one of these and a program/start menu is another. There are two ways that this should be accomplished. One is by graphical means (and no such tool exists for grub2 that I know of, if there is one it is not built into the distro and it should be) and the other is by editing the configuration file directly. To have to edit another file in a different part of your directory structure and then run a command line program is just not acceptable and never will be. The design of grub2 is wrong and needs to be changed, end of story.Maybe that's the point, to build a more secure system, but not being able to edit a configuration file directly has the "whiff" of the Windows Registry to me
I feel the same way about program menus. Gnome and KDE have graphical methods to adjust menu content built in, and that is fine. Fluxbox has very easily edited plain text config files and that is also fine. Xfce and Lxde use xml files and have no easily accessible graphical front end and that is not fine. At least that was the case the last time I used them, they may have changed since then, they certainly need to.