Fedora Linux Support Community & Resources Center
  #1  
Old 15th April 2012, 08:45 PM
ghborrmann Offline
Registered User
 
Join Date: Nov 2008
Posts: 33
linuxfirefox
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?
Reply With Quote
  #2  
Old 16th April 2012, 11:19 AM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 2,077
linuxfirefox
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?
Reply With Quote
  #3  
Old 20th April 2012, 04:40 AM
ghborrmann Offline
Registered User
 
Join Date: Nov 2008
Posts: 33
windows_98_nt_2000firefox
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.
Reply With Quote
  #4  
Old 20th April 2012, 01:56 PM
sea Offline
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Confoederatio Helvetica (Swissh)
Age: 34
Posts: 3,278
linuxfedorafirefox
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
__________________
Laptop: Toshiba satellite p50-a-11 CPU: Intel i7 8*2400 MHz GPU: GeForce GT 745M RAM: 8192 MB Distro: Fedora (Rawhide) DE: Awesome
Text User Interface (TUI) // Windows 8+ & Fedora 20+ Dualboot

Last edited by sea; 20th April 2012 at 02:03 PM.
Reply With Quote
  #5  
Old 20th April 2012, 04:16 PM
VernDog Offline
Registered User
 
Join Date: Aug 2009
Posts: 313
linuxchrome
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.
Reply With Quote
  #6  
Old 21st April 2012, 01:24 AM
ghborrmann Offline
Registered User
 
Join Date: Nov 2008
Posts: 33
linuxfirefox
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.
Reply With Quote
Reply

Tags
drive, grub2, inconsistency, numbering

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
[SOLVED] Grub2, dev modifications from satndard grub2 install jakebpg Using Fedora 16 9th March 2012 08:39 AM
Fedora kernel numbering scheme jcliburn Using Fedora 1 5th May 2005 04:21 AM
Partition numbering in GRUB, HELP! zhiyung Using Fedora 2 10th June 2004 03:52 AM


Current GMT-time: 22:30 (Friday, 01-08-2014)

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