lkml.org 
[lkml]   [2003]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 2.4] EDD 4-byte MBR disk signature for the boot disk
> If I put a hard disk from another system into my computer, and it has
> the "BOOT" signature, Linux will see two disks with the signature.  Barf!
> Same if I boot from two different disks at different times, and more
> so if one of them fails to boot properly so that it's not even
> possible for the booted kernel to erase the signature on its boot
> disk.

Yes, indeed. For this to work, the signature on the boot disk need be
different than the signature on any other attached disk. 4 bytes is
not enough to put a real UUID into.

Where we've put this into practice, we can carefully control the state of
the disks before Linux starts, so it hasn't been a problem.

This trick (and EDD in general) is most interesting when installing a new
OS onto a clean (known-state) system. After that, file system labels,
partition labels, etc. can provide the uniqueness you're looking for.

> It would be better to have the boot loader pick a likely-unique number
> such as the CMOS time in seconds since whenever and store that, and
> pass it as boot parameter to the kernel.  A few bits could be reserved
> to indicate that it was from our boot loaders;

That's a pretty good idea. I do something like this on IA-64 with
efibootmgr. Either the boot manager could generate and write a signature
to the disk, and pass it via a boot parameter, or as I had envisioned, any
other tool that speaks int13 could do it too, before the boot loader.
That's how it's used today - some DOS app writes a constant signature to
the boot disk, and zeros to the other disks. Then a Linux userspace tool
can grab the signature, and compare it against the known constant
signature. Passing it as a kernel parameter would remove the need to have
two tools know the same constant signature.

> it would be good if we had a list of existing per-system-unique
> signatures to avoid.  Do you know of such a list?

I know "DELL" has been used in the past, but regardless, whatever
signature you use really needs to be unique across all the disks in the
system, so it isn't important exactly what value is used, as long as only
the boot disk has it, and your code knows what to look for.

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.822 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site