From owner-freebsd-arch Sun Mar 10 10:24:30 2002 Delivered-To: freebsd-arch@freebsd.org Received: from scaup.prod.itd.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by hub.freebsd.org (Postfix) with ESMTP id 92C4737B419; Sun, 10 Mar 2002 10:24:20 -0800 (PST) Received: from pool0441.cvx21-bradley.dialup.earthlink.net ([209.179.193.186] helo=mindspring.com) by scaup.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16k7zX-0002iu-00; Sun, 10 Mar 2002 10:24:20 -0800 Message-ID: <3C8BA4C3.64993899@mindspring.com> Date: Sun, 10 Mar 2002 10:24:03 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Michael Smith Cc: Luigi Rizzo , arch@FreeBSD.ORG Subject: Re: For review: machdep.bootdev sysctl (for i386) References: <200203101042.g2AAgCj03522@mass.dis.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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