LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-20-2012, 04:59 PM   #1
Ravenslair
LQ Newbie
 
Registered: Feb 2012
Location: California, USA
Distribution: Fedora 16
Posts: 18

Rep: Reputation: 0
Multi boot system


Good afternoon. As I stated in my hello world post, I have experience in the IT world, but am new to Linux. I want to get as familiar as I can with some of the more popular/well known distro's. That being said, I am trying to create a multi boot system with zero knowledge of how to do it with Linux. Here is where I am so far:

I have an Athlon64 system running 1GB of ram with a 500GB SATA drive. I installed Windows XP onto 125GB of the drive. I ran the Fedora 16 KDE installer and filled up the rest of the drive. After doing this, I decided I wanted to try out several other distro's. Instead of restarting from scratch, I deleted the Fedora partition while in Windows and left the 500MB boot partition Fedora had created (I did this thinking this is what would allow me to continue to boot into XP). While still in Windows, I created two ~125GB partitions leaving ~125GB free (thinking I would use Fedora's option of using the remaining free space. I reran Fedora and installed it onto ~125GB. Long story short, I had to remove the partitions I had created and told Fedora to only use 125GB.

This left me with 250GB. I installed OpenSUSE next. It appeared to go off without a hitch. It asked where to install the boot loader. I left the default of sda. I assumed OpenSUSE would update the Fedora loader. It did not do so. So, now I have a machine with an OpenSUSE boot loader that only shows Windows XP and Open SUSE. Both of these boot just fine. Fedora is not even an option at this point in time. My file structure is as such:

/dev/sda1 116GB NTFS /windows
/dev/sda2 500MB Linux Native /boot
/dev/sda3 97GB Linux LVM
/dev/sda4 100GB Linux LVM


sda1 - Windows XP

sda2 - boot partition created by initial install of Fedora that I left in place after deleting the Fedora partition in Windows

sda3 - Fedora 16 LVM with the following structure:
/dev/VolGroup LVM2
/dev/VolGroup/fedorakde 87GB LV Ext4
/dev/VolGroup/fedorahome 8GB LV Ext4
/dev/VolGroup/fedoraswap 1.5GB LV Swap

sda4 - OpenSUSE with the following structure:
/dev/OpenSUSEKDE LVM2
/dev/OpenSUSEKDE/home 8GB LV Ext4
/dev/OpenSUSEKDE/root 90GB LV Ext4
/dev/OpenSUSEKDE/swap 1.5GB LV Swap

When I am in Dolphin, I do not even see the 500MB /boot drive Fedora created. After all this is typed, is there even a way for me to modify the Root>boot>grub>menu.lst file to have Fedora show up in the OpenSUSE boot loader? Fedora does not have a menu.lst file, but does have a grub.cfg file in the boot>grub folder.

I also want to install other distro's this week if possible. The plan is to use the last 125GB on the SATA drive already in the machine and to install another 500GB SATA drive that I will install four more distro's onto. The ultimate purpose of all of this is to become familiar with several main distro's in case I encounter them at work or in a future job.

Along the same lines, but not part of this post, does anyone have a good (i.e., easy to follow for a Linux newbie like myself) tutorial for creating a multi boot USB drive? I would love to have several distro's plus other network and admin style tools I could boot up from my USB drive.

Thanks in advance and sorry for the questions that many of you probably could answer in your sleep. I am new, but trying to catch up a little.
 
Old 02-20-2012, 05:52 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
Ugh - you seem to have tripped over quite a few of the "don't do this" traps re partitioning.
That's not a criticism, merely an observation.

As a result of decisions made for MSDOS, the BIOS partition table structure is limited to 4 primary partitions. Linux (and Win7) is bound by this. As such, you cannot allocate any more partitions - for any reason.
Also means that free space is unusable - with the exception of one partition being able to be resized to use it. The partition beside the free space - probably sda4.
To get around this, a different structure was invented - make one (only one) of the primary partitions an extended partition, and suballocate other partitions within the container that is the extended. These suballocated partitions are called logical partitions. If you plan on installing more than one system, I'd suggest you use most of the disk as an extended, and install all your systems on logical partitions.
In your case you could achieve similar by allocating most of the disk as a single pv and use separate vg's per new system. How you would convince the installers to accept this I have no idea.

