From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 30 19:03:44 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D4371065674 for ; Sat, 30 Apr 2011 19:03:44 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 124168FC12 for ; Sat, 30 Apr 2011 19:03:43 +0000 (UTC) Received: by bwz12 with SMTP id 12so5467539bwz.13 for ; Sat, 30 Apr 2011 12:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=/3KsWsP/+6k2OzBoaiq6Zbd3zq//bWfOmUayOdvdUzE=; b=muE2ZMaimm2/J0npa6Fnb9HH+1WP9rHABM/l2JgZG6mUQ6A44paT1TfAScwfvGxZcy F3du4UwbEdk8Z+i4wbH8OXMU6Twt+KEHybVHlG/UgWb31wRauyPGVaugh81VGS2qSGx7 mE9l4ZYkW6nbkFO4/8UU1krjVyQ9aXUJnpB7w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=nuwALHcOJCra77gR10EjpTKagzO74nzKOQ00AOHfJAmnQSpOOENms3T859O1raKIEw tnfBnexllyb0Gy0P1p6hF87RT6IIHLNpXAnICD7zP+fQPlkGNGtYc5jBG+v3tYB5QrQl pfIrfk+ptvWLahjaf4hKJSws/DxkMtgCbVgjs= Received: by 10.204.84.203 with SMTP id k11mr3923654bkl.10.1304190222881; Sat, 30 Apr 2011 12:03:42 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id x6sm2306318bkv.12.2011.04.30.12.03.41 (version=SSLv3 cipher=OTHER); Sat, 30 Apr 2011 12:03:42 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DBC5D0A.3080008@FreeBSD.org> Date: Sat, 30 Apr 2011 22:03:38 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: rank1seeker@gmail.com References: <4DBC3D63.6020508@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=windows-1250; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Look of boot2, on HDD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Apr 2011 19:03:44 -0000 On 30.04.2011 20:39, rank1seeker@gmail.com wrote: >> Garrett Cooper wrote: >>> 2011/4/29: >>>> /boot/boot2 STAGE 2 bootstrap file >>>> Understands the FreeBSD file system enough, to find files on it, and can provide a simple interface to choose the kernel or loader to run. >>>> >>>> Once sys is fully booted, HDD is 'ada0'. >>>> However, STAGE 2, sees it, as a 'ad4', at boot process, which is same seen, by booted sys, when I turn off AHCI. >>>> >>>> So, here is the riddle ... >>>> On fully booted sys, how do I query STAGE 2, to tell me, how it'll see, my 'ada0' HDD? >>> >>> This is a very interesting catch: >>> >>> /usr/src/sys/boot/pc98/boot2/boot2.c:static const char *const >>> dev_nm[NDEV] = {"ad", "da", "fd"}; >>> /usr/src/sys/boot/i386/boot2/boot2.c:static const char *const >>> dev_nm[NDEV] = {"ad", "da", "fd"}; >>> >>> It probably will be a no-op soon because of some of the >>> compatibility changes Alex made, but still a potential point of >>> confusion nonetheless. >> >> Pardon my ignorance, but could somebody shed some light for me on this >> list of names? Why much more sophisticated loader(8) operates disks as >> diak0/1/..., while boot2 tries to mimic something he has no any idea >> about, using very limited information from random sources? Does this >> names important for anything? >> >> Even with old ATA names didn't match on my laptop: boot2 reports ad0, >> while system - ad4. Also we have a lot of drivers who's disk names don't >> fit into this set of ad, da and fd. > > Well ..., ATM, I say lets NOT touch/edit boot2 nor loader. > Let them continue to see devices, the way they "like" ... League for the robots rights? :) > NOW, all I would like, is to find a way of ASKING them, how will they see "$target" device, at theirs boot step/time. > "Asking" is done, on a fully booted sys and I am interested in asking STAGE 2 (boot2). I think it may be impossible. It is up to each controller's BIOS to report device or not. And some controllers may just have no/disabled BIOS to report anything. Artificial separation between ad and da in boot2 also doesn't makes thinks easier. -- Alexander Motin