From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 30 16:48:55 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 7217C106564A for ; Sat, 30 Apr 2011 16:48:55 +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 E792A8FC0A for ; Sat, 30 Apr 2011 16:48:54 +0000 (UTC) Received: by bwz12 with SMTP id 12so5402580bwz.13 for ; Sat, 30 Apr 2011 09:48:53 -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:subject:references:in-reply-to:x-enigmail-version :content-type:content-transfer-encoding; bh=K2WsDdKdkGjgD/6hItoDFIZaLu+otooFsCsOlyU8iRw=; b=cFEK6siO4LEZgS+MOq5jfQ3liemKZTfgLKiGO3riSxyQ/lBCb/WmYLHkuqlxsIAHdY s4q9DMj6bRxFx3NO6WHIciNrXh1TjV/IAXUwNWrEkPqk8s42lgTqyFKrp3NdqH58cPIS tB3fZf+s6plAQel0BnIAgQSJWL9i1IONWEAgg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=NUgiKZmBVwooX3qJdbjK2+aQ4xZNHUecMd+9m9I6E2GiNDkFeShj3uolCHzJnXQjFl t3krlW1JRcNNAdsLwi4VmHqLLxfWCFoCb9ujDDGrT8C4fg2CXQ+Ae8ax1Wo+6ZB7Nlf/ pERWXQuDiQ53Of/b9Ug5l+QsCIoq1vGgFx6K8= Received: by 10.204.19.19 with SMTP id y19mr1650598bka.164.1304182133759; Sat, 30 Apr 2011 09:48:53 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id u15sm2252449bkf.16.2011.04.30.09.48.52 (version=SSLv3 cipher=OTHER); Sat, 30 Apr 2011 09:48:53 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DBC3D63.6020508@FreeBSD.org> Date: Sat, 30 Apr 2011 19:48:35 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <20110429.160309.656.1@DEV> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 16:48:55 -0000 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. -- Alexander Motin