Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Linux and Unix
Tag Cloud
access audio blue screen boot bsod connection crash dell desktop driver drivers dvd email error excel firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem processor ram recovery router screen slow sound spyware tdlwsp.dll trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Solved: question about swap and boot loaders on multi boot setup

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
rebif's Avatar
Member with 61 posts.
 
Join Date: Mar 2005
Experience: Beginner
10-Sep-2006, 04:09 PM #1
Solved: question about swap and boot loaders on multi boot setup
Hi everyone,

I've been dual booting Windows and several different distros, one at a time. Now I want to install three or four distros along with Windows at the same time. I know how to use Gparted and some other tools to make all the needed partitions. I was wondering if each distro needs it's own swap partition or can all the distros use one main swap partition? Or do I even have a choice in the way some distros install? One more question. I always install Lilo or Grub in the MBR. After I install the first distro with its own boot loader should I just let each successive distro install it's own boot loader or should I do it differently?

Confused. I'm ready to start installing but I had to stop and think about this.

Thanks for any help.
rebif's Avatar
Member with 61 posts.
 
Join Date: Mar 2005
Experience: Beginner
11-Sep-2006, 12:45 AM #2
OK, I've been reading some stuff about chainloading and editing Grub. I read where Grub can even be put in its own little partition. This sounds like a good idea so even if I have to use the fixmbr command for Windows or re-install Windows grub will still be there. I guess I would have to make that partition the active one or whatever it's called. Anybody have any thoughts on this? I've already answered my question about swap. I just thought that multibooting would be an easier way to compare a few distros instead of one at a time to help me finally nail down the distro I would like to use as my regular OS. Actually my final setup my have two Linux distros and Windows.
Another question. If I do put Grub in it's own partition, I assume I should put it before the Windows partition. Am I right? And should I put the swap partition right after Windows and before the other Linux partitions or make it the last one.

I'll probably look up more on this in a couple days but if anyone has any pointers or personal experiences and tell me how not to do it I would really welcome it.

Thanks
saikee's Avatar
Distinguished Member with 2,835 posts.
 
Join Date: Jun 2004
Location: Newcastle
Experience: A Linux user gone nuts on multi-boot
11-Sep-2006, 05:42 AM #3
OK this is an easy one I think.

You can have over 100 distros but need only one swap. If you make more than one swap it can actually slow down the performance as some distros will try to manage them as a set or try to use them all.

You don't need to tell from the second Linux onward about the swap. These buggers will find it themselves.

The easiest to multi boot say 100 distros is by chainloading. Basically you install the 1st Linux boot loader in the MBR and the 2nd to 100th in their respective root partitions. Thereafter you can boot all of them the same way you boot a Window.

Typically if you have a distro in hdb4 it will be known to Grub as (hd1,3) as Grub counts from 0 and hda is traditionally the first disk and hdb the second assuming you have nominated hda as the first disk to be booted then in the /boot/grub/menu.lst of the 1st Linux you need these lines to boot it
Code:
titile My distro in hdb4
root (hd1,3)
chainloader +1
If you put Lilo in the 1st LInux then the equivalent lines needed in the /etc/lilo.conf are
Code:
other=/dev/hdb4
label=Linux_in_hdb4
In the above you will boot up the 1st Linux first and have 100 OS to choose from. By select any one you then boot to the boot menu of that distro. You can also edit the boot menu of the second distro to boot the another lot including returning back to the 1st Linux.

I recommend chainloading because

(1) It is the easiest.
(2) Every boot loader as created by the installer is intact and preserved
(3) The scheme is flexible as you can nominate any distro into the MBR to control the rest
(4) You don't have to know the files names of the kernel and initrd of every Linux
(5) You can use the same technique to boot Dos, Windows, BSD, Solaris and Darwin
(6) You can see the boot menu designed by each distro but can still opt them out by the timeout statement.
(7) You can create a menu to boot all the distros (or other operating systems) even before you install them.
(8) You can run a relay system to boot infinite number of operating systems.
(9) You can mix all the boot loaders together, jumping from Grub to Lilo, then NTLDR, back to another Grub etc.

Chainloading is the "indirect method". The "direct method" is to name the kernel and initrd of every distro. It is more involved as you need the precise locations and filenames of each distro but gain almost nothing.

Just remeber

(a) The distro nominated to go into the MBR must be booted "directly" otherwise it is like a dog chasing its own tail or going round a endless loop.
(b) All MS systems when installed will have their boot loaders automatically installed in their root partitions and readily to be chainloaded.
(c) Solaris, BSD and Darwin will install their boot loaders in the root partitions if you deny them access to the MBR.

Other points