When you installed OpenSuSE you presumably used the stand-alone partition as its /boot. If so you probably formatted it - in which case Fedora will be unusable. If you didn't format it (i.e. you can still see the grub.cfg), it will be unbootable, but recoverable. You might want to consider if it is worthwhile given the above, or if you should start again.

I need to walk the mutt - I'll re-post after seeing your plans.
 
Old 02-20-2012, 05:54 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,541

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Quote:
I assumed OpenSUSE would update the Fedora loader
It won't do that. Opensuse uses an older version of the Grub bootloader, Fedora uses the newer version Grub2. You can put an entry manually in the Opensuse menu.lst file to boot Fedora. Assuming your Fedora boot files are on sda3 the following should work:

Quote:
title Fedora 16
root (hd0,2)
kernel /boot/grub/core.img
or you could put a chainloader entry in the menu.lst:

Quote:
title Fedora 16
root (hd0,2)
chainloader +1
If you are going to be experimenting, it will be easier to have Grub2 in the master boot record with one distribution (Fedora, for example) and then install the bootloader for other distributions to the root partition where you install your new distriubtion.

The link below is to the Grub Legacy Manual:
http://www.gnu.org/software/grub/man...gacy/grub.html

The link below is to the Grub2 Manual:
http://www.gnu.org/software/grub/manual/grub.html

Below is a link to a Grub2 tutorial which also has a link to a Grub Legacy tutorial near the top of the page:

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

If you are not sure where your boot files are, you can google bootinfoscript, go to the web site, download it and run it and the post the output, a results.txt file here which will give a lot of detailed information on your system and boot files.
 
Old 02-20-2012, 06:01 PM   #4
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
First, most large linux distros will only use between 3 to 4 gig at the most. For testing purposes, 20 gig should be plenty of room. Save the left-over for a data partition that you can mount with all your distros.

This is an older tutorial but the method is basically the same today.

multiboot

His method is booting by a method called chainloading.
 
Old 02-20-2012, 07:11 PM   #5
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
Hey if you still have fedora in there you can add it to the booting list by booting in OpenSuSE and open up YasT. Then look for Boot open it up and choose to add, Then you can add the fedora option in there. You will have to know where (Which partition) is the image of the Kernel fedora is using and browse all the way there. Play around with YasT for a while and you will make it work.

This is assuming when you install OpenSuSE you didnt install it in the partition fedora was at.

Good luck to you!
 
Old 02-20-2012, 10:01 PM   #6
Ravenslair
LQ Newbie
 
Registered: Feb 2012
Location: California, USA
Distribution: Fedora 16
Posts: 18

Original Poster
Rep: Reputation: 0
syg00, I appreciate all kinds of comments. If I screwed up, I would hope to be called on it! Better to be corrected now when it does not matter if I mess up. Like I said, I am new to Linux and bound to make a lot of mistakes. Being able to draw upon the resources here will be very helpful. As a side note, it is amazing the limitations we have to live with due to OS decisions made three decades ago.

I really appreciate all the very insightful replies. This is an unused machine I had just gathering dust, so any screw-ups are OK. All the installs are brand new and can be redone at any time. I will see if I can add Fedora to the OpenSUSE bootloader first. If that does not work, then I will keep on trying. yancek, thanks for all the reading material. I have a lot of reading to do. Larry Webb, thanks for the link. I had read about chainloading somewhere. Maybe that is something I will have to try. TroN-0074, luckily I was smart enough to make a new LVM for OpenSUSE. We shall see if I did it right though!

Thanks again for the help. I will post up what I make of my mess.
 
Old 02-20-2012, 10:34 PM   #7
Ravenslair
LQ Newbie
 
Registered: Feb 2012
Location: California, USA
Distribution: Fedora 16
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
It won't do that. Opensuse uses an older version of the Grub bootloader, Fedora uses the newer version Grub2. You can put an entry manually in the Opensuse menu.lst file to boot Fedora. Assuming your Fedora boot files are on sda3 the following should work:


