Click to See Complete Forum and Search --> : Triple boot and partiton clarification?


quicktoy
12-25-2007, 01:58 AM
Hi newbie here
I have been going cross eyed with all the reading I have been doing over the last week, trying to get an handle on Linux.
So far so good. I'm looking forward to the change. After lots of study, and taking my skill and knowledge level into consideration, I have narrowed down my distro choices to two. SimplyMepis 7.0, and PCinuxOS.

When I was searching for browsers, I installed Opera and Firefox at the same time, to compare against each other for likes and dislikes. I really wanted to do the same with Linux, and realized I could dual boot (holding on to my old windows.) I then stumbled onto triple booting. Now my brain hurts! :-)
Read a bunch on partitioning, and have a “very basic” understanding but am still confused on some things.
Can someone clarify how “multiple booting” actually works? I am under the impression that when I turn on my computer, and as it boots, it will ask me what OS I want to select ie. (Triple boot setup) Win98, SimplyMepis, or PCLinuxOS, is this correct, or is a floppy needed?

I also am confused about how to actually setup partitioning for the 3 OS. (Win98se is already on my HD) Can I use a live CD (Simply Mephis that has QTParted on it) and set up all my partitions from there? I have watched an video tutorial http://www.tomlinux.ca/introduction_to_linux.html
so I understand the basic dual boot setup, but am unsure about making the third partition, and what sizes the 3 separate OS partions should be.

I did read about multi boot setups, but got a bit overwhelmed with the “Grub” and “chainloader=1” stuff. From what I understand, there are different ways to setup up multi boot systems. I'm just looking for a simple “newbie” way (simple basic walk through) to get my rig setup as a triple boot system.
I'm sorry if these are previously asked questions, but my brain has reached the point of saturation overload, and I am just confusing myself more, the more I search.

My setup:
Win98SE
39.24 GB HD
24.59 Free space
14.GB used space
1 GB Ram

Thanks, and I do appreciate the patience.

Paul

saikee
12-25-2007, 08:44 AM
quicktoy,

Welcome to Justlinux.

You are giving too much respect to the booting process because you can learn very little from the MS systems. Booting in dead simple in Linux and can be apply to any MS system too.

Basically each operating system needs a home and that is a hard disk partition.

Inside every Fat16, Fat32, NTFS and Ext2/3 Reiserfs the first sector is always reserved as the boot sector for a boot loader to reside in. There are a couple of odd partition types that have no reserved boot sector.

When you install a Linux the installer can allow you to install the boot loader either in

(1) the MBR (which is the first sector of a hard disk belong to the first partition)
(2) the root partition (which is the boot sector of the partition you install the Linux)
(3) a floppy

Every M$ system, when installed alone, always puts the boot loader in its root partition. If this partition is the 2nd partition of the first disk Grub calls it (hd0,1) as it counts from zero. That MS system can be fired up by Grub with commands
title Windows in 2nd partition of 1st disk or (hd0,1)
root (hd0,1)
chainloader +1

A Linux can fire up any Linux in exactlt the same way if the user tells the installer to keep the boot loader in the root partition. Say the Linux is Mepisis is in the 3rd partition of the 1st disk the Grub commands to fire it up are
Grub with commands
title Mepis in 3nd partition of 1st disk or (hd0,2)
root (hd0,2)
chainloader +1

That is all that you need for booting from 2 to 200 operating systems.

The above is to use Grub to boot another system "indirectly" because Grub just goes into the specified partition indicated by the "root" statement, loads the boot sector from the +1 position, that is from the 2nd sector upward, passes over the control to that boot loader and disappears from the scene.

I have not met an installed PC operating system that cannot be booted up by Grub "indirectly".

To multi-boot operating system you need a Grub. You can obtain it from the first Linux that come with it. Inside this Linux the file that controls Grub is stored in /boot/grub/menu.lst. The above instructions are lines you can add to menu.lst to multi-boot as many systems as you like. Red Hat family distros advocate using /boot/grub/grub.conf but it is system-linked to menu.lst.

