LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing GRUB with many operating systems. (https://www.linuxquestions.org/questions/linux-newbie-8/installing-grub-with-many-operating-systems-667808/)

JoseCuervo 09-05-2008 12:36 PM

Installing GRUB with many operating systems.
 
I have a 320 gig drive that I have divided into a dozen or so partitions. Three primary, each about 30 gigs, five logical at 30 gigs each, and then a few more for pictures, documents, etc. The first three primary have Windows XP, OpenBSD, FreeBSD respectively, while the first five logical have a mix of more Windows XP, Vista, and a few Linux Distros (Ubuntu, Debian soon, and Gentoo).

I have no problem partitioning a drive with Gparted, or with each distros built in partitioner; that isn't my problem. The problem is that each new distro or BSD install adds it's own loader, and they don't like each other. BSD can only see the operating systems on the primary partitions, and each Linux distro can only see the Windows XP on the primary and the linux distros in the extended partition.

I want a bootloader that I can flag to see Windows XP, Open BSD, FreeBSD, Windows XP, Ubuntu, Debian, Gentoo, and Windows Vista AND pick one accordingly. I have no experience with GRUB, but it seems to have everything I need. My problem is installing it. I'm comfortable burning it to a cd as an .iso in Windows XP, but that's about all. I haven't used Debian in a while, so I'm not comfortable using it.

If I sound like I know what I'm talking about, it's only because I've tried reading everything I could before asking for help. Don't think I actually understand what I'm doing :) So, I need GRUB to install onto my mbr, I need to know how to get it to recognize each partition, or I need you to tell me what I need. Thanks!

paulsm4 09-05-2008 12:56 PM

Hi -

For whatever it's worth, I'd encourage you to consider this:

a) Multi-boot no more than two or three of your favorite OS's
(e.g. one partition for Windows/XP, and another for SusE or Ubuntu)

b) Use VMs (e.g. Xen, VMWare or both) for the other OS's you're experimenting with.

I think you'll be much happier with a lot of VM's than you'd be with a lot of boot partitions.

Here's (one of many) good articles to get you started:

http://www.linux.com/feature/133018

IMHO .. PSM

JoseCuervo 09-05-2008 01:46 PM

Thanks, I've been thinking about setting some virtual up for a while. You gave me a headstart on hours of work before I would have ended up asking anyway.

I would like to know how to set up GRUB though. Even with only a few operating systems, how can I install and configure GRUB to see a mix of primary and logical partition systems?

paulsm4 09-05-2008 02:16 PM

Hi -

Grub is actually pretty easy to set up. So easy, in fact, you typically don't even have to worry about it. Here's a common scenario:

1. You take a PC with Windows on the primary partition and lots of disk space

2. You run "setup" with a distro like SusE, SimplyMepis, Ubuntu. etc etc

3. "Setup" detects Windows
"Setup" figures out how to allocate free space from Windows (asking you politely if it sounds OK with you, before actually doing anything)
"Setup" installs Grub and configures your PC for dual-boot
Everything "just works" and you're happy.

This is absolutely the scenario I'd encourage you to try, first.

Nevertheless, there are lots of resources for using (and, if need be, troubleshooting) Grub. The biggest issue you're likely to run into is incompatibilities between the old Windows MBR (win9x .. Win/XP and Win/2003) and the new Vista boot loader. But again - most distros should handle this for you seamlessly.

Here are a couple of links:
http://www.linuxquestions.org/linux/...p_Grub_by_hand

http://www.dedoimedo.com/computers/grub.html

http://www.troubleshooters.com/linux/grub/grub.htm

'Hope that helps ... and please - have fun!

Sincerely .. PSM

brianL 09-05-2008 02:23 PM

You could try the GAG bootloader:

http://gag.sourceforge.net/

Larry Webb 09-05-2008 02:43 PM

If you want to set up something try following this mans suggestions. He does not tell you how large to make the partition for grub but I usually make it 2 meg.

http://www.justlinux.com/forum/showthread.php?t=147959

dv502 09-05-2008 02:48 PM

To add additional OS's to grub, edit /boot/grub/menu.lst and add these lines for each OS. I've use this method to boot multiple linuxes and BSDs and it works.

title linux distro name
root (hdx,x)
chainloader +1

The first x is the first primary controller. It will have an id of 0. If linux is on the secondary controller, it's id will be 1.

The second x will be the root partition. Partitions are numbered starting at 0. So, if the linux root partition is on the primary controller on partiton 2 of the hard drive, the grub entry would be listed as

title linux distro name
root (hd0,1)
chainloader +1

Tip:

Here's how to see the root partitions via grub shell. If you manually edited the grub menu and enter the wrong hdx,x address, you can use this tip to find the proper hdx,x root partitions.

First login to a working linux distro and as root, type grub. You will get a grub prompt. Now type

find /sbin/init

Code:

grub> find /sbin/init
 (hd0,0)
 (hd0,2)

This is my system. I have arch on hd0,0 and slackware on hd0,2

next type quit to exit.

Next re-edit the grub menu with the proper hdx,x address.

BTW, If you are going to have multiple linux OSs, have one linux as your main distro using grub, then as you install additional linux distros, do not install the boot loaders from them.

Use the /boot/grub/menu.lst from your main distro to boot the other distross. All you need are the three lines mentioned above
and you're set. I currently use this method and it works.


- Cheers

JoseCuervo 09-07-2008 10:19 AM

Paul, I think you're right. I've decided to go with just a few main OSs, and focus on learning them. Debian, FreeBSD, and Windows in case someone else needs to use my computer/I break everything else :) Having half a dozen was more of a random idea.

Thanks for the links, GAG, which works great, and GRUB advice.


All times are GMT -5. The time now is 02:03 AM.