I added the following to the OpenSUSE boot/grub/menu.lst file:

title Fedora 16
root (hd0,2)
kernel /boot/grub2/core.img

/boot/grub/ did not have the core.img file, but I found it in the grub2 folder. When I rebooted, Fedora was in the bootloader, but would not run. It gave me a partition error. I obviously screwed up something. Time to delete everything but Windows XP and start over. I will read all the associated links you all provided (thanks again!) before I start.
 
Old 02-21-2012, 06:46 AM   #8
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
Let us know how you did with this project I am sure more people will want to know how to approach this.

And good luck to you!
 
Old 03-02-2012, 12:01 AM   #9
Ravenslair
LQ Newbie
 
Registered: Feb 2012
Location: California, USA
Distribution: Fedora 16
Posts: 18

Original Poster
Rep: Reputation: 0
An update from my last post. I finally got everything partitioned. I created the following structure:

/dev/sdb1 - ntfs - Windows XP
/dev/sdb2 - fat 16 - BOOT partition
/dev/sdb3 - extended (all the remaining were created within this)
/dev/sdb5 - swap
/dev/sdb6 - ext4 - Ubuntu 11.10 installed here with the boot loader installed in the same partition
/dev/sdb7 - ext4 - Fedora 16 installed here with the boot loader installed in the same partition
/dev/sdb8 -
/dev/sdb9 -
/dev/sdb10 -
/dev/sdb11 -
/dev/sdb12 -
/dev/sdb13 -
/dev/sdb14 -
/dev/sdb15 -
/dev/sdb16 -

I used SARDU to create a multiboot USB drive and booted in GParted to create the above partitions. I used the terminal in GParted to download grub-1.99.tar.gz. I unzipped it and installed it using grub-install. As most of you are likely aware (which a novice like myself was not), grub-install does not automatically create the grub.cfg file. I could not get it to create it either. When I rebooted, I was at a "GNU GRUB version 1.99-14" command prompt. It states, "Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions."

How do I create the grub.cfg file at this point? Are there any other files beside grub.cfg that are required?

Does anyone have an idea how I can create the grub.cfg file so I can boot into Windows XP (/dev/sdb1), Ubuntu (/dev/sdb6), Fedora 16 (/dev/sdb7) or any of the other distro's I am going to install to the other partitions (/dev/sdb8 through /dev/sdb16)?

As yancek stated, I am planning to chainload.

Thanks for your help.

Last edited by Ravenslair; 03-02-2012 at 12:03 AM.
 
Old 03-02-2012, 01:19 AM   #10
ac_kumar
Member
 
Registered: Aug 2011
Distribution: Ubuntu, Fedora
Posts: 175

Rep: Reputation: 9
you can go in grub command prompt and type
root (hd0,0)
press enter (hd0,0) is the hard drive number it can be (hd0,1) to boot to second partition of hard drive.
once root (hd0,0) finish succesfully you can type :-
ls
at command line it if it show entries like document and settings than it is you windows partition than type :-
chainloader +1
than type
boot
press enter
 
Old 03-02-2012, 02:25 AM   #11
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637
In your Linux partitions install os-prober. Os-prober works with Grub and looks for other OSs on the hard drive, it will then configure Grub to list them. I find that you need os-prober on every Linux system you have installed otherwise the one you don't have os-prober on will update Grub and you will lose all of the other entries until you install os-prober again.
 
Old 03-02-2012, 06:24 AM   #12
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by Ravenslair View Post
An update from my last post. I finally got everything partitioned. I created the following structure:

/dev/sdb1 - ntfs - Windows XP
/dev/sdb2 - fat 16 - BOOT partition
/dev/sdb5 - swap
/dev/sdb6 - ext4 - Ubuntu 11.10 installed here with the boot loader installed in the same partition
/dev/sdb7 - ext4 - Fedora 16 installed here with the boot loader installed in the same partition

I was at a "GNU GRUB version 1.99-14" command prompt. It states, "Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions."

How do I create the grub.cfg file at this point? Are there any other files beside grub.cfg that are required?

