From owner-freebsd-hackers@FreeBSD.ORG Sun May 1 11:19:54 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 A2116106566B for ; Sun, 1 May 2011 11:19:54 +0000 (UTC) (envelope-from rank1seeker@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 2DCEF8FC1B for ; Sun, 1 May 2011 11:19:53 +0000 (UTC) Received: by bwz12 with SMTP id 12so5783810bwz.13 for ; Sun, 01 May 2011 04:19:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:from:to:subject:date:in-reply-to :references:x-mailer; bh=uTjlufLefTNah5K/nn3GHOmQVv/sQK9LqAVjHXEy9uw=; b=k87zNu7wi38BIbgSjj85cxUGpo3wIshAqON4XQ5I2SuTp97DT0QJVN08a6YtVmwlLi szUfHMAAEMK6W594yrdxnY9jWl7mFe8r5gZX6IiCapJ+yozVDKgIcR5JTdVopUPjqt8r tqnFlMKIvvuKZqz95ebn2Bf3BKo+nfV/VtE7U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:subject:date:in-reply-to:references:x-mailer; b=IedbgV7Ca6PbhK3wZnXh9XTaByYjas+YgtDstaOuTPVQm1hwwfz0ufJCIG8fOalVxv 1WwKIlMc8HQpGy+AP+E197Sr08pGVN2XL49tT1OEK/+xeJBOHDB2ZBq1mkjeQ4ocClnz RiGeLRsFMBKj2NXT6j3ObtZZk6RErEp5RF77c= Received: by 10.204.19.20 with SMTP id y20mr1559225bka.170.1304248793114; Sun, 01 May 2011 04:19:53 -0700 (PDT) Received: from DEV (93-139-36-29.adsl.net.t-com.hr [93.139.36.29]) by mx.google.com with ESMTPS id u15sm2640502bkf.4.2011.05.01.04.19.50 (version=SSLv3 cipher=OTHER); Sun, 01 May 2011 04:19:51 -0700 (PDT) Message-ID: <20110501.111952.296.2@DEV> From: rank1seeker@gmail.com To: freebsd-hackers@freebsd.org Date: Sun, 01 May 2011 13:19:52 +0200 In-Reply-To: <4DBC5D0A.3080008@FreeBSD.org> References: <4DBC3D63.6020508@FreeBSD.org> <4DBC5D0A.3080008@FreeBSD.org> X-Mailer: POP Peeper (3.7.0.0) 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: Sun, 01 May 2011 11:19:54 -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? :) LOL! > > 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. > Ah, I see ..., so, the only solution, is to reboot and see for yourself, as it is hardware dependant outcome. Run, in some virtual env, as qemu or virtualbox, wouldn't help here, right?