Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 May 2011 13:19:52 +0200
From:      rank1seeker@gmail.com
To:        freebsd-hackers@freebsd.org
Subject:   Re: Look of boot2, on HDD
Message-ID:  <20110501.111952.296.2@DEV>
In-Reply-To: <4DBC5D0A.3080008@FreeBSD.org>
References:  <4DBC3D63.6020508@FreeBSD.org> <mailpost.1304185192.8734364.83157.mailing.freebsd.hackers@FreeBSD.cs.nctu.edu.tw> <4DBC5D0A.3080008@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 30.04.2011 20:39, rank1seeker@gmail.com wrote:
> >> Garrett Cooper wrote:
> >>> 2011/4/29<rank1seeker@gmail.com>:
> >>>> /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?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110501.111952.296.2>