Fedora This forum is for the discussion of the Fedora Project. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-05-2006, 08:08 AM
|
#1
|
Member
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154
Rep:
|
hard drive dev assignment in GRUB
Ok, I have a system that has two SATA drives on a SATA RAID card running FC5 and 1 ATA drive connected to the motherboard running windows. Fdisk -l shows
hda
sda
sdb
Now I can get GRUB to load linux fine but I can't get it to load windows. I keep getting an error 13. How can I find out what drive is what according to GRUB so I can get windows to load? i.e. which is hd0, hd1, hd2... etc. etc.
Last edited by daisychick; 12-05-2006 at 08:14 AM.
|
|
|
12-05-2006, 09:05 AM
|
#2
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
I use a setup like yours, without the raid component. This is how I get grub to load Windows.
Code:
title Windows XP
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
--- rod.
|
|
|
12-05-2006, 10:28 AM
|
#3
|
Member
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154
Original Poster
Rep:
|
Nope. That didn't work... Any other suggestions?
|
|
|
12-05-2006, 07:35 PM
|
#4
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
In your BIOS configuration, you should be able to define which drive is considered 'first', 'second', etc. Windows likes to be on what it thinks is the 'first' drive. Make the ATA drive the 'first' drive, and remove the part about using 'map' to logically swap drives in the grub config. You might have to use grub to do a logical swap in order to boot linux this way.
--- rod.
|
|
|
12-05-2006, 07:43 PM
|
#5
|
Member
Registered: Jul 2005
Location: Montreal, Qc, Canada
Distribution: Fedora Core 5/6 Slackware 10.1/11
Posts: 120
Rep:
|
fdisk should list the drives in the order which they are seen by the system and grub. Then, it's only a matter of numbering them from 0.
|
|
|
12-06-2006, 09:04 AM
|
#6
|
Member
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154
Original Poster
Rep:
|
Quote:
Originally Posted by daisychick
Fdisk -l shows
hda
sda
sdb
|
So if what you're saying is, that if the above is true, then GRUB should accept the hard drives as:
hda = hd0
sda = hd1
sdb = hd2
right?
Well, problem is, there's already a hd0 listed in GRUB. That's what boots linux. and linux is not on hda. It's on sda/sdb. I tried using hd1 and hd2 but got the error 13 on both. Suggestions?
|
|
|
12-06-2006, 09:26 AM
|
#7
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
Can you show us what your existing grub.conf file looks like? It is easier to guess what is going on with something concrete to see, and provides a good point of reference for suggestions. Also, in what order were the two operating systems installed? Is Windows capable of loading and running if it is the only installed disk?
--- rod.
|
|
|
12-06-2006, 10:00 AM
|
#8
|
Member
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154
Original Poster
Rep:
|
OOO crap. I made a mistake on the last post. Linux is booting off hd1 according to grub. Well so that's right anyways. Means that hd0 should be windows then... why won't it boot?
The windows OS was installed on one hdd and has been running fine for 5 years. FC5 was installed on two new SATA hdd via PCI card and runs fine. I can access both using the BIOS to select which drive I want to boot from.
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 (hd1,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup01/LogVol00
# initrd /initrd-version.img
#boot=/dev/md0
default=1
timeout=5
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.15-1.2054_FC5)
root (hd1,0)
kernel /vmlinuz-2.6.15-1.2054_FC5 ro root=/dev/VolGroup01/LogVol00
initrd /initrd-2.6.15-1.2054_FC5.img
#
title Windows 2000
rootnoverify (hd0,0)
chainloader +1
fdisk shows:
Code:
[root@server ~]# fdisk -l
Disk /dev/hda: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 19929 160079661 c W95 FAT32 (LBA)
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 fd Linux raid autodetect
/dev/sda2 14 38913 312464250 fd Linux raid autodetect
Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 fd Linux raid autodetect
/dev/sdb2 14 38913 312464250 fd Linux raid autodetect
Disk /dev/md1: 319.9 GB, 319963267072 bytes
2 heads, 4 sectors/track, 78116032 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md1 doesn't contain a valid partition table
Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md0 doesn't contain a valid partition table
Last edited by daisychick; 12-06-2006 at 10:03 AM.
|
|
|
12-06-2006, 10:02 AM
|
#9
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
You can always test to see what grub sees the drives as in the grub console. For example, "geometry (hd0)" will give you the geometry for that drive (including partition table). You can compare partition tables to the ones you think you have.
Additionally, I think grub has tab-completion for device names (though I'm not sure of this).
|
|
|
12-06-2006, 04:30 PM
|
#10
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
Quote:
Originally Posted by osor
Additionally, I think grub has tab-completion for device names (though I'm not sure of this).
|
Yes, I just tried this method. For example, I type (at the GRUB console) "root (" and then press Tab twice. Since the open parenthesis is the start of a drive name in GRUB-speak, it will spit out possible drives that it detected. This may not work on all drives or all cases (perhaps certain configurations aren't auto-detected, but are available with explicit references).
|
|
|
12-07-2006, 09:43 AM
|
#11
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
I don't see any reason that your grub.conf shouldn't boot Windows. However, I do have one thing that you might try, and I'm not sure precisely why it should work, but it just might. It might have something to do with how Windows sees the drives, in terms of 'first' vs 'second'.
In your BIOS, reverse the definitions of first and second hard disk. Then, use grub to boot the respective OS's from the reversed definitions. So your grub.conf would look something like this:
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 (hd1,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup01/LogVol00
# initrd /initrd-version.img
#boot=/dev/md0
default=1
timeout=5
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.15-1.2054_FC5)
root (hd1,0)
kernel /vmlinuz-2.6.15-1.2054_FC5 ro root=/dev/VolGroup01/LogVol00
initrd /initrd-2.6.15-1.2054_FC5.img
#
title Windows 2000
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
If that doesn't work, then I'm at a loss. Good luck.
--- rod.
Last edited by theNbomr; 12-07-2006 at 09:50 AM.
|
|
|
12-07-2006, 03:17 PM
|
#12
|
Member
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154
Original Poster
Rep:
|
I can't change the order in the bios. No matter what board I use, it will always see the ATA drives attached to the board before the SATA drives attached to the PCI card.
|
|
|
12-07-2006, 04:13 PM
|
#13
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
Okay, so did you try what osor said? Does grub's view of the possible drive numbers agree with what is in your grub.conf? It is also possible, I think, that Windows' view of what the drives are is different from what grub's is. This should be fixable by using grub's map function.
--- rod.
|
|
|
12-09-2006, 07:00 AM
|
#14
|
Member
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154
Original Poster
Rep:
|
grub geometry shows:
hd0: part0/ ext2fs - type 0xfd. part1/unknown - type -xfd
hd1: part0/ fat - type 0xc
grub now has:
Code:
title Windows 2000
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
still getting "Error 13: Invalid or unsupported executable format
|
|
|
12-09-2006, 11:33 AM
|
#15
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
Well, I'm at a loss now. However, I did a Google search for "Error 13: Invalid or unsupported executable format", and got a lot of hits that looked germaine to your question. This one http://ubuntuforums.org/showthread.p...ed#post1650325
even had a possible solution, although I don't understand it. For now, though, I'm out of ideas. Perhaps starting a fresh thread will draw interest from more people.
--- rod.
|
|
|
All times are GMT -5. The time now is 04:55 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|