Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Feb 2012 20:11:52 +0100
From:      rank1seeker@gmail.com
To:        hackers@freebsd.org, "John Baldwin" <jhb@freebsd.org>, "Roman Divacky" <rdivacky@freebsd.org>
Subject:   Re: BUG: 9.0 stage 2 boot (/boot/boot)
Message-ID:  <20120224.191152.168.2@DOMY-PC>
In-Reply-To: <201202241223.45255.jhb@freebsd.org>
References:  <20120217.074355.853.1@DOMY-PC> <201202230802.05083.jhb@freebsd.org> <20120224.140554.554.1@DOMY-PC> <201202241223.45255.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message -----=0D=0AFrom: John Baldwin =
<jhb@freebsd.org>=0D=0ATo: rank1seeker@gmail.com=0D=0ACc: =
hackers@freebsd.org, "Roman Divacky" <rdivacky@freebsd.org>=0D=0ADate: =
Fri, 24 Feb 2012 12:23:45 -0500=0D=0ASubject: Re: BUG: 9.0 stage 2 boot =
(/boot/boot)=0D=0A=0D=0A> On Friday, February 24, 2012 9:05:54 am =
rank1seeker@gmail.com wrote:=0D=0A> > ----- Original Message -----=0D=0A> =
> From: John Baldwin <jhb@freebsd.org>=0D=0A> > To: =
freebsd-hackers@freebsd.org=0D=0A> > Cc: rank1seeker@gmail.com, Roman =
Divacky <rdivacky@freebsd.org>=0D=0A> > Date: Thu, 23 Feb 2012 08:02:04 =
-0500=0D=0A> > Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot)=0D=0A> > =
=0D=0A> > > On Friday, February 17, 2012 2:43:55 am rank1seeker@gmail.com =
wrote:=0D=0A> > > > Anyway, after upgrading to 9.0, my USB stick, when =
created, started to =0D=0A> hang =0D=0A> > > at stage 2 boot.=0D=0A> > > =
> I have a custom setup, where BSD label 'a', has a content of =
/boot/*=0D=0A> > > > So when 'a' is being hit by stage 2 boot, there is =
boot.config waiting =0D=0A> for =0D=0A> > > it.=0D=0A> > > > After it =
reads it and displays it's content, it echos 'No' and hangs.=0D=0A> > > > =
=0D=0A> > > > I stare at it and can't believe as boot.config's =
information is correct!=0D=0A> > > > I hit '?' and it list all files in =
'a'.=0D=0A> > > > Then I simply RE-type what is displayed on screen =
(content of =0D=0A> boot.config -> =0D=0A> > > path to loader)=0D=0A> > > =
> And loader kicks in!=0D=0A> > > > =0D=0A> > > > I do this a few times =
more and EACH time I have to RE-type correct info!=0D=0A> > > > Tested on =
other machine, same thing.=0D=0A> > > > =0D=0A> > > > However, this same =
custom layout works for HDD's, but NOT for USB stick.=0D=0A> > > > =
=0D=0A> > > > I've extracted binary installs of 8.2 and 9.0 R:=0D=0A> > > =
> MD5 (8_boot) =3D adb1e84e96bd434e51cafaaa0ef22584=0D=0A> > > > MD5 =
(9_boot) =3D 40f3f6403ebd5e131259d1336b4b50ad=0D=0A> > > > =0D=0A> > > > =
Then:=0D=0A> > > > # gpart bootcode -b 8_boot da0s2=0D=0A> > > > And =
sudenly that USB stick boots, without ANY other change!=0D=0A> > > > Just =
an "old" stage 2 boot code, from R8 was enough.=0D=0A> > > =0D=0A> > > =
Looks like it is thinking that 'kname' is empty.  Ah, I think Roman broke =
=0D=0A> this=0D=0A> > > in 219186:=0D=0A> > > =0D=0A> > >  @@ -474,11 =
+461,7 @@ parse()=0D=0A> > >  			     ? DRV_HARD : 0) + drv;=0D=0A> > >  	=
	dsk_meta =3D 0;=0D=0A> > >  	    }=0D=0A> > > -	    if ((i =3D ep - =
arg)) {=0D=0A> > > -		if ((size_t)i >=3D sizeof(kname))=0D=0A> > > -		    =
return -1;=0D=0A> > > -		memcpy(kname, arg, i + 1);=0D=0A> > > -	    =
}=0D=0A> > > +            kname =3D arg;=0D=0A> > >  	}=0D=0A> > >  	arg =
=3D p;=0D=0A> > >      }=0D=0A> > > =0D=0A> > > Before it only set kname =
if it wasn't an empty string.  Now it always sets=0D=0A> > > kname.  Try =
this change:=0D=0A> > > =0D=0A> > > Index: boot2.c=0D=0A> > > =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D=0A> =
> > --- boot2.c	(revision 231983)=0D=0A> > > +++ boot2.c	(working =
copy)=0D=0A> > > @@ -457,7 +457,8 @@ parse()=0D=0A> > >  			     ? =
DRV_HARD : 0) + drv;=0D=0A> > >  		dsk_meta =3D 0;=0D=0A> > >  	    =
}=0D=0A> > > -            kname =3D arg;=0D=0A> > > +	    if (*arg !=3D =
'\0')=0D=0A> > > +		    kname =3D arg;=0D=0A> > >  	}=0D=0A> > >  	arg =
=3D p;=0D=0A> > >      }=0D=0A> > > =0D=0A> > > -- =0D=0A> > > John =
Baldwin=0D=0A> > > =0D=0A> > =0D=0A> > =0D=0A> > It still doesn't =
work!=0D=0A> > =0D=0A> > And please, next time attach patch in a file =
(unified format), so I would  =0D=0A> have a less hassle (to avoid =
manuall patch application)=0D=0A> =0D=0A> Do you still get 'No ' with no =
other message before it breaks?=0D=0A=0D=0A=0D=0AI get 'No ' with no =
other message before it HANGS waiting for manual input?=0D=0AManual input =
makes it work.=0D=0AI simply RE-type outputed contest of boot.config =
file.=0D=0A=0D=0A=0D=0A> Can you show me the contents of your =
/boot.config file via hd?=0D=0A=0D=0A=0D=0ABoth USB stick and HDD have a =
same boot.config file, =
contents:=0D=0A---=0D=0A/loader=0D=0A---=0D=0A=0D=0A =0D=0A> -- =0D=0A> =
John Baldwin=0D=0A =0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6



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