Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a cd of Gparted and it seems easy to set up a bare hard disk. I want to install three or four distros, having first set up the partitions.
Okay, so I install the 'master' distro in partition #1. Do I then use the chainload command for the next distro in the next partition? Or do I install the four distros first and then set up chainloader?
I also don't quite understand if the chainloader commands (three of them) were to be all on one line or each on its own line.
I really would like to get to grip with this so would appreciate some advice here, please.
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369
Rep:
Quote:
Originally Posted by betula
I have a cd of Gparted and it seems easy to set up a bare hard disk. I want to install three or four distros, having first set up the partitions.
Okay, so I install the 'master' distro in partition #1. Do I then use the chainload command for the next distro in the next partition? Or do I install the four distros first and then set up chainloader?
I also don't quite understand if the chainloader commands (three of them) were to be all on one line or each on its own line.
I really would like to get to grip with this so would appreciate some advice here, please.
There different ways to do it.
Let say you wish to install 4 distro .
You have made four partitions
The most easy to start with the distro on partition 4 writing GRUB in the boot sector of partition
Same goes for partition 3 and 2
The distro in partition 1 write grub in MBR
Mostly each distro know there arte other distros and put it in there menu.lst
If you already has a distro in partition and after wards you install a
distro in partition 4
Add in the menu.lst of the distro in partition 1
title OS X
root (hd0.3) meaning sda partition 4
configfile /boot/grub/menu.lst
This one way of chain loading
But remeber the second the third and fourth distro has in their menu.lst
all the distro that were already there.
So you some tweaking to do in the menu.lst
I start with the partitioning of the hd. I make a 200 meg partition for grub (can be primary or logical). I then install grub to that partition and build a menu.lst to boot all other partitions. You can boot a linux distro and chainload from it but if you get an upgrade or change that distro you will have to build another menu.lst. If you install grub in its own partition you can change all the distros without any boot problems as long as you install their boot loader to /. The only problem I have with this is I get lazy about changing the name when I change distros and my menu.lst might say you are booting fedora and you will actually be booting ubuntu or what ever I change the distro to, but the idea is the partition will boot no matter which distro you have there. Here is a tutorial for the method I use.
Well, I asked for it, didn't I? A couple of very interesting replies which will take a quite a bit of study on my part. Thanks for them.
A few little questions before I settle down it:
Is a 'menu lst' something I have to create or just open as root for each distro?
Googling tells me that I shall have to have a 'grub floppy' to be able to place grub in its own little partition. Is this right?
Once I've placed grub, how would I create a boot menu to boot all the partitions and where would this be placed?
That guy who has 145 distros on his computer must be something!
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369
Rep:
A menu.lst is created during install of the GRUB
If you do not install GRUB there is no menu.lst , in this case you have to create it you're self
Normally you find it /boot/grub/menu.lst
this is another way, If your are going to keep one main distributon and play with several others install it first on the first partition and install grub to the mbr. edit you /boot/grub/menu.lst and add the following:
title <whatever you want to identify the next partiton>
rootnoverify (hd?,?)
chainloader +1
for each partition you have. the ? has to be replaced with the apropiate number.
for any other distributions, install grub or lilo to the root partion of the distro you are installing. as long as you keep your main distro and don't let other distro's load their bootloader to the mbr you should always at least be able to get into you main distro.
If you install grub from a live cd to its own partition you have to create your own menu.lst. It is not that hard, open a text editor as root and create the menu and then save it to the partition that you installed grub. You have to make your 'boot/grub' directory.
Last edited by Larry Webb; 08-02-2009 at 12:43 PM.
I partitioned my disk using my cd of Gparted. I installed Mint in partition #1 with Grub. That distro booted okay. I then installed PcLinuxOS in #2 and installed grub in that partitions root.
I then opened a terminal in Mint and added, to Menu.lst,
pclinuxos
rootnoverify (hd0,1)
chainloader +1
Now when I boot up, I first get the Mint opening screen, followed by a screen giving me the options of PCLinuxOS first, followed by Mint. The trouble is that I can't get to Mint. No matter which I choose, I just get PCLinuxOS.
The Gparted cd shows that Mint is still flagged as 'boot'. I imagine that I'll have to change something in Mint's partition so how do I get to that from PCLinuxOS?
Usually it is best not to use chainloader for Linux systems.
To use chainloader you would need to install into the sector boot partition something connected to grub or lilo for that copy of Linux.
Usually it is easiest to use a kernel and probably initrd command to load each Linux.
I never learned enough about kernel parameters nor about the use of initrd to set those up myself. So every time I install a Linux distribution, I tell it to install grub with that distribution, even if I tell it not to install the MBR portion of grub, or I later have some other Linux install overwrite that grub mbr.
So there is a /boot/grub directory for every Linux install, but only the one currently connected to the MBR actually gets used.
Then I find the block of grub commands for each Linux version in its own /boot/grub/menu.lst and I copy each of those blocks into the one /boot/grub/menu.lst that actually gets used.
I guess I didn't read carefully enough earlier. I still think it is easier to not use chainloader at all. But it sounds like you already got the chainloader right and got something else wrong.
Quote:
Originally Posted by betula
added, to Menu.lst,
pclinuxos
rootnoverify (hd0,1)
chainloader +1
I think the first line of that needs to be
title pclinuxos
not
just
pclinuxos
You also might have put it in the wrong plasce in your menu.lst.
If you post the entire menu.lst we can do a better job of advising you what to fix.
Quote:
a screen giving me the options of PCLinuxOS first, followed by Mint. The trouble is that I can't get to Mint. No matter which I choose, I just get PCLinuxOS.
Meaning those grub commands for pclinuxos work but are executed even if you choose Mint.
Quote:
The Gparted cd shows that Mint is still flagged as 'boot'.
Doesn't matter.
Quote:
I imagine that I'll have to change something in Mint's partition
Yes. IIUC, your active menu.lst file is still in Mint's partition, which is sda1.
Quote:
so how do I get to that from PCLinuxOS?
There are many ways to mount sda1 writable from with pclinuxos (which I assume has sda2 mounted as /)
Since I don't know pclinuxos and I always use konqueror for such things in Mepis (rather than command line), I can't tell you how. But maybe you just needed to know that you need to mount sda1 and you already know how to mount a partition.
I'm really struggling here in all respects so I'm going to start again. It's a bare computer so there's nothing to lose.
I really do like your first post as it makes good sense to me. It would be a great help if you could expand the last paragraph as I don't understand it. Perhaps an example, if you'd be so kind.
'Then I find the block of grub commands for each Linux version in its own /boot/grub/menu.lst and I copy each of those blocks into the one /boot/grub/menu.lst that actually gets used.'
What do the block of grub commands look like?
Whatever, as my brain is reeling with tiredness and it's 10.30pm where I am, I shall take this up again tomorrow morning. Hope you don't mind!
betula I may have missed something in your prior post but it sounds like on your pclinux install you did not install grub to the pclinux root partition. All you have to do is bring up the grub prompt in prompt from either live cd and use the commands
root (hd0,0)
setup (hd0)
quit
This will direct your boot loader to look at your first partition for the menu.lst
Here is another article that you may find easier to understand
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.