LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 04-15-2005, 06:06 AM   #1
RonRussell
Member
 
Registered: May 2001
Location: Pangaea
Distribution: SimplyMepis2004
Posts: 78

Rep: Reputation: 15
Grub and dual-booting two Linux distros


I am a very happy user of SimplyMepis 2004, and when I received news that Mepis had released an updated version with a new KDE, Firefox browser, and other enhancements, I was interested. However, I did not want to overwrite my existing setup, as I didn't want to lose my large collection of music files saved on the hard drive to be played with XMMS.
I ordered the live CD for the new SimplyMepis 3.3, and it arrived in just a few days. The 'old' version, 2004, was already installed on my master hard drive, hda. I had a second hard drive with (ahem) another operating system installed as the slave, hdb. So I installed the 'new' SimplyMepis 3.3 to hdb in order to not distrub my existing installation on hda. When I was asked if I wished to install grub, I thought 'why not, if it messes something up, I can fix it', and clicked 'Yes'
Upon rebooting, I was greeted with a new splash screen, and options for two Linux kernels, both on hdb, but neither of my existing kernels on hda.
Investigating into this, I found that grub looks at a file located at /boot/grub/menu.lst for list of boot options to display. Since I had two distros, I had similar, but not identical files on hda and on hdb. The significant thing is that grub will look for the file on the drive where the distro it came with is installed. So grub which came with SimplyMepis 2004 will look for /boot/grub/menu.lst on hda, because that was where I installed S.M.2004. Grub which came with SimplyMepis 3.3 will look for the /boot/grub/menu.lst on hdb, because that was where I installed S.M. 3.3.
So, how to boot BOTH distros? First, decide which one you want to be your 'default' and use grub for that distro. I wanted my existing S.M. 2004 to be default while I experimented with S.M. 3.3, so I tossed in the LiveCD for S.M. 2004 and reinstalled grub.
Now I'm greeted with my original SimplyMepis splash screen, and the kernel options which exist on hda, my master drive. So all is right with that. To enable the kernels on hdb to boot, the file /boot/grub/menu.list on hda needed to be edited. I did this very simply, by logging on as root and copying two paragraphs of text from /boot/grub/menu.lst on the slave drive, hdb. Then I pasted those two paragraphs directly into /boot/grub/menu.lst on the master drive, hda. Now the default /boot/grub/menu.lst looks like this:

default saved
timeout 15
color cyan/blue white/blue
foreground ffffff
background 2f5178
splashimage /boot/grub/mepis.xpm.gz

title MEPIS at hda1, kernel 2.6.7
kernel (hd0,0)/boot/vmlinuz-2.6.7 root=/dev/hda1 nomce psmouse.proto=imps quiet splash=verbose vga=791
initrd (hd0,0)/boot/initrd.mepis
savedefault

title MEPIS at hda1, kernel 2.4.26
kernel (hd0,0)/boot/vmlinuz-2.4.26 root=/dev/hda1 nomce quiet splash=verbose vga=791 hdc=ide-scsi hdd=ide-scsi
initrd (hd0,0)/boot/initrd.mepis
savedefault

title MEPIS at hdb1, kernel 2.6.10
kernel (hd1,0)/boot/vmlinuz-2.6.10 root=/dev/hdb1 nomce psmouse.proto=imps quiet splash=verbose vga=791
initrd (hd1,0)/boot/initrd.splash

title MEPIS at hdb1, kernel 2.4.29
kernel (hd1,0)/boot/vmlinuz-2.4.29 root=/dev/hdb1 nomce quiet splash=verbose vga=791 hdc=ide-scsi hdd=ide-scsi
initrd (hd1,0)/boot/initrd.splash

title MEMTEST
kernel /boot/memtest86.bin

The only part which has been added are the paragraphs which begin with the word 'title', and refer to kernels at hdb1. These describe the kernels options which will be added to the splash screen, and their locations.

Now, when starting the computer, I am greeted by the original SimplyMepis 2004 splash screen, but with additional kernels options. I can boot my customized S.M.2004, with all my email addresses, bookmarks, and music files intact, or I can boot the new S.M. 3.3 and experiment with that, making any changes desired, secure in the knowledge that my S.M. 2004 installation will not be affected.
 
Old 04-15-2005, 07:07 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,747

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Or, simply stated: if you already have an installed version of grub (written to the MBR) to boot a Linux distro, when you install a SECOND Linux distro, write grub to the Linux partition, instead of to the MBR. You will still have to edit the /boot/grub/menu.lst of the first (Master) Linux distro. But that's as easy as booting into the FIRST distro, mounting the second partition, and copy/paste the menu.lst lines for the second Linux installation to the menu.lst of the first.

Been there; done that. Learned the hard way.
 
Old 04-15-2005, 08:04 PM   #3
gorzuate
LQ Newbie
 
Registered: Apr 2004
Location: IN
Distribution: Gentoo
Posts: 9

Rep: Reputation: 0
Well that was useful information. Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Dual booting two different distros of linux? scuffell Linux - Distributions 15 03-14-2005 09:25 PM
Dual booting 2 Linux Distros? bubble Linux - Newbie 2 11-30-2004 11:54 AM
Dual booting several Linux distros BruceC Linux - Newbie 4 10-29-2004 06:37 PM
Dual booting 2 Linux Distros on 1 Hd. Errrm??? Marvin Sunday Linux - Newbie 1 10-02-2004 12:26 PM
Dual-booting two Linux distros - partitions vasudevadas Linux - General 5 11-26-2003 06:11 AM


All times are GMT -5. The time now is 11:01 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration