Fedora Linux Support Community & Resources Center
  #1  
Old 6th January 2008, 08:01 PM
Greg A Offline
Registered User
 
Join Date: Dec 2007
Posts: 28
grub-dual boot problem

having reformatted my computer about 10 times in the space of 3 weeks I tried to install ubuntu and fedora as dual boot. I installed ubuntu first with a boot partition of 10Gb, swap partition of 1Gb and data partition of 75Gb...I then installed Fedora and (through ignorance/incompetence)let it do it's own thing with the rest of the space on my hard drive (total size=120Gb) hoping at the end I'd be able to repartition what fedora did by default, and mount my data partition such that I'd have some free space for other distro's, all with a shared data partition.

Fedora installed it's own version of grub and I added ubuntu to it (or so I thought)
This is what I get when I use grub:

Code:
GNU GRUB version 0.97 (631K lower/ 783936 upper memory)
---------------------------------------------------------------------------------------
Fedora (2.6.23.9-85.fc8)
Fedora (2.6.23.1-42.fc8)
ubuntu
---------------------------------------------------------------------------------------
and when I select ubuntu I get:
Code:
Booting 'ubuntu'
rootnoverify (hd0, 0)
chainloader +1

Error 13: Invalid or unsupported executable format
press any key to continue...
can anyone help me sort things out? (not surprisingly I'm a total novice)

Last edited by Greg A; 6th January 2008 at 08:06 PM.
Reply With Quote
  #2  
Old 6th January 2008, 08:59 PM
jelyfish Offline
Registered User
 
Join Date: Mar 2007
Posts: 44
You need to point to a kernel for ubuntu. Look at your /boot/grub/grub.conf file to see how it is setup now. Currently, you are trying to use a windows start with ubuntu.
This is your current fedora kernel:
Quote:
2.6.23.9-85.fc8
Just go to /boot and find ubuntu kernel (ie the vmlinuz and initrd). You will need to be root to see the grub.conf file and make any changes. {I'm sure you can find a better explanation than mine by searching these forums}
Reply With Quote
  #3  
Old 6th January 2008, 09:11 PM
bob's Avatar
bob Online
Administrator (yeah, back again)
 
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 67
Posts: 21,220
You didn't mention if you've installed Ubuntu in 32bit or 64 bit. As far as I know, the kernel hasn't changed since November on Ubuntu and might boot this way:

title Ubuntu 7.10
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic

Try using gedit or another text editor to add those lines to your Fedora's /boot/grub/grub.conf like this:

su - (password) .... then
gedit /boot/grub/grub.conf

That will open a new window with your existing grub.conf. Remove the current Ubuntu info. and replace it with what I've copied. After the bottom line, hit 'enter' once more to create a blank line that allows grub to read all the way to the bottom. Then 'save' and exit the window and 'exit' root. Reboot and test.
__________________
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651


Don't use any of my solutions on working computers or near small children.
Reply With Quote
  #4  
Old 6th January 2008, 09:17 PM
glennzo's Avatar
glennzo Offline
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,930
If you'd like, boot Fedora, post the output of the commands /sbin/fdisk -l and cat /boot/grub/menu.lst.

Edit: To slow again! Listen to Bob. He's older, wiser and faster than I
__________________
Glenn
The Bassinator © ®


Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #5  
Old 6th January 2008, 09:45 PM
Greg A Offline
Registered User
 
Join Date: Dec 2007
Posts: 28
k...I tried that bob and thought everything was great when I saw the Ubuntu splash screen.

Unfortunately for me it hung there for about 5 mins before I got:
Code:
BusyBox v1.1.3 (Debian 1:1.1.3-5Ubuntu7) Built-in shell(ash)
Enter 'help' for a list of built-in commands

(initrams) _
Doing as it told me and typing 'help' was of no help to me with my present knowledge.

with respect to whether I installed ubuntu 7.10 in 32 or 64 bit, from the download cd page I had the following 3 options:
1) Standard personal computer (x86 architecture, PentiumTM, CeleronTM, AthlonTM, SempronTM)
2) 64bit AMD and Intel computers
3) Sun UltraSPARC based

I chose option (1)

Asking for both them commands in terminal glennzo I got:
Code:
[greg@owp144b ~]$ /sbin/fdisk -l
[greg@owp144b ~]$ cat /boot/grub/menu.lst.
cat: /boot/grub/menu.lst.: No such file or directory
[greg@owp144b ~]$

Much as I don't want to, if I reinstalled ubuntu again on the space Fedora hasn't got (I can't see that part of my hard drive whilst on fedora) is there a good probability that ubuntu's version of grub will kill fedora?

Last edited by Greg A; 6th January 2008 at 09:53 PM.
Reply With Quote
  #6  
Old 6th January 2008, 10:03 PM
glennzo's Avatar
glennzo Offline
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,930
For the most part when you install a second Linux OS the GRUB boot loader takes over and adds an entry for the pre-existing install. So if you install Ubuntu it should add Fedora to it's boot menu. I've done it many times and that's what happens. Oddly enough, Fedora doesn't seem to play that way. If Windows is there it adds it but it doesn't seem to care about other Linux installations. If you install Ubuntu and for some reason it doesn't add Fedora we can help you with that.

As for the commands I asked you to run, run them as root by typing su, press enter and enter root's password. Then type the commands.
__________________
Glenn
The Bassinator © ®


Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #7  
Old 6th January 2008, 10:17 PM
Greg A Offline
Registered User
 
Join Date: Dec 2007
Posts: 28
What you said in your first paragraph is re-assuring (though I will hang fire a while just in case my problem can be fixed)

the output I got from those 2 commands as root is as follows:
Code:
[root@owp144b greg]# /sbin/fdisk -l

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x7ed9269a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1216     9767488+  83  Linux
/dev/sda2            1217        1340      996030   82  Linux swap / Solaris
/dev/sda3            1341       10458    73240335   83  Linux
/dev/sda4           10459       14593    33214387+   5  Extended
/dev/sda5           10459       11478     8193118+  83  Linux
/dev/sda6           11479       14593    25021206   8e  Linux LVM

Disk /dev/dm-0: 23.9 GB, 23957864448 bytes
255 heads, 63 sectors/track, 2912 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 1610 MB, 1610612736 bytes
255 heads, 63 sectors/track, 195 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x30307800

Disk /dev/dm-1 doesn't contain a valid partition table
[root@owp144b greg]# cat /boot/grub/menu.lst.
cat: /boot/grub/menu.lst.: No such file or directory
[root@owp144b greg]#
Reply With Quote
  #8  
Old 6th January 2008, 10:27 PM
glennzo's Avatar
glennzo Offline
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,930
No dot or period after lst. It looks as if you added that to the command. Try it again. We may be able to save your hide
__________________
Glenn
The Bassinator © ®


Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #9  
Old 6th January 2008, 10:44 PM
Greg A Offline
Registered User
 
Join Date: Dec 2007
Posts: 28
didn't spot that sneaky period!...still not good results though:
Code:
[root@owp144b greg]# /boot/grub/menu.lst
bash: /boot/grub/menu.lst: Permission denied
[root@owp144b greg]#
Reply With Quote
  #10  
Old 6th January 2008, 10:59 PM
lmo Offline
Registered User
 
Join Date: Mar 2007
Posts: 1,047
An aside note:
If grub boots at all, you can type the letter c
From there it is possible (I didn't say intuitive) to get any installed linux system to boot.
Someday, somebody will probalbly do a howto on this.
Code:
>find /grub/grub.conf
will likely list the partitions where kernels and initrds are.

Having identified possible partitions, one can set each, in turn, to root and determine kernel name and initrd name.
<TAB> means "Hit the tab key for filename/comman completion".
Example from my drives:
Code:
>root (hd0,6)
>find /vmlinuz<TAB>
>find /initrd<TAB>
then you know thier names and can construct kernel and initrd lines
Code:
>kernel /vmlinuz-2.6.11-1_FC4.img root=/dev/hde9
>inirtd /initrd-2.6.11-1.1369_FC4.img
Then to boot it, type the letter b

You have to match up the correct partition, the correct kernel line and the correct initrd line. Once these are determined and the system is booted, you can put the aquired correct entries in grub.conf.

Fedora says it is grub.conf
Other distros say it is menu.lst
All I am saying is that all is never lost. There is some way to do it.
Reply With Quote
  #11  
Old 6th January 2008, 11:20 PM
glennzo's Avatar
glennzo Offline
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,930
Quote:
Originally Posted by Greg A
didn't spot that sneaky period!...still not good results though:
Code:
[root@owp144b greg]# /boot/grub/menu.lst
bash: /boot/grub/menu.lst: Permission denied
[root@owp144b greg]#
This time you forgot cat cat /boot/grub/menu.lst
__________________
Glenn
The Bassinator © ®


Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #12  
Old 6th January 2008, 11:35 PM
Greg A Offline
Registered User
 
Join Date: Dec 2007
Posts: 28
lol! ok...the output is as follows:
Code:
[root@owp144b greg]# cat /boot/grub/menu.lst
# 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,4)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,4)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.23.9-85.fc8)
        root (hd0,4)
        kernel /vmlinuz-2.6.23.9-85.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.23.9-85.fc8.img
title Fedora (2.6.23.1-42.fc8)
        root (hd0,4)
        kernel /vmlinuz-2.6.23.1-42.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.23.1-42.fc8.img
title Ubuntu 7.10
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic

[root@owp144b greg]#
Imo...your advice looks interesting (but dangerous in the hands of a novice!)
given that I know the ubuntu boot on my computer is on /dev/sda1 would I type:
Code:
>root (hd0,1)
>find /vmlinuz<TAB>
>find /initrd<TAB>
?

Furthermore if I spot a likely contender would I then do:
Code:
>kernel /vmlinuz-(kernel number).img root=/dev/sda1
>inirtd /initrd-(kernel number).img
?

I have changed (hd0,6) to (hd0,1) and /dev/hde9 to /dev/sda 1 (apologies if I have made what is a ridiculous change to your code but I honestly don't know what I'm doing!)
Reply With Quote
  #13  
Old 6th January 2008, 11:59 PM
glennzo's Avatar
glennzo Offline
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,930
Looks like you already made the change, but if you didn't, open /boot/grub/menu.lst and change the Ubuntu section from this, root (hd0,0), to this, root (hd0,1). Save and reboot. Try to boot Ubuntu.
__________________
Glenn
The Bassinator © ®


Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #14  
Old 7th January 2008, 12:24 AM
Greg A Offline
Registered User
 
Join Date: Dec 2007
Posts: 28
k...changed it to roo(hd0,1) and got:
Code:
Error 17: cannot mount selected partition
from trying what Imo suggested and finding menu.lst, and grub.conf in (hd0,4) (but only in (hd0,4)), whilst the fedora boot is on dev/sda5 I suspect ubuntu boot is on (hd0,0)...thinking this doesn't get me any further though!
Reply With Quote
  #15  
Old 7th January 2008, 12:39 AM
glennzo's Avatar
glennzo Offline
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,930
Ok, here's another suggestion. Boot Fedora. Create a mount point, mkdir /media/ubuntu. Then type mount -t ext3 /dev/sda1 /media/ubuntu. Then type ls /media/ubuntu/boot and see what files are there. If the list shows the Ubuntu kernel we know that /sda1 is the right partition. If not type umount /media/ubuntu. Then type mount -t ext3 /dev/sda3 /media/ubuntu. Do the same thing again and see if the Ubuntu kernel is there. Do all of this as root.
__________________
Glenn
The Bassinator © ®


Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
Reply

Tags
boot, grubdual, problem

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB dual-boot problem ASeparateFirst Using Fedora 0 3rd June 2009 12:02 AM
grub problem on dual boot machine jcatfolsom Installation and Live Media 1 18th June 2008 01:51 PM
grub dual boot problem fakie_flip Using Fedora 18 11th January 2008 06:20 PM
Dual Boot Grub Problem gimlet58 Installation and Live Media 18 2nd April 2006 11:57 AM


Current GMT-time: 04:33 (Friday, 24-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat