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 06-06-2008, 09:05 PM   #1
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Ubuntu Mate 18.04, Mint 19.1
Posts: 360

Rep: Reputation: 45
Question add other linux distros to grub


I have Fedora 9 installed on a external SATA drive with a separate /boot partition and the grub installed on that drive. My internal drive has both windows XP and a few other Linux installed, but after I had to run fixmbr, I then lost capability to boot into these other Linux's, but XP boots fine.So how can I manually add these to the Fedora's grub file (grub.conf)? Here is my current grub file after a fresh install,

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sdb2
# initrd /initrd-version.img
#boot=/dev/sdb
default=0
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.25.3-18.fc9.i686)
root (hd0,0)
kernel /vmlinuz-2.6.25.3-18.fc9.i686 ro root=UUID=50b5fde3-f83e-4666-a1d4-76f206f58685 rhgb quiet
initrd /initrd-2.6.25.3-18.fc9.i686.img
title Fedora (2.6.25-14.fc9.i686)
root (hd0,0)
kernel /vmlinuz-2.6.25-14.fc9.i686 ro root=UUID=50b5fde3-f83e-4666-a1d4-76f206f58685 rhgb quiet
initrd /initrd-2.6.25-14.fc9.i686.img
title Other
rootnoverify (hd1,0)
chainloader +1
 
Old 06-06-2008, 09:53 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
It's not clear from your post if you can boot the new install of Fedora or only xp? Were you previously booting with Grub? From a previous Fedora install? When you re-installed Fedora, did you install Grub to the mbr?
 
Old 06-06-2008, 11:30 PM   #3
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Ubuntu Mate 18.04, Mint 19.1
Posts: 360

Original Poster
Rep: Reputation: 45
Cool

Yes I can boot into both XP and Fedora, this is done by hitting F10 key and then selecting the external hard drive as first boot device, (to boot into the Fedora) and for XP, I just boot the PC and it starts windows. Before I was useing a grub installed on the internal drive MBR, but now since the fix of MBR, I choose to install the Fedora grub boot loader on the same hard drive as Fedora,(the external eSATA/USB drive), which has a separate partition as; /boot, as well as for / (root).
 
Old 06-06-2008, 11:43 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Depends how you want to do it. You may be able to change your drive order in the BIOS to boot from the external drive first if you want to boot from Grub or you could continue to boot the way you do. You could also install Grub to the mbr of the first drive. If you have other Linux distros and a separate boot partition you will need to have the vmlinuz and initrd files from each in the separate boot partition and appropriate entries in the grub.conf file of Fedora. Can't give you any more specifics as I don't know your partition structure.

I assume you don't have a copy of the grub.conf file you were previously using? You could post the results of the "fdisk -l" command and indicate what distro you have on each partition and post the results of the "ls -l" command in the /boot partition of each distribution you have and someone should be able to give you specific instructions for your entries.
 
Old 06-07-2008, 03:58 AM   #5
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
You need to find your original /boot/grub/menu.lst. Then you can get back your original boot menu and add a entry for you usb drive. Find the the menu by using terminal as root

find /boot/grub/menu.lst

Also as yancek mentioned give us your fdisk -ls.
 
Old 06-08-2008, 04:40 AM   #6
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Ubuntu Mate 18.04, Mint 19.1
Posts: 360

Original Poster
Rep: Reputation: 45
Smile

Here is my fdisk -ls partitions;
the external eSATA/USB drive is the first one, as /sda, and Fedora 9 is on /sda1 as /boot and on sda2 as /, no other Linux in now installed there, and sda5 and sda10 are only for storage. And for the internal IDE drive; windows XP is on sdb1, with 3 Linux distros on sdb2,5,6, which are in order these distros; PClinuxOS, Ubuntu 8.04, Mepis 6.5

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x826d56f6

Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 208813+ 83 Linux
/dev/sda2 1959 3916 15727635 83 Linux
/dev/sda3 6201 16970 86510025 f W95 Ext'd (LBA)
/dev/sda4 27 1958 15518790 83 Linux
/dev/sda5 14164 16970 22547227+ 7 HPFS/NTFS
/dev/sda6 6201 6722 4192902 82 Linux swap / Solaris
/dev/sda7 6723 8680 15727603+ 83 Linux
/dev/sda8 8681 10638 15727603+ 83 Linux
/dev/sda9 10639 12596 15727603+ 83 Linux
/dev/sda10 12597 14163 12586896 b W95 FAT32

Partition table entries are not in disk order

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x89518951

Device Boot Start End Blocks Id System
/dev/sdb1 * 534 10976 83883397+ 7 HPFS/NTFS
/dev/sdb2 10977 13587 20972857+ 83 Linux
/dev/sdb3 13588 24321 86220855 f W95 Ext'd (LBA)
/dev/sdb5 13588 15545 15727603+ 83 Linux
/dev/sdb6 15546 17503 15727603+ 83 Linux
/dev/sdb7 17504 18064 4506201 82 Linux swap /

Last edited by james2b; 06-08-2008 at 04:56 AM. Reason: to add more info
 
Old 06-08-2008, 06:21 AM   #7
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
With this many partitions I presume you will be adding and upgrading distros, I suggest that you boot indirectly (chainload). To do this you need to find 500 meg to make a fat partition to install grub. The beauty of this is that you can change or upgrade distros without changing the boot menu. If not you need to give us you /boot/grub/menu.ls and which partition it resides in now.

http://www.justlinux.com/forum/showt...hreadid=147959
 
Old 06-09-2008, 01:55 AM   #8
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Ubuntu Mate 18.04, Mint 19.1
Posts: 360

Original Poster
Rep: Reputation: 45
Thumbs up

All right then thanks for the information. When I installed Fedora 9 on the external SATA/USB drive, during the grub boot loader install procedure, I selected grub to be installed on this same drive, (so not on the internal hard drive), and it suggested I use a separate small /boot partition, so I did, and so is my grub boot loader installed in the MBR of this external drive, right? And I will read Saikee's post at www.justlinux.com , thanks.
 
Old 06-09-2008, 06:29 AM   #9
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
If grub is installed on the external drive in order to use grub you need to go into your bios and make your external drive first in the boot order. There is no problem doing this if you have a later model computer that will boot usb. If there is any way I would make about a 200 meg partition on my internal drive. If it has windows on it make sure and defrag before resizing the partition.
 
Old 06-11-2008, 06:53 PM   #10
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Ubuntu Mate 18.04, Mint 19.1
Posts: 360

Original Poster
Rep: Reputation: 45
Smile

So now if I want to boot into Fedora on the external drive, I just press the F10 key early in the boot process, then select a boot first device under the hard drive category, (change from the internal to external hard drive), then the Fedora grub boot menu comes on screen. But now I realize that I may have a drive mapping issue, and after I did some partitioning changes, the swap file has changed. Is there a easy way to edit a file to correct the swap file partition number in each Linux distro ? Also I think that the internal IDE drive should been seen as hda not as sda. And Fedora has the drives switched in order, so it thinks (hd0,0) is the external drive, but originally my internal IDE was seen as first. SATA drives are seen as SCSI drive type, right? So it should be hda, and sda, or in grub speak, hd0, and hd1, correct ? thanks
 
Old 06-11-2008, 07:57 PM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Did you have your internal drive plugged in when you installed Fedora to the external? That may be why it sees the external as (hd0).

Some newer releases of Linux use sda for all drives, IDE, SATA, SCSI.

I don't think you have Grub installed to the mbr of your external drive which Linux sees as sda so that's why you have to boot the way you do. I expect if just install Grub to the mbr of the external it would solve this problem.
 
Old 06-11-2008, 08:59 PM   #12
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Ubuntu Mate 18.04, Mint 19.1
Posts: 360

Original Poster
Rep: Reputation: 45
Talking

Yes I did have both internal and external hard drives connected during the Fedora 9 install. I had just finished fixing the master boot record and then rebuilding the partition table also, on the internal IDE drive, due to a issue of neither XP or Linux was booting. I had heard that Ubuntu 8.04, that new version install will clear your partition table, and it's a bug to be fixed we hope. I used a tool called Test Disk, to detect and fix both internal and the external drives partition tables. After this I used the GParted partition tool to modify some of my partitions on both drives, which changed the partition numbers some, (such as the swap file).
 
  


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
How does GRUB work with multiple linux distros ? glenn69 Linux - Newbie 11 10-15-2006 04:12 AM
[SOLVED] Installing more Linux distros - Grub settings help enrico_dvchp Linux - Software 3 08-27-2006 04:28 AM
boot 2 linux distros with grub/lilo blas Linux - General 4 11-18-2005 10:22 PM
Grub and dual-booting two Linux distros RonRussell Linux - General 2 04-15-2005 08:04 PM
How do I add a new installation of linux to GRUB? KuRe Linux - Software 2 03-25-2003 11:51 AM

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

All times are GMT -5. The time now is 06:53 AM.

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