It is possible that many installers will try to be clever to set up multi-booting instructions for you. They can't always get it right and you are far better to edit the menu.lst yourself.

The standard approach in Linux is to boot another Linux "directly". In this approach instead of asking Grub to boot say Mepis boot loader Grub executes directly the commands inside Mepis /boot/grub/menu.lst.

The lines in my Mepis /boot/grub/menu.lst are
title MEPIS at sda8, newest kernel
root (hd0,7)
kernel /boot/vmlinuz root=/dev/sda8 nomce quiet vga=normal

When Grub boots a system directly it physically has to enter the partition, loaded the kernel according to the way specified by the "kernel" statement. Sometimes the "initrd" is also used to load the ram disk file.

Traditionally when Grub cannot read a filing system, like a NTFS partition, or the system has no kernel, it boots the system "indirectly". Technically that is nothing to stop Grub to boot every system "indirectly" except the system hosting Grub, otherwise Grub will behave like a dog chasing its own tail in a never ending loop.

Thus you can have any number of Linux and have a complete freedom to select any of their boot loaders to control the MBR. You can do exactly the same thing with Linux's other boot loader Lilo.

If you get yourself into hot water just take a look at the last link of my signature or report the problem here.

There are many ways to install a Linux and too are many alternatives to multi-boot. One of the simple ways is to have one swap partition, put every Linux or other operating system each in its own partition and use one Grub to boot each system by refering to the partition reference.

quicktoy
12-25-2007, 02:40 PM
Thanks for the help, I do appreciate it, but I am still confused.
I just read the “boot tips,” it is a lot to absorb.
I think I will go with the virgin win setup, using a floppy to boot the linux distros.

Part 1
So I need to make a grub floppy...
"To make obtain a Grub floppy -- Following Chapter 3.1 of the Grub Manual"
3.1 Creating a GRUB boot floppy
"To create a GRUB boot floppy, you need to take the files stage1 and stage2 from the image directory, and write them to the first and the second block of the floppy disk, respectively.
If you do not have an installed Linux to obtain the required stage1 and stage2 files for making Grub floppy or Grub CD you can "source" these files from any Linux Live CD that has Grub inside."

Do I just copy and past these files to a floppy in windows? If I look at the Mepis CD under my windows explorer directory I see:
boot/grub/
iso9660_stage1_5
stage2
stage2_eltorito

Paul

Is this something I can use? http://supergrub.forjamari.linex.org/

saikee
12-25-2007, 03:54 PM
Grub is a boot loader which can be obtained from various sources. You can look at it as a self sufficient mini operating system like Dos.

Even putting Grub onto a floppy can have different ways. The one described in Grub Manual is to put Grub on its own into a floppy. As Grub has to put into the boot sector of a disk (a floppy still a disk) it requires a special command called dd. dd copies the binary pattern of a file in sectors. It is available inside a Linux. Normal file-copying commands will not work because they do not touch the boot sector. The procedure in the Grub manual amounts to copying just two files; stage1 and stage2 onto the floppy. You have to follow its instruction.

The stage1 and stage2 files are available in any Linux Live CD that supports Grub.

You should boot up a Linux, say a Mepis, click terminal and ask Linux to tell you which directory stores Grub's stage1 by command
find / -name stage1
When Linux responds with the partition you then change directory to it and have access of the files.

The floppy created in accordance with Grub Manual gives you just a Grub prompt. It basically boots up Grub which can interpret each commands you type at the terminal. It is for you to boot each system manually. You can use it to boot an installed MS Windows or any operating system.

Nowadays with ample supply of Live CD you can obtain a Grub prompt just using a Live CD. I have written this thread showing what Live CD can give a Grub prompt. Thus you can save yourself the trouble of make a bootable Grub floppy by

(1) Boot up a Mepis Live CD
(2) Press "Esc" key to trigger the question of Do you want text mode.
(3) Click "OK" to switch to text mode
(4) Press "c" key to get into a Grub prompt.