Does anyone have an idea how I can create the grub.cfg file so I can boot into Windows XP (/dev/sdb1), Ubuntu (/dev/sdb6), Fedora 16 (/dev/sdb7) or any of the other distro's I am going to install to the other partitions (/dev/sdb8 through /dev/sdb16)?

As yancek stated, I am planning to chainload.

Thanks for your help.
To make an entry at the grub prompt use
Code:
set root=(hd1,1)
chainloader +1
boot
To create a grub.cfg file:

Use your ubuntu as a live cd and from terminal enter the following to create a grub cfg file.

Use your ubuntu cd live and from terminal
Code:
sudo mkdir /mnt/sdb2
sudo mount /dev/sdb2 /mnt/sdb2
sudo nano /mnt/sdb2/boot/grub/grub.cfg

set default="0"

set timeout=10

menuentry "Windows XP" {
set root=(hd1,1)
chainloader +1
}

menuentry "Ubuntu" {
set root=(hd1,6)
chainloader +1
}

menuentry "Fedora" {
set root=(hd1,7)
chainloader +1
}

Now hit the Ctrl and o
make sure the save as is the same file name and then enter y 
then Ctrl and x

Now when you restart without the live cd you should have a grub menu.

Last edited by Larry Webb; 03-02-2012 at 09:55 AM.
 
Old 03-02-2012, 10:24 AM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,541

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Your last post indicates you have Grub2 for Fedora and Ubuntu each on their own partitions. You need one of them (or something?) in the master boot record. The simplest way to create a grub.cfg file is to run: sudo update-grub. You should decide which systems bootloader you want in the master boot record. If you use the Grub2 from Ubuntu, you need to install Grub to the master boot record. See the link below, Section 12:

https://help.ubuntu.com/community/Grub2

You should be able to boot all your systems after running sudo update-grub. You may need os-prober so run: sudo os-prober then sudo update-grub. If os-prober is not installed, run: sudo apt-get install os-prober and re-run these commands.

If you then install additional system, re-run sudo update-grub after the new install after selecting to install the bootloader for the new installation to the root partition of that system.
 
Old 03-02-2012, 11:17 AM   #14
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by yancek View Post
Your last post indicates you have Grub2 for Fedora and Ubuntu each on their own partitions. You need one of them (or something?) in the master boot record. The simplest way to create a grub.cfg file is to run: sudo update-grub. You should decide which systems bootloader you want in the master boot record. If you use the Grub2 from Ubuntu, you need to install Grub to the master boot record. See the link below, Section 12:

https://help.ubuntu.com/community/Grub2

You should be able to boot all your systems after running sudo update-grub. You may need os-prober so run: sudo os-prober then sudo update-grub. If os-prober is not installed, run: sudo apt-get install os-prober and re-run these commands.

If you then install additional system, re-run sudo update-grub after the new install after selecting to install the bootloader for the new installation to the root partition of that system.
If I understood him he has installed grub2 on partition sdb2 and when you install it in a separate partition you need to build a grub.cfg file. When installing on a separate partition you do not have 'grub-update' or 'os-prober'. He wants to chainload his distros in which he will not need them.
 
Old 03-02-2012, 11:40 AM   #15
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637
This is the very first thing in the grub.cfg file
Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
The reason you don't edit this yourself is because as soon as a new kernel is installed Grub will update and totally screw the modified file. Making your own grub.cfg is fine if you know what you are doing and also if you are on a usb using live images. It isn't worth it if you are using multiple OSs on a regular drive in a regular PC and if you don't know what you are doing.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi boot system Ravenslair LinuxQuestions.org Member Intro 1 02-20-2012 04:58 PM
[SOLVED] what's the difference between a multi-cpu , multi-core and a multi-thread system ? entz Linux - Hardware 11 12-20-2011 04:49 PM
Multi-disk, multi-boot system does not boot after fresh install anth0ny5 Linux - Software 8 08-17-2011 02:02 AM
Multi boot system sfzab Linux - Software 2 04-08-2006 01:23 PM
multi-boot system? batard Linux - Newbie 1 01-31-2005 02:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:12 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