Date: Sat, 15 May 2010 14:01:39 +0200 From: none none <rank1seeker@gmail.com> To: Ken Smith <kensmith@buffalo.edu> Cc: freebsd-hackers@freebsd.org, "Julian H. Stacey" <jhs@berklix.com> Subject: Re: Custom USB layout & sysinstall (Starting FIXIT) Message-ID: <AANLkTikIa-XjaqQ2fSFpiQEijSHeSkFqdpyiIA2yWDRx@mail.gmail.com> In-Reply-To: <4BEDCB32.8070206@buffalo.edu> References: <20100513.205343.421.1@DEV> <201005132211.o4DMB4sG018935@fire.js.berklix.net> <AANLkTimdVE1MQ0FJ0u8Tz8R29kO-kaS_NQrDEtEl4-p2@mail.gmail.com> <4BEDCB32.8070206@buffalo.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 15, 2010 at 12:14 AM, Ken Smith <kensmith@buffalo.edu> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 5/14/10 1:16 PM, none none wrote: >> I've read it, all. >> What he is proposing, is about building our own image flavor. (make-mems= tick.sh) >> Exactly, that act, is an issue here, as it confuses sysinstall's USB det= ection. > > This part of what you say confuses me. =A0I use make-memstick.sh to build > the .img files people are downloading and using to do installs with. > So if you are using it correctly any machine that can use the .img > files I build and we distribute should be able to use what you > produce. Ah, I was unclear. When I've put "make-memstick.sh", in bracket, I was referring to similarity of steps. Not to the usage, of actual make-memstick.sh script. There are 2 types of customizations: A) Content (All in UFS) B) Layout (MBR, slices, boot code, bsdlabel,...) make-memstick.sh script is limited only to customization of A), so I am not using it. And shell command which I utilize are far more complex. I do A) and B) customizations, where B) is a culprit, that confuses sysinst= all. Focus on this: Official FreeBSD memstick.img once 'dd'-ed appears as da0a My edition appears as da0s2a ( because of me doing B) ) Once I turn on my machine, at boot time I select USB as a boot device. Then: BIOS -> MBR of da0 -> slice 2 -> boot loader -> sysinstall Now, while in sysinstall, I decide to go in Fixit mode. When I select a USB device, I get an error msg: "No USB devices found!" Other parts of sysinstall, DO list ad4 (my HDD) and da0 (my USB stick) correctly. >> There are 2 remedies: >> =A0 =A0 1) After loader prompt, INSTEAD of starting sysinstall (as I don= 't >> need it at all), immediately START Fixit >> =A0 =A0 2) Edit /usr/src/usr.sbin/sysinstall/devices.c, at the code line= s, >> posted below and compile sysinstall, so it could recognize USB device, >> on non default USB img layout. >> >> I favor FIRST solution 1). > > There are issues with us doing (1) in a widespread way because there > are hooks in sysinstall that check to see if it is running as init > and it makes lots of decisions based on that. =A0Booting off the install > media results in sysinstall running as init, while if you run it later > (post-install) it's not running as init. So then 2) /usr/src/usr.sbin/sysinstall/devices.c: Code: /* * Find all devices that match the criteria, allowing "wildcarding" as well * by allowing NULL or ANY values to match all. The array returned is static * and may be used until the next invocation of deviceFind(). */ Device ** deviceFind(char *name, DeviceType class) { static Device *found[DEV_MAX]; int i, j; j =3D 0; for (i =3D 0; i < numDevs; i++) { if ((!name || !strcmp(Devices[i]->name, name)) && (class =3D=3D DEVICE_TYPE_ANY || class =3D=3D Devices[i]->typ= e)) found[j++] =3D Devices[i]; } found[j] =3D NULL; return j ? found : NULL; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikIa-XjaqQ2fSFpiQEijSHeSkFqdpyiIA2yWDRx>