Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Mar 2002 10:24:03 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Michael Smith <msmith@freebsd.org>
Cc:        Luigi Rizzo <rizzo@icir.org>, arch@FreeBSD.ORG
Subject:   Re: For review: machdep.bootdev sysctl (for i386)
Message-ID:  <3C8BA4C3.64993899@mindspring.com>
References:  <200203101042.g2AAgCj03522@mass.dis.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Michael Smith wrote:
> > "you" as a human being know the answer when you have the box in
> > front of you and know where you have installed your code.
> > But the system (which is booting the exact same image
> > from either a floppy or a CF or from the net) does not.
> >
> > _This_ is the issue.
> 
> No, it is not.
> 
> The issue is that even *with* your hack, the system cannot tell from
> whence it booted without knowing more about the system's configuration.
> 
> The loader guesses better than boot2, but you still can't trust the
> value.

An incredibly gross hack, which is similar to that used by
Windows 95 to convert file handles from BIOS to protected
mode values, is to read from the devices from both interfaces,
and checksum them to the point where they can be uniquely
identified as equal to each other and no other devices, after
taking into account hints, so that image copied disks can
(mostly) be identified as unique.  In the worst case, a write
to a known "scratch area" is used, and it looks for the result
of the write.

8-(.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C8BA4C3.64993899>