From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262328AbTJNKpt (ORCPT ); Tue, 14 Oct 2003 06:45:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262331AbTJNKpt (ORCPT ); Tue, 14 Oct 2003 06:45:49 -0400 Received: from kweetal.tue.nl ([131.155.3.6]:34828 "EHLO kweetal.tue.nl") by vger.kernel.org with ESMTP id S262328AbTJNKps (ORCPT ); Tue, 14 Oct 2003 06:45:48 -0400 Date: Tue, 14 Oct 2003 12:45:08 +0200 From: Andries Brouwer To: Matt Domsch Cc: linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 2.4] EDD 4-byte MBR disk signature for the boot disk Message-ID: <20031014104508.GA5820@win.tue.nl> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.25i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 10, 2003 at 09:05:47AM -0500, Matt Domsch wrote: > There are 4 bytes in the MSDOS master boot record, at offset 0x228, > which may contain a per-system-unique signature. You mean 0x1b8. Yes, this area is used by some Microsoft systems. I wrote somewhere: ------------------------------------------------- Just before the partition table some operating systems save some interesting stuff. For example, DRDOS stores a password starting at offset 0x1b6. Windows NT stores a 4-byte "disk signature" or "volume ID" starting at offset 0x1b8. It is used to map drive letters to disks: in the HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices registry item the drive letter is coupled with this disk signature. It is used as a disk label to map disk info to disks in the HKEY_LOCAL_MACHINE\SYSTEM\DISK registry item. This signature is generated by the Disk Administrator when it initializes the disk, unless there already was a nonzero value there. Grub had a 4-byte stage2 start address at 0x1b8, and a 2-byte version at 0x1bc, but recent versions preserve 0x1b8-0x1bd. Also LILO v20 and later preserves this area. ------------------------------------------------- Probably you can add to this. > This is useful in the case where the BIOS is not EDD3.0 compliant, > thus doesn't provide the PCI bus/dev/fn and IDE/SCSI location of the > boot disk, yet you need to know which disk is the boot disk. An old idea to distinguish disks is to store an md5sum of the first sector. That would partly remove the dependence on one particular boot sector format. Can you remind me why you want to retrieve the boot disk? (Maybe we booted from ethernet or CDROM or USB device..) Andries