(i) You don't need to make the bootable Linux partition "active" or bootable. The bootable flag is only used by MS and some Unix systems. Both Grub and Lilo requires the bootable partition to be declared up front by the "root" and "other" statements respectively.
(ii) Linux and swap can be anywhere in the hard disk and that means they can all be in logical partitions and has no influence on Windows which must be installed in a "primary" partition. Users have to do hacking in order to install a MS system in a logical partition.
(iii) You don't need to put Grub in its own partition for any Linux. Although Grub can work without an operating system and can take over a partition. In such a case you use Grub to boot other operating systems "manually". If you activate Grub living alone in a partition you get a Grub prompt. Grub is a mini operating system in its own right.
(iv) Unless you are after speed and performance it is best to install every Linux in a single partition for management and maintenance. No Linux is known to refuse to go into a single partition.

Last edited by saikee : 11-Sep-2006 05:53 AM.
prunejuice's Avatar
Senior Member with 1,785 posts.
 
Join Date: Apr 2002
11-Sep-2006, 05:46 AM #4
I install GRUB in the MBR. If you're confident in editing GRUB, there's no need to re-install it with every addition of a new distro. Just skip the stage where it asks to add a bootloader, and manually enter the kernel location of each distro.

Swap is swap. You can have a single swap partition for all your distros. I don't believe
it's location is of any significance.
prunejuice's Avatar
Senior Member with 1,785 posts.
 
Join Date: Apr 2002
11-Sep-2006, 05:48 AM #5
Hey, nice work saikee!
rebif's Avatar
Member with 61 posts.
 
Join Date: Mar 2005
Experience: Beginner
11-Sep-2006, 11:22 AM #6
Thanks for the replies saikee and prunejuice. I've read quite a bit of your posts saikee on booting 100+ OS's. Well, I don't think I'll put that many distros on here But it really helped me understand some things. I followed one of your links to JustLinux.
I feel like I'm ready to tackle installing up to 4 distros. The only reason I thought about putting Grub in it's own partition was if I had to reinstall windows then I wouldn't have to reinstall Grub. I guess it's no big deal anyway. And I see where Windows wouldn't like that anyway because it always wants to be primary. I'm going to look in to making a Grub CD for a backup, I don't have a floppy drive.
Always something new to learn.
Thanks.
rebif's Avatar
Member with 61 posts.
 
Join Date: Mar 2005
Experience: Beginner
11-Sep-2006, 11:36 AM #7
OK, one last reply. I guess I can mark this solved. Just thinking, maybe I should've at least mentioned before that I was reading your stuff saikee about chainloading and editing Grub in my reply last night, then you probably didn't have to repeat so much in my thread. Sorry. If I have any problems durring the install proccess I'll start a new thread.
OK, thanks again.
saikee's Avatar
Distinguished Member with 2,835 posts.
 
Join Date: Jun 2004
Location: Newcastle
Experience: A Linux user gone nuts on multi-boot
11-Sep-2006, 12:00 PM #8
I think booting typifies what Linux is all about.

It is the work by the people so it will be simple and easy to use.

It is to get from A to B the quickest way so it will be powerfull and efficient.

As open source there is no commercial secret to hold it back so we can all learn about its inside working, improve it and make it even better.

When it come to booting Linux is simply light years ahead of the others.
rebif's Avatar
Member with 61 posts.
 
Join Date: Mar 2005
Experience: Beginner
11-Sep-2006, 01:39 PM #9
I agree, it is much better with open source. I'm trying to convert to Linux and use Windows only if I need to. I've been trying different distros for at least a year now. I've narrowed it down to about four distros I like. I asked these questions about multibooting so now I can use all 4 at the same time. I'm looking at Ubuntu, Xandros, Vector, DSL, FC4 and Feather, I'm working with Puppy Linux right now so I may multiboot all of these not just 4. I want to pick one and use it for my main distro and then really learn it. The main thing I must be able to set up first in any distro is wireless with encryption using ndiswrapper or anything else using my existing wireless card on my desktop. OH, I have to be able to use my camera and Cannon printer. So far it's worked OK. The only other thing is I hope to get my Dell AIO printer's scanner working too but that may not be easy being it's a Dell. That'll probably be a new post someday. In the end I may wipe the HD and just have Windows and my main Distro and have one other partition for trying out new distros once in a while. I'm trying to get my nieghbor in to Linux too.

I came accross an article I thought was real good here,
http://www.freewarefiles.com/news/sh...p?articleID=34
I hope that link works.

OK, thanks again, I don't want to bump this thread up the list anymore. Take care and I'll probably be back with a new thread sometime
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 02:54 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.