BUG: 9.0 stage 2 boot (/boot/boot)
John Baldwin
jhb at freebsd.org
Thu Mar 1 21:14:58 UTC 2012
On Thursday, March 01, 2012 4:09:58 pm John Baldwin wrote:
> On Thursday, March 01, 2012 3:58:02 pm rank1seeker at gmail.com wrote:
> > ----- Original Message -----
> > From: John Baldwin <jhb at freebsd.org>
> > To: rank1seeker at gmail.com
> > Cc: hackers at freebsd.org, "Roman Divacky" <rdivacky at freebsd.org>
> > Date: Thu, 1 Mar 2012 15:43:25 -0500
> > Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot)
> >
> > > On Thursday, March 01, 2012 3:02:35 pm rank1seeker at gmail.com wrote:
> > > > ----- Original Message -----
> > > > From: John Baldwin <jhb at freebsd.org>
> > > > To: rank1seeker at gmail.com
> > > > Cc: hackers at freebsd.org, "Roman Divacky" <rdivacky at freebsd.org>
> > > > Date: Wed, 29 Feb 2012 16:05:08 -0500
> > > > Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot)
> > > >
> > > > > On Wednesday, February 29, 2012 3:08:36 pm rank1seeker at gmail.com wrote:
> > > > > > ----- Original Message -----
> > > > > > From: John Baldwin <jhb at freebsd.org>
> > > > > > To: rank1seeker at gmail.com
> > > > > > Cc: hackers at freebsd.org, "Roman Divacky" <rdivacky at freebsd.org>
> > > > > > Date: Wed, 29 Feb 2012 11:26:59 -0500
> > > > > > Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot)
> > > > > >
> > > > > > > On Tuesday, February 28, 2012 3:09:06 pm rank1seeker at gmail.com wrote:
> > > > > > > > ----- Original Message -----
> > > > > > > > From: John Baldwin <jhb at freebsd.org>
> > > > > > > > To: rank1seeker at gmail.com
> > > > > > > > Cc: hackers at freebsd.org, "Roman Divacky" <rdivacky at freebsd.org>
> > > > > > > > Date: Mon, 27 Feb 2012 11:23:59 -0500
> > > > > > > > Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot)
> > > > > > > >
> > > > > > > > > On Saturday, February 25, 2012 9:41:48 am rank1seeker at gmail.com wrote:
> > > > > > > > > > > Do you only see the "No " message? Do you see the '/boot.config: /loader'
> > > > > > > > > > > message? (Do you have RBX_QUIET enabled perhaps? (-q)) Do you get the actual
> > > > > > > > > > > boot2 prompt at all?
> > > > > > > > > >
> > > > > > > > > > I don't have RBX_QUIET enabled nor any other flags
> > > > > > > > > >
> > > > > > > > > > Let the pic tell a story:
> > > > > > > > > > http://www.starforce.biz/stage2boot.jpg
> > > > > > > > >
> > > > > > > > > Ahh, this is helpful. You do see the '/boot.config: /loader' message.
> > > > > > > >
> > > > > > > > I've already explained that, numerous times (RE-typing ...)
> > > > > > >
> > > > > > > It was not as obvious before, and you are seeing a failure that no one else
> > > > > > > has reported, so you need to be patient.
> > > > > > >
> > > > > > > > > > Patch eliminates possible error, of manual "intervention"
> > > > > > > > > > That is, a perfectly valid patch being classified as invalid.
> > > > > > > > >
> > > > > > > > > I have no idea what you mean here. However, it seems you don't have junk in
> > > > > > > > > your 'opts' variable anyway.
> > > > > > > >
> > > > > > > > What I meant was that I won't manually(edit file) apply patch, but via 'patch' tool/bin.
> > > > > > >
> > > > > > > Ok.
> > > > > > >
> > > > > > > > > Hmm, you could try adding some more debugging to boot2.c to see exactly what
> > > > > > > > > is failing. For example, does the first call to 'parse()' fail and clear
> > > > > > > > > autoboot?
> > > > > > > >
> > > > > > > > I don't do nor understand c code.
> > > > > > >
> > > > > > > Ok. That will take a bit longer to fix, but that is ok. I've attached a new
> > > > > > > patch with some debugging output. It shouldn't fix the problem yet, but I want
> > > > > > > to see if any of the new messages are output, and when they are output.
> > > > > > >
> > > > > > > > How could it silently loose documented functionality?
> > > > > > >
> > > > > > > Several changes were made to boot2 to make it smaller so it could be compiled with
> > > > > > > clang, and it seems that at least one of those changes must have had a bug.
> > > > > > >
> > > > > > > --
> > > > > > > John Baldwin
> > > > > > >
> > > > > >
> > > > > >
> > > > > > Patch fails at 9.0 RELEASE: (Is this for 9 STABLE?)
> > > > >
> > > > > Nope, patch was made against a 9.0 tree:
> > > > >
> > > > > % svn info .
> > > > > Path: .
> > > > > URL: svn+ssh://svn.freebsd.org/base/releng/9.0/sys
> > > > > Repository Root: svn+ssh://svn.freebsd.org/base
> > > > > Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
> > > > > Revision: 232297
> > > > > Node Kind: directory
> > > > > Schedule: normal
> > > > > Last Changed Author: kensmith
> > > > > Last Changed Rev: 229283
> > > > > Last Changed Date: 2012-01-02 09:45:30 -0500 (Mon, 02 Jan 2012)
> > > > >
> > > > > % svn stat boot/i386/boot2
> > > > > M boot/i386/boot2/boot2.c
> > > > >
> > > > > % svn diff boot/i386/boot2 | md5
> > > > > 888f90f32bd20d1bf7e2d3277d9b697b
> > > > >
> > > > > And the file I sent to you before:
> > > > >
> > > > > % md5 ~/work/patches/boot2_test.patch
> > > > > MD5 (/home/jhb/work/patches/boot2_test.patch) = 888f90f32bd20d1bf7e2d3277d9b697b
> > > > >
> > > > > > I'll give you a hint (which I've mentioned at start)
> > > > > >
> > > > > > In order to expose bug, 2 conditions have to be met:
> > > > > > 1) boot.config in use
> > > > > > 2) daX device (i.e; USB stick)
> > > > > >
> > > > > > That is ...
> > > > > > I've created vnode image. Then, ... when I 'dd' it to HDD's slice, it boots.
> > > > > > BUT when I 'dd' it to USB's slice it hangs.
> > > > >
> > > > > USB booting uses a different chunk of BIOS code, and it may be doing different
> > > > > things which result in uninitialized memory having different values (e.g. the
> > > > > cmd[] array).
> > > > >
> > > > > --
> > > > > John Baldwin
> > > > >
> > > >
> > > > Using new:
> > > > MD5 (boot2_test.patch) = 01cc3a9dda1f1ecbd5125092ebccc476
> > >
> > > Hmmm, it seems you have autoboot == 0, but kname set (but you didn't get the
> > > printf where autoboot is set to 0, and you didn't get the printf where kname
> > > is set to a non-NULL value). I'll update the patch again (same URL), but if
> > > you don't get any new messages, then I suspect you aren't actually using the
> > > new boot2.
> >
> > > You do realize you have to use gpart to install the new boot code
> > > on the USB stick after you have built it, yes?
> >
> > You are kidding me, right?
> > If I haven't used gpart to install PATCHED AND BUILT boot2, THEN on picture taken and given here, as url, WOULDN'T be very custom output!
> > No RELEASE boot2 would output what is displayed on:
> >
> > http://www.starforce.biz/stage2boot.jpg
>
> Huh? Sure it would. That is the same output you have had the entire time.
Lordy, lordy. My firefox on my BSD desktop was caching the image. I just
checked it on another machine and it is indeed different now, so a comedy of
errors all around it seems.
> However, avg@ might have found the actual cause of the bug. And Roman did
> indeed break this earlier. Try the updated boot2_test.patch again.
You should still try this.
--
John Baldwin
More information about the freebsd-hackers
mailing list