LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices

Reply
 
Search this Thread
Old 05-28-2007, 08:28 PM   #1
mdorries
LQ Newbie
 
Registered: May 2007
Location: Illinois
Distribution: Fedora Core 6
Posts: 13

Rep: Reputation: 0
Installed Ubuntu but it changed my boot loader. I want this changed...


I wanted to install Ubuntu to mess around with because it said it was more beginner friendly. Well before hand I had a XP/Fedora system. With the change of my boot loader I can no longer get into Fedora Core 6. I attempted to restore the boot loader by using one of the Fedora disks. I was a WAY bigger fan of that boot loader because I had it only set up so it would boot directly into XP if no action was taken. Well long story short how can I restore the Fedora (GRUB) boot loader?
 
Old 05-28-2007, 08:40 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
I have a feeling we already answered some of this in another thread of yours....

First, Fedora and Ubuntu both use the same bootloader (GRUB). No benefit in using the Fedora version.

You have two choices:
---Edit the config file for the Ubuntu loader to include an entry for Fedora
---Re-install GRUB from Fedora and add Ubuntu to THAT config file.

You say you tried to install GRUB using the live CD--what happened?

The booting article at my website has some detailed instructions.
 
Old 05-28-2007, 08:40 PM   #3
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
Ubuntu and Fedora both use grub (last I checked). You should be able to edit the /boot/grub/menu.lst file to change the way it boots. Also, if you still have the other OS partitions, you should be able to add them to the boot menu.
 
Old 05-28-2007, 08:43 PM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You have run into a dueling distro's situation. Boot into Ubuntu and mount your Fedora's boot partition. If it wasn't on its own partition, then boot the root partition. Then you have access to the grub/menu.lst file that Fedora used. If you repartitioned the drive that Fedora is on, the values in it may need to be adjusted.
You goal will be to take the entries for booting distro B and add them to distro A's /boot/grub/menu.lst file. Then run grub-install on distro A. Always use distro A in the future when updating the boot loader.

Whichever distro you want to be distro A is up to you.

A nice thing about grub is that you can use the grub shell to locate where the kernel is for each respective distro. It has auto completion, so it is easy to enter in just "(hd" for example, and press tab. You will be presented with possible choices. If the partitions are different after repartitioning, that is a way to hunt for where the partition is now. Make a note of what you find and see if you can boot with the kernel and intrd that you found. Then adjust your menu.lst accordingly.

I hope that Fedora's LVM system doesn't make using the grub shell more difficult.
Good luck.
 
Old 05-29-2007, 12:03 AM   #5
mdorries
LQ Newbie
 
Registered: May 2007
Location: Illinois
Distribution: Fedora Core 6
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jschiwal
You have run into a dueling distro's situation. Boot into Ubuntu and mount your Fedora's boot partition. If it wasn't on its own partition, then boot the root partition. Then you have access to the grub/menu.lst file that Fedora used. If you repartitioned the drive that Fedora is on, the values in it may need to be adjusted.
You goal will be to take the entries for booting distro B and add them to distro A's /boot/grub/menu.lst file. Then run grub-install on distro A. Always use distro A in the future when updating the boot loader.

Whichever distro you want to be distro A is up to you.

A nice thing about grub is that you can use the grub shell to locate where the kernel is for each respective distro. It has auto completion, so it is easy to enter in just "(hd" for example, and press tab. You will be presented with possible choices. If the partitions are different after repartitioning, that is a way to hunt for where the partition is now. Make a note of what you find and see if you can boot with the kernel and intrd that you found. Then adjust your menu.lst accordingly.

I hope that Fedora's LVM system doesn't make using the grub shell more difficult.
Good luck.
I'm new to Linux (again, I had used it for a bit years ago for a class but have forgotten since) so I'm a little lost. I found the grub/menu.lst for Fedora (or so I believe) while in Ubuntu but it can't open it or says I don't have the privileges to access it. However (and I don't know if this is possible) can't figure out how to log into root to access it. I know in Fedora you can just log in with username: root and the password but can't for the life of me do it in Ubuntu.

Anyways once I do get the that file how do I run the grub-install? Is it from a terminal command or a live cd? Once again I apologize for being new but I'm just trying to learn.
 
Old 05-29-2007, 12:47 AM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Ubuntu has disabled root logins. You can run commands as root using sudo. The first regular user is a member of the wheel group and is allowed to use sudo.

You could run a command such as "sudo vim /boot/grub/menu.lst".

You could also use "gnomesu" to start a graphical editor as root.

You could have two instances open at once and cut and paste the part you need.

Use the part that looks like this from your Ubuntu's menu.lst. (This example is from my SuSE laptop)
Code:
# Modified by YaST2. Last modification on Fri May 25 19:47:59 CDT 2007
default 0
timeout 8
gfxmenu (hd0,4)/boot/message

title openSUSE 10.2 - 2.6.18.8-0.3
    root (hd0,4)
    kernel /boot/vmlinuz-2.6.18.8-0.3-default root=/dev/hda5 vga=791 nolapic resume=/dev/hda2 splash=silent showopts
    initrd /boot/initrd-2.6.18.8-0.3-default

title Failsafe -- openSUSE 10.2 - 2.6.18.8-0.3
    root (hd0,4)
    kernel /boot/vmlinuz-2.6.18.8-0.3-default root=/dev/hda5 vga=normal showopts ide=nodma apm=off acpi=off noresume edd=off
    initrd /boot/initrd-2.6.18.8-0.3-default

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
    rootnoverify (hd0,0)
    chainloader (hd0,0)+1
Then insert the section into the other distros menu.lst file:
Fedora Core's menu.lst file before:
Code:
# 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/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
vga=794
title Fedora Core (2.6.20-1.2948.fc6)
        root (hd0,0)
        kernel /vmlinuz-2.6.20-1.2948.fc6 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.20-1.2948.fc6.img
title Fedora Core (2.6.18-1.2798.fc6)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-1.2798.fc6.img
Fedora Core's menu.lst file after:
Code:
# 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/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
vga=794
title Fedora Core (2.6.20-1.2948.fc6)
        root (hd0,0)
        kernel /vmlinuz-2.6.20-1.2948.fc6 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.20-1.2948.fc6.img

title openSUSE 10.2 - 2.6.18.8-0.3
    root (hd0,4)
    kernel /boot/vmlinuz-2.6.18.8-0.3-default root=/dev/hda5 vga=791 nolapic resume=/dev/hda2 splash=silent showopts
    initrd /boot/initrd-2.6.18.8-0.3-default

title Fedora Core (2.6.18-1.2798.fc6)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-1.2798.fc6.img
Please note that with my example, I used the menu.lst from two different computers instead of two different distros on the same computer. Make sure that the drives indicated in both menu.lst files are still correct after you repartitioned the drive during the fedora core installation.

If I had booted up into Fedora core, I would then run "grub-install /dev/hda". Now when I boot, there will be a a menu option for Fedora, SuSE and Windows XP. In the future, I will only update the boot loader for Fedora. Also, make a backup of menu.lst on a floppy or usb drive so that you can restore it if Ubuntu or Windows overwrites the MBR on you.

If I had booted up into Ubuntu, I would chroot to the directory where the fedora core's root directory is mounted and then run
grub install.
Code:
sudo /usr/sbin/chroot /mnt/
/bin/bash -l
grub-install /dev/hda

Last edited by jschiwal; 05-29-2007 at 01:27 AM.
 
Old 05-31-2007, 06:06 PM   #7
mdorries
LQ Newbie
 
Registered: May 2007
Location: Illinois
Distribution: Fedora Core 6
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks a lot! I got it working. A little bit of a painstaking but it works!

As for those who said that Ubuntu and Fedora use the same boot loader. Yes they both use GRUB but I preferred the GUI Grub that Fedora uses. (Yeah both use the same function but it's just personal preference.)

Anyways thanks again!
 
Old 05-31-2007, 06:09 PM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
glad you got it working

FWIW, you can configure GRUB with a GUI in any Linux---it's all in the config file (menu.lst)
 
Old 05-31-2007, 08:13 PM   #9
mdorries
LQ Newbie
 
Registered: May 2007
Location: Illinois
Distribution: Fedora Core 6
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pixellany
glad you got it working

FWIW, you can configure GRUB with a GUI in any Linux---it's all in the config file (menu.lst)
Kind of figured but I'm learning as I go. Hopefully I'll get to a point where I can get it working. My first challenge is getting my wireless card working. Almost have it but not quite.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu installed, but with no boot loader dotancohen Linux - Newbie 4 12-28-2006 07:07 PM
Changed CPU, Ubuntu won't boot! Child of Wonder Ubuntu 3 09-05-2006 09:30 PM
New kernel installed, bootup screen changed? a_priebe47 Slackware 3 05-29-2006 10:49 PM
Changed to ubuntu... Sordo Linux - Software 1 01-21-2006 12:09 AM
"No kernel packages were installed... Boot loader will not be changed..." error messa ptexpress Linux - Newbie 1 11-03-2003 03:54 AM


All times are GMT -5. The time now is 09:04 AM.

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