Generally you can solve nearly all booting problem with just a Linux Live CD or a Grub prompt.

The SuperGrub is a Grub pre-packaged with various auxiliary programs and files. I never have a need for it as I can all my problem solved just by a Grub prompt.

What I suggest to you is to try to boot your MS Windows with the Mepis Live CD. Test Grub at the same time. The steps are as follow

(1) Using a Mepis Live CD to get a Grub prompt as described above. You get nothing but a prmpt.

(2) Ask Grub to show the geometry (partition details) of your hard disk by command
geometry (hd0)
(3) You can identify the partition where Win98SE is held. Since Win9x must be booted from a primary partition so its partition number must be either 0,1, 2 or 3. Since Win98 could be still using fat32 then it must have partition type b or c. Say if partition 0 has type number b or c then you can use these commands in a Grub prompt to boot it up (assuming you have not changed its booting flag)
root (hd0,0)
chainloader +1
boot(hd0,0) means the first partition of the first disk. Grub calls 1st disk as (hd0) and second digit if present denotes the partition number.

Once you know how to use a Linux Live CD to manually boot up a Windows you will have no fear of whatever booting problems in front of you because there is no installed PC system a Grub prompt cannot boot.

quicktoy
12-25-2007, 11:50 PM
Starting to become a little clearer.
Trying to figure out if I have enough room in my HD to run the two other distros.
I have a 38.34GB HD
14.21GB is used
24.13GB is free
From what I have read, I should add 2 GB to the win partition (for expansion room) and that leaves 22.13GB free
Is 10GB per distro with a 2 GB shared swap, enough?

Paul

saikee
12-26-2007, 09:12 AM
I use 1Gb common swap and 10Gb per distro myself.

quicktoy
12-28-2007, 10:09 PM
Ok, I took a break to try and clear my head, but I'm still unsure of things.
Please be patient with me :o
I cleaned up some old Win files, and defragged to give me more space, and ended up with 10.35GB used and 27.99GB free
I'm not sure how to create a shared swap partition, for Mepis and PCLinox?
Again I'm looking to triple boot with my existing win98.
I would really really appreciate some step by step directions.

I understand that I can access GParted off the live Mepis CD, and have got as far as playing around with resizing, and trying to create partitions, but got lost after that. Help!

Paul
Such a newbie

saikee
12-29-2007, 06:47 AM
You need "unallocated" free hard disk space to create a partition. The free space inside a partition "belongs" to the partition and is not available to the outside world. Therefore you need to resize it.

To resize a partition you use Gparted to alter its boundary, usually at the rear, by imposing an empty space of the size you specified. Gparted will then copy the files around, shrink the existing partition and the process can take some time.

After resizing you need to reboot and verify the Win98 working first before proceeding to the next step. At this stage you should have some free "unallocated" hard disk space.

I recommend running "cfdisk" terminal program in Mepis to create the partitions as everyone created is type 83 suitable for Linux installation. To make it a swap you click "Type" inside the cfdisk program and specify the type number "82". Cfdisk will list the 100+ partition types. To use cfdisk in Mepis you type
sudo su
cfdisk /dev/sdaif device sda is your hard disk name (could be hda depending on the age of the kernel).

My guess is your win98 should be type "b" or type "c" occupying sda1 and so you should create sda2 (10Gb), sda3 (10Gb) and sda4 (1Gb) and change the type of the last one to a swap which should have a Type No. 82.

The partitions created in cfdisk are not formatted. It is best to let the installers to format them. Every Linux installer knows the presence of a swap and will use it without your interference.

When you install the first Linux just tell the installer you want it install in device sda2 (/dev/sda2), have it formatted to Ext3 filing system, use it to mount the root of the Linux system which is "/". The installer will install everything inside the specified partition and should arrange the booting of Win9x too.

I suggest you have the first Linux operational before installing the second one.

quicktoy
12-29-2007, 11:47 AM
Thanks you! Your help is greatly appreciated. :)

Paul