* Matching hard disks to BIOS boot order
@ 2009-06-12 4:26 Harvey Chapman
2009-06-12 7:53 ` Alan Cox
0 siblings, 1 reply; 3+ messages in thread
From: Harvey Chapman @ 2009-06-12 4:26 UTC (permalink / raw)
To: linux-kernel
Is there a way to figure out which hard disks match the BIOS boot order?
I'm trying to tell a Linux program which disk to use based on the disk
numbers (0,1,...) used by Windows. The best solution I've found so far
is disk serial number, but that hasn't been terribly reliable for other
reasons.
Thanks, H.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Matching hard disks to BIOS boot order
2009-06-12 4:26 Matching hard disks to BIOS boot order Harvey Chapman
@ 2009-06-12 7:53 ` Alan Cox
2009-06-12 22:38 ` H. Peter Anvin
0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2009-06-12 7:53 UTC (permalink / raw)
To: Harvey Chapman; +Cc: linux-kernel
On Fri, 12 Jun 2009 00:26:16 -0400
Harvey Chapman <hchapman-linux-kernel@3gfp.com> wrote:
> Is there a way to figure out which hard disks match the BIOS boot order?
>
> I'm trying to tell a Linux program which disk to use based on the disk
> numbers (0,1,...) used by Windows. The best solution I've found so far
> is disk serial number, but that hasn't been terribly reliable for other
> reasons.
There is a BIOS interface for this on newer systems, although the kernel
doesn't capture enough data to make it completely reliable below EDD 3.0
(in theory if we grabbed a few more bits we could do EDD 1.x as well)
Most PCs today do EDD 3.0 however
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Matching hard disks to BIOS boot order
2009-06-12 7:53 ` Alan Cox
@ 2009-06-12 22:38 ` H. Peter Anvin
0 siblings, 0 replies; 3+ messages in thread
From: H. Peter Anvin @ 2009-06-12 22:38 UTC (permalink / raw)
To: Alan Cox; +Cc: Harvey Chapman, linux-kernel
Alan Cox wrote:
> On Fri, 12 Jun 2009 00:26:16 -0400
> Harvey Chapman <hchapman-linux-kernel@3gfp.com> wrote:
>
>> Is there a way to figure out which hard disks match the BIOS boot order?
>>
>> I'm trying to tell a Linux program which disk to use based on the disk
>> numbers (0,1,...) used by Windows. The best solution I've found so far
>> is disk serial number, but that hasn't been terribly reliable for other
>> reasons.
>
> There is a BIOS interface for this on newer systems, although the kernel
> doesn't capture enough data to make it completely reliable below EDD 3.0
> (in theory if we grabbed a few more bits we could do EDD 1.x as well)
>
> Most PCs today do EDD 3.0 however
>
Actually, the best option is to completely forget about BIOS boot order
-- on some systems it can literally change from one boot to the next --
and instead rely on MBR signatures. As far as I know, Windows requires
all hard drives to have unique signatures and will "rebrand" the disks
to make it so if necessary.
The MBR signature is 4 bytes starting at offset 440 decimal.
-hpa
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-12 22:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-12 4:26 Matching hard disks to BIOS boot order Harvey Chapman
2009-06-12 7:53 ` Alan Cox
2009-06-12 22:38 ` H. Peter Anvin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.