 |
 |
 |
 |
| Installation and Live Media Help with Installation & Live Media (Live CD, USB, DVD) problems. |

15th April 2012, 08:45 PM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 29

|
|
|
Grub2 Drive Numbering Inconsistency
I'm really confused. When I first installed Fedora 16, the grub.cfg file generated had entries referring to hd0. Just what I had expected. My system has one internal drive (sda), and two external drives (sdb and sdc). Recently I executed grub2-mkconfig and looked at the resulting grub.cfg file. In this file, all references are to hd1, not hd0. Since the original file booted successfully, I expected that the new file would not, presumably trying to load systems from sdb. Much to my surprise, the new file worked just as well. The documentation I've found seems to tell me that hd0 is the first drive in the BIOS order, while hd1 is the second. Why do both files boot successfully?
|

16th April 2012, 11:19 AM
|
|
Registered User
|
|
Join Date: Dec 2006
Posts: 1,718

|
|
|
Re: Grub2 Drive Numbering Inconsistency
Drive numbering can be confusing and if you have several controllers it depends on the order in which drivers are loaded.
The boot drive however is defined in your system's efi/bios. My guess is that you've written the new configuration to an external drive, but you're still booting the old configuration from the internal drive, which is stored in the master boot record of the drive itself. And that's why it's "working" ;-)
What kind of external drives are they? USB or esata?
|

20th April 2012, 04:40 AM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 29

|
|
|
Re: Grub2 Drive Numbering Inconsistency
Quote:
|
What kind of external drives are they? USB or esata?
|
I have only one bootable drive, an internal sata drive. I have two external drives connected via USB, but neither one has ever been bootable or contained a bootable OS. Grub2 is installed in a Fedora partition; the MBR of that drive contains the original Windows Vista loader. Fedora 16 recognizes the internal drive as sda. When I access the BIOS screen, the internal drive is specified as first in the boot order. One puzzle is why the grub.cfg file refers to the internal drive as hd1, but even more puzzling is why it apparently makes no difference whether one uses hd0 or hd1 to refer to that drive.
|

20th April 2012, 01:56 PM
|
 |
"Shells" (of a sub world)
|
|
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,608

|
|
|
Re: Grub2 Drive Numbering Inconsistency
As far i know Grub Legacy (1) and Grub 2 (1.99) count diffrently.
Grub Legacy starts counting at 0 beeing your first partition/drive
Grub 2 starts counting at 1 beeing your first partition/drive.
Hope this helps
EDIT:
For more info, read:
http://www.gnu.org/software/grub/manual/grub.html
__________________
Fedora Manual: http://docs.fedoraproject.org
Script-Tools: https://sourceforge.net/projects/script-tools/
sudo st tweak repo toggle fedora-rawhide ; st iso dl-fed -respin && st iso usb
Last edited by sea; 20th April 2012 at 02:03 PM.
|

20th April 2012, 04:16 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Posts: 226

|
|
|
Re: Grub2 Drive Numbering Inconsistency
If you download boot_info_script and run it as root. It will give you everything you wnated to know regarding your boot info on all active drives.
There will be a RESULTS.txt file in the directory that you ran it in.
|

21st April 2012, 01:24 AM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 29

|
|
|
Re: Grub2 Drive Numbering Inconsistency
Quote:
|
If you download boot_info_script and run it as root. It will give you everything you wnated to know regarding your boot info on all active drives.
|
Although the RESULTS.txt file contains a lot of information, including the grub.cfg file generated by anaconda (referring to hd0) and the grub.cfg file currently stored in /boot/grub2 (referring to hd1), it doesn't shed any light on why anaconda and grub2-mkconfig don't use the same hd numbers, or why it apparently makes no difference whether one uses hd0 or hd1 to refer to the same drive. To furher complicate the situation, I have run grub2-mkdevicemap: this output clearly identifies the drive as hd0, contrary to the numbering generated by grub2-mkconfig.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 00:36 (Saturday, 25-05-2013)
|
|
 |
 |
 |
 |
|
|