From owner-freebsd-hackers@FreeBSD.ORG Fri May 14 17:16:54 2010 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 1BEB41065678 for ; Fri, 14 May 2010 17:16:54 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9DAAA8FC26 for ; Fri, 14 May 2010 17:16:53 +0000 (UTC) Received: by fxm17 with SMTP id 17so1931332fxm.13 for ; Fri, 14 May 2010 10:16:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=UH4mYC7lz13x25qzSUfg9TkwQbB7pJPzO/XVtHNYaq0=; b=T5bP17MP3GSsD2Gs9ItL3liCuGWcRH66ffjEk+WQhW4KprlmpRZFzNrgr+ikRddkhI RhQwHbeIr0DeErY93XQZ2FztGg011oOmTAOowLFUAgjrD3w8AE0PbTVZOrtFEcsRjnp6 Nrdt1zyhP9qbEo43Np+jZ9aGniAcGQwDfgRFI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=hQm44KRhNCddDhplj18bH2dXC88AegQsN9I3mLVezv9DTvBZCOFiqT8qF432n/5ZoH RF92r2grdzCBbhXpqBt9mWDG85DORre3LonCqa6gz2J62rB+3zFj2qhfeDqcHb9hT0tv 2nFnKekhXaFjK0r9oSfMfeGK7x/fWWxeR5ayU= MIME-Version: 1.0 Received: by 10.223.56.206 with SMTP id z14mr1933025fag.97.1273857412499; Fri, 14 May 2010 10:16:52 -0700 (PDT) Received: by 10.223.118.10 with HTTP; Fri, 14 May 2010 10:16:52 -0700 (PDT) In-Reply-To: <201005132211.o4DMB4sG018935@fire.js.berklix.net> References: <20100513.205343.421.1@DEV> <201005132211.o4DMB4sG018935@fire.js.berklix.net> Date: Fri, 14 May 2010 19:16:52 +0200 Message-ID: From: none none To: "Julian H. Stacey" Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Ken Smith Subject: Re: Custom USB layout & sysinstall (Starting FIXIT) 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: Fri, 14 May 2010 17:16:54 -0000 ----- Original Message ----- From: "Julian H. Stacey" To: rank1seeker@gmail.com Cc: freebsd-hackers@freebsd.org, "Ken Smith" Date: Fri, 14 May 2010 00:11:04 +0200 Subject: Re: Custom USB layout & sysinstall (Starting FIXIT) > Hi, > rank1seeker@gmail.com wrote: > > > So, I downloaded USB stick .img > > Instead of just writing it with dd, I've mounted and dumped it, as I wanted > > custom USB stick, layout. > > > > To cut it short. > > Bootable img file appears as ad0s2a instead of ad0a. > > Once I boot from BIOS->USB stick->slice 2, I enter sysinstall successfully. > > > > Now I wana enter into FIXIT, from sysinstall. > > And I get "No USB devices found!", as well as, at all other parts, of > > sysinstall, that search for USB device. > > I reported the same thing as you a month back. > > http://lists.freebsd.org/pipermail/freebsd-hackers/2010-April/031534.html > > I didn't get as far analysing as you did below. > Ken Smith (cc'd) posted ideas, but I got distracted on to other things. > Ken's post is here: > http://lists.freebsd.org/pipermail/freebsd-hackers/2010-April/031620.html > I've read it, all. What he is proposing, is about building our own image flavor. (make-memstick.sh) Exactly, that act, is an issue here, as it confuses sysinstall's USB detection. There are 2 remedies: 1) After loader prompt, INSTEAD of starting sysinstall (as I don't need it at all), immediately START Fixit 2) Edit /usr/src/usr.sbin/sysinstall/devices.c, at the code lines, posted below and compile sysinstall, so it could recognize USB device, on non default USB img layout. I favor FIRST solution 1). > > > Other parts of sysinstall, DO list ad4 (my HDD) and da0 (my USB stick) > > correctly. > > > > > > I think sysinstall has hardcoded command, to mount da0a and doesn't see > > da0sxa, at all. > > > > So how do I do it manually? > > Emergency Holo Sh is no go. > > > > > > Maybe this part of code is responsible, from file > > /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 = 0; > > for (i = 0; i < numDevs; i++) { > > if ((!name || !strcmp(Devices[i]->name, name)) > > && (class == DEVICE_TYPE_ANY || class == Devices[i]->type)) > > found[j++] = Devices[i]; > > } > > found[j] = NULL; > > return j ? found : NULL; > > } > > > > PS: > > Options --> Rescan Devices, in sysinstall don't work. > > > > Could I start fixit, from loader prompt directly, so I wouldn't even have > > to eneter sysinstall, as I don't need it at all to install FreeBSD? > > Cheers, > Julian > -- > Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com > Mail plain text, Not HTML quoted-printable Base64 http://www.asciiribbon.org >