LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-21-2005, 06:39 PM   #1
Basslord1124
Member
 
Registered: Jun 2004
Location: KY
Distribution: Debian, Mint, Puppy
Posts: 507

Rep: Reputation: 51
Multiboot *nix platforms....


I have been kinda thinking about setting aside one of my spare computers to sort of use as a test box. And one of the things I would like to experiment with it, is multibooting various *nix systems. There is a slight chance I may throw in Windows as well...but for the most part, I want most of the OSes to be *nix related. Currently I have about 4-5 different Linux distributions laying around AND a copy of FreeBSD. I have had a little bit of experience dualbooting Windows and Linux, but haven't messed with different flavors of *nix. I wouldn't even know where to begin other than hoping most will utilize the same bootloader. But anyways, anybody have any insight to sort of get me started with this.
 
Old 11-21-2005, 07:25 PM   #2
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
RE: bootloaders
I don't think you need to worry about using the same bootloader throughout ...
you can use grub + 'favourite distro' to control the MBR and then chainload
other installs when required. This way, when installing a new distro, you just
choose to install the bootloader in the distro's partition rather than in the MBR.
eg: menu.lst might contain:
Code:
title           Debian GNU/Linux, kernel
root            (hd0,6)
kernel          /boot/vmlinuz root=/dev/hda7 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=0x317
initrd          /boot/initrd.img
boot

title           Debian GNU/Linux, kernel 2.6.11-kanotix64-11
root            (hd0,6)
kernel          /boot/vmlinuz-2.6.11-kanotix64-11 root=/dev/hda7 ro ramdisk_size=100000 lang=us apm=power-off nomce
vga=0x317
initrd          /boot/initrd.img-2.6.11-kanotix64-11
boot

### END DEBIAN AUTOMAGIC KERNELS LIST
title Windows 2K/XP/2003 (hda1)
chainloader (hd0,0)+1
title Windows 95/98/ME (hda2)
root (hd0,1)
makeactive
chainloader +1

title           Debian 32bit
root            (hd0,7)
chainloader +1
boot
In this example, both Windows and Debian 32bit are chainloaded.
Debian 32bit is interesting because it's actually on LVM:
Code:
# fdisk -l /dev/hda

Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1        2358    18940603+   7  HPFS/NTFS
/dev/hda2            2359        2588     1847475    c  W95 FAT32 (LBA)
/dev/hda3            2589       19457   135500242+   5  Extended
/dev/hda5   *        2589        2594       48163+  83  Linux
/dev/hda6            2595        2659      522081   82  Linux swap / Solaris
/dev/hda7            2660        3267     4883728+  83  Linux
/dev/hda8            3268        6914    29294496   8e  Linux LVM
/dev/hda9            6915       19457   100751616   8e  Linux LVM
Code:
# lvdisplay -C
  LV   VG   Attr   LSize  Origin Snap%  Move Log Copy%
  root vg0  -wi-ao  5.00G
  temp vg0  -wi-a-  2.93G
  tmp  vg0  -wi-ao 10.00G
  usr  vg0  -wi-ao  5.00G
  var  vg0  -wi-ao  5.00G
  home vg1  -wi-ao 96.08G
Have fun ... and be prepared to stuff things as you push [your] limits

Last edited by uberNUT69; 11-21-2005 at 07:27 PM.
 
Old 11-21-2005, 11:25 PM   #3
Basslord1124
Member
 
Registered: Jun 2004
Location: KY
Distribution: Debian, Mint, Puppy
Posts: 507

Original Poster
Rep: Reputation: 51
Wow, seems like a lot of info there. I was thinking that it was all basically one file (menu.lst) that sort of links all systems together. And I figured I'd be putting bootloaders on the partition within the distribution...not the MBR. Of course, I got a few other questions:

1) The one thing that I am unsure of is booting FreeBSD in with them too...I have very little experience with FreeBSD but I would like to give it a go. From what little experience I had with it, I could tell it handled things somewhat differently than Linux. So how would I incorporate that in a multi boot of say mostly Linux?

2) How many OSes could I physically put on one hard disk? I know I am limited in my number with primary partitions (4 I believe it is) but logical is as many as the drive can handle. So is it possible to install a Linux distro on a logical partition?

3) Is is true that I could share swap and /home between Linux distros?

and finally

4) Lets assume I have an extra hard drive as a Slave on the Primary IDE channel. I install some distros on it too. Can I configure the bootloader to load an OS from this disk (without changing settings in BIOS)?
 
Old 11-21-2005, 11:48 PM   #4
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
I was thinking that it was all basically one file (menu.lst) that sort of links all systems together.
You can do that if you feel like manually updating it all the time ... and hope to hell you don't
misconfigure one of your distros and let it automatically rewrite the whole thing
And I figured I'd be putting bootloaders on the partition within the distribution...not the MBR.
This is my preferred method
Of course, I got a few other questions:
goody

1) The one thing that I am unsure of is booting FreeBSD in with them too...I have very little experience with FreeBSD but I would like to give it a go. From what little experience I had with it, I could tell it handled things somewhat differently than Linux. So how would I incorporate that in a multi boot of say mostly Linux?

From memory (I used to play with NetBSD a bit) the BSD's create a number of logical partitions in a kind of extended partition ...
that doesn't sound quite right ... I'll ponder that one a while
You might be able to chainload a BSD ... try google ... I'm positive it can be done.


2) How many OSes could I physically put on one hard disk? I know I am limited in my number with primary partitions (4 I believe it is) but logical is as many as the drive can handle. So is it possible to install a Linux distro on a logical partition?

You used to be limited to about 15 partitions total (I think) but I'm not sure if that limitation still exists.
Using LVM means you will only be limited by
a) the amount of drive space you have
b) the ability for your distro to understand LVM (unless you use Xen ... long story)
YES, you can install a Linux distro in a logical partition (unless it's a brain-dead win-clone in early development).
Don't forget you should also have a partition for swap (unless you use a swapfile in / ... another long story)


3) Is is true that I could share swap and /home between Linux distros?

yes ... you just need to make sure (if you want a common user) that the user has the same UID
in each install. To start out with it's simpler to install with a different username for each distro,
then add a common user to each (and modify the UID) afterwards.


4) Lets assume I have an extra hard drive as a Slave on the Primary IDE channel. I install some distros on it too. Can I configure the bootloader to load an OS from this disk (without changing settings in BIOS)?

Yes, just chainload as before.

I also suggest you figure out how to make a GRUB bootloader floppy JIC (with all the chainload settings as well),
and backup your menu.lst frequently while you are testing with new installs.

Last edited by uberNUT69; 11-21-2005 at 11:52 PM.
 
Old 11-22-2005, 12:48 AM   #5
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
Windows (at least) prefers primary partitions.
Most proprietary operating systems (Solaris, Unixware, Plan9) and BSD require primary partitions.
Linux is happy on a logical partition, usually even if the distribution makes it difficult to install it that way.
Removeable drives rule and dual drives double your available primary spots.

/dev/hda:
First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
1 Primary 0 20000924 63 20000925 Linux (83) None
2 Primary 20000925 36001664 0 16000740 Linux (83) None
3 Primary 36001665 52002404 0 16000740 Linux (83) None
4 Primary 52002405 312576704 0 260574300 Extended (05) None
5 Logical 52002405 72003329 63 20000925 W95 FAT32 (LBA) (0C) None
6 Logical 72003330 72645929 63 642600 Linux swap / So (82) None
7 Logical 72645930 76646114 63 4000185 Linux (83) None
8 Logical 76646115 80646299 63 4000185 Linux (83) None
9 Logical 80646300 88646669 63 8000370 Linux (83) None
10 Logical 88646670 100647224 63 12000555 Linux (83) None
11 Logical 100647225 112647779 63 12000555 Linux (83) Boot
12 Logical 112647780 124648334 63 12000555 Linux (83) None
13 Logical 124648335 136648889 63 12000555 Linux (83) None
14 Logical 136648890 148649444 63 12000555 Linux (83) None
15 Logical 148649445 164650184 63 16000740 Linux (83) None
16 Logical 164650185 180650924 63 16000740 Linux (83) None
17 Logical 180650925 200651849 63 20000925 Linux (83) None
18 Logical 200651850 220652774 63 20000925 Linux (83) None
19 Logical 220652775 312512444 63 91859670 Linux (83) None
20 Logical 312512445 312576704 63 64260 W95 FAT32 (LBA) (0C) None

/dev/hdb:
First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
1 Primary 0 16000739 63 16000740 HPFS/NTFS (07) Boot
2 Primary 16000740 36001664 0 20000925 Solaris (BF) None
3 Primary 36001665 51632909 0 15631245 Linux (83) None
4 Primary 51632910 60018839 0 8385930 QNX4.x 3rd part (4F) None
 
Old 11-24-2005, 12:23 AM   #6
Basslord1124
Member
 
Registered: Jun 2004
Location: KY
Distribution: Debian, Mint, Puppy
Posts: 507

Original Poster
Rep: Reputation: 51
Another question....

1st off, I thought I'd be adventuresome and boot 2 Windows OSes instead of one...I guess, just to see if it could be done. And well, I am starting to doubt it. This is what I'm trying to accomplish:

Windows 98-1st primary partiton
Windows 2000-2nd primary partition
FreeBSD-3rd primary partition
Then fit a few Linux distributions on any remaining space (logical partitons no doubt).

Currently I have been obviously able to dual boot 98/2000 but everytime I throw FreeBSD in it never seems to work. 1st of all, I have been following the little guide here for reference:

http://www.freebsd.org/doc/en_US.ISO...#NT-BOOTLOADER

Although instead of copying the bootsect file to drive C, I copied it to a floppy drive instead. First time I copied it to drive C and I basically lost everything up to that point. I could not boot any OS. But this last time around, I put the file on a floppy so I could then put it on the C drive when I was booted into Windows. I copied the file over, editted the boot.ini file and restarted. I could boot into 98 fine and FreeBSD....but somewhere along those lines 2000 got corrupt and I couldn't boot it. So I am starting to wonder if it's not feasable to boot 2 Windows OSes and FreeBSD as I haven't had luck with it. And logically it seems like it could be done. So I dunno what gives. Any ideas?

Oh yeah, of course....Happy Thanksgiving everyone!
 
Old 11-24-2005, 04:13 AM   #7
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
What you are trying to do *CAN BE DONE*, however
I suggest you get 98/2000/Linux(or BSD) triple-booting first.
PLEASE don't use the ntloader method until you're familiar with (better)
booting methods, as kernel updates (etc) will cause distress ( to all
Using my suggestion you can always try the ntloader later by replacing the
grub/lilo mbr with the MSWin one: "fdisk /mbr" rings a bell, and THEN
configuring NTLOADER (it might look pretty to start with ... hmmm !!! )

Using the simplest method:
- install 98
- install 2000 in a new partition
= you will have an ntloader bootmenu to choose between 98 and 2000
- install (your favourite) Linux/*BSD distro using grub bootloader
= menu choices should be: Linux/BSD : 98 : 2000 ... and 2000 will give you 98/2000
+ get comfortable with changing the boot options
+ then experiment with ntbootloader without replacing the mbr
+ the replace the mbr (if you really think it's necessary by then!)

If you have figured out the floppy boot, then you might also be interested in
saving/restoring the mbr of your hard disk like this:

# dd if=/dev/hda of=my-hda-mbr.img bs=1 count=446

that command will copy the first 446 bytes from the beginning of the hard drive
(that's from memory but I think it's correct)
avoiding the partition table (the last 64 bytes) and it's identifier (2 bytes)

restoring it is as simple as:
# dd if=my-hda-mbr.img of=/dev/hda
(I'm reasonably sure you don't need count/blocksize statements here)

We don't celebrate US Thanksgiving in OZ, but thanks anyway
Hope you enjoy the occasion!
 
Old 11-25-2005, 06:11 PM   #8
Basslord1124
Member
 
Registered: Jun 2004
Location: KY
Distribution: Debian, Mint, Puppy
Posts: 507

Original Poster
Rep: Reputation: 51
Well....I got 98/2000 and FreeBSD to successfully boot so we're slowly getting there. I about freaked out with 2000 b/c after I installed FreeBSD, 2000 would no longer load...saying something that ntoskrnl.exe was missing or corrupt. I did some reading up on it...and I guess what happened, is FreeBSD sort of mixed the partitions around some or something during its installation. So, I had to edit the partitions on the boot.ini file to finally bring 2000 back up. Now, she's working good. Now it's time to try Linux....
 
Old 12-10-2005, 06:08 AM   #9
Conjurer
Member
 
Registered: Oct 2005
Distribution: Ubuntu, ElemntaryOS, Linux Mint, openSUSE, Xubuntu
Posts: 56

Rep: Reputation: 15
I want to try out a couple of new distros while keeping my "working" distro safe and sound.
A friend of mine briefly mentioned I could use Xen and create virtual machines for that purpose.
But what is the advantage -if any - of doing this, as opposed to the old-fashioned method of regular installs?
 
Old 12-10-2005, 06:50 AM   #10
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
From that point of view the advantage is that you wouldn't need to stop
running your current (virtual) machines, you could 'recycle' disk space
(the virtual machines can run from a loopback file), ... enough?

It's a waste of time (in most cases) to try running the installer in
a virtual machine as you'd probably need a separate kernel just for
the installer, and modified scripts (???).

It's easier to install to a new drive/partition and then copy the partition
to a file (or LVM partition if your dom0 has LVM capability).
A new kernel still needs to be built for it (not necessarily a big deal).

You would also need a new xen 'priviliged' kernel for you machine (dom0)

Not enough advantages? How about:
Using a Debian dom0 I have numerous Debian and gentoo virtual machines
running on my server. Each vm can be started, stopped, paused, saved or
restored at will. Virtual networks can be created/destroyed as necessary,
even the memory size of each vm can be changed WHILE IT'S RUNNING!!!
Also, I've got the vm's running from LVM partitions, so while they're
running I can take snapshots of the filesystem (instantaneous),
stop the vm's and resize it's filesystem ... you get the idea.

The disadvantage is that only dom0 can control the agp graphics card,
so some sort of X-network needs to be setup if graphics are required.

With Xen 2.0.x individual pci devices (USB hubs, network cards, etc)
can be hidden from dom0 and passed to an individual 'priviliged'
domain, however, this ability is not yet in 3.0 (just released).

It can get complicated pretty quickly so I suggest you read
everything you can get your hands on a few times.
Joining the Xen mailing list wouldn't hurt.

Hope that's enough blurb,

Have fun.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Platforms insideout Linux - Hardware 1 10-24-2005 04:38 PM
C character sizes on different platforms.. f0rmula Programming 4 03-21-2005 03:18 PM
Platforms? nr5 Linux - Software 3 12-28-2004 05:43 PM
Different platforms? linuxpyro Linux - Hardware 1 04-09-2004 02:57 PM
Mozilla bookmarks across platforms Pwcca Linux - Software 1 09-17-2003 03:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration