From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 30 17:39:12 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 481B41065670 for ; Sat, 30 Apr 2011 17:39:12 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id CE84D8FC15 for ; Sat, 30 Apr 2011 17:39:11 +0000 (UTC) Received: by wyf23 with SMTP id 23so4508012wyf.13 for ; Sat, 30 Apr 2011 10:39:10 -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:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=oRn+L4+rWnTyIS5Uugd37lT9K7OhfyiU0VvrLxvHzvI=; b=qm8zl+NGPr0NiqyzvUVdfGeNxiCsIJwDpNUQvS6O4QccokgsP8x8UJ3xbnzLZ15cAX /ztCgJV3GTE+ld4QvgR6WSv2C02xsharvH9W4VmpTtedeE+9foBGhkv+ZBQurI8oW7tN UVee1XKLQSjVMvS8c57kee/eIak+6fvY2Uqto= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; b=eM46jY43XCPXZ3z0RpfEJ1oJpItOMFEh9HfT4s+9N95bG1skH19g8oVI2bdMP5xHoM ZnLjcShi/3zEDonAUQawAB9XMYeuOCWEmw2bFjKx+OzaNZUJKXqjjr8ybjz3u7HIiL5U 8cdUPPMWVMzLg6LMyLTQYZqgjAkG+i91ZCBtg= Received: by 10.227.203.13 with SMTP id fg13mr814644wbb.95.1304185150642; Sat, 30 Apr 2011 10:39:10 -0700 (PDT) Received: from DEV ([82.193.208.173]) by mx.google.com with ESMTPS id h11sm2373069wbc.60.2011.04.30.10.39.01 (version=SSLv3 cipher=OTHER); Sat, 30 Apr 2011 10:39:09 -0700 (PDT) Message-ID: <20110430.173909.578.1@DEV> From: rank1seeker@gmail.com To: freebsd-hackers@freebsd.org Date: Sat, 30 Apr 2011 19:39:09 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: <4DBC3D63.6020508@FreeBSD.org> References: <20110429.160309.656.1@DEV> <4DBC3D63.6020508@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: Sat, 30 Apr 2011 17:39:12 -0000 ----- Original Message -----=0D=0AFrom: Alexander Motin = =0D=0ATo: freebsd-hackers@freebsd.org=0D=0ADate: Sat, 30 = Apr 2011 19:48:35 +0300=0D=0ASubject: Re: Look of boot2, on = HDD=0D=0A=0D=0A> Garrett Cooper wrote:=0D=0A> > 2011/4/29 = :=0D=0A> >> /boot/boot2 STAGE 2 bootstrap = file=0D=0A> >> 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.=0D=0A> >>=0D=0A> >> Once sys is fully booted, HDD is = 'ada0'.=0D=0A> >> However, STAGE 2, sees it, as a 'ad4', at boot process, = which is same seen, by booted sys, when I turn off AHCI.=0D=0A> >>=0D=0A> = >> So, here is the riddle ...=0D=0A> >> On fully booted sys, how do I = query STAGE 2, to tell me, how it'll see, my 'ada0' HDD?=0D=0A> > =0D=0A> = > This is a very interesting catch:=0D=0A> > =0D=0A> > = /usr/src/sys/boot/pc98/boot2/boot2.c:static const char *const=0D=0A> > = dev_nm[NDEV] =3D {"ad", "da", "fd"};=0D=0A> > = /usr/src/sys/boot/i386/boot2/boot2.c:static const char *const=0D=0A> > = dev_nm[NDEV] =3D {"ad", "da", "fd"};=0D=0A> > =0D=0A> > It probably = will be a no-op soon because of some of the=0D=0A> > compatibility = changes Alex made, but still a potential point of=0D=0A> > confusion = nonetheless.=0D=0A> =0D=0A> Pardon my ignorance, but could somebody shed = some light for me on this=0D=0A> list of names? Why much more = sophisticated loader(8) operates disks as=0D=0A> diak0/1/..., while boot2 = tries to mimic something he has no any idea=0D=0A> about, using very = limited information from random sources? Does this=0D=0A> names important = for anything?=0D=0A> =0D=0A> Even with old ATA names didn't match on my = laptop: boot2 reports ad0,=0D=0A> while system - ad4. Also we have a lot = of drivers who's disk names don't=0D=0A> fit into this set of ad, da and = fd.=0D=0A> =0D=0A> -- =0D=0A> Alexander Motin=0D=0A=0D=0AWell ..., ATM, I = say lets NOT touch/edit boot2 nor loader.=0D=0ALet them continue to see = devices, the way they "like" ...=0D=0A=0D=0ANOW, all I would like, is to = find a way of ASKING them, how will they see "$target" device, at theirs = boot step/time.=0D=0A"Asking" is done, on a fully booted sys and I am = interested in asking STAGE 2 (boot2).=0D=0A=0D=0A=0D=0ADomagoj = Smol=E8i=E6=0D=0A