From owner-freebsd-questions@FreeBSD.ORG Sat Apr 3 08:02:37 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 196131065670; Sat, 3 Apr 2010 08:02:37 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id B7D198FC0C; Sat, 3 Apr 2010 08:02:36 +0000 (UTC) Received: by iwn12 with SMTP id 12so984300iwn.14 for ; Sat, 03 Apr 2010 01:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:cc:content-type; bh=IH/TWS2MDfLKmkYPloQ2jSXWUF98ZfulxJp6+TRAb7A=; b=YXqBddeXCDaORHv11KdZ9CB31Rw8UmWvit067hQsLRizeMNy2sxI+hDKrICXsjpcQZ 4vuSvwQl5IHC9yOSU90zaDJVEIAKG+LhrPKrKycVPrRgGQSVl0li4CQ1j8hcU/LFL/5n ULhjQRXD4qX157AJhwsVSCMMEdr3reWxHMKT0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=pWWl2lSdUGdd9N5Maoa0h3lbSg3u7RLcKZ0Pa7auwcPpb29Sh4FiJSUAVpZQkhf4Yd nR1RyGA8/lQSJCVcPcWnOznlwm8h868PWqs4WOjNkWkUlwQ0UDNUly6zJ7mIewzqiDJG tcq7+t8ZFKDnYNhLZTd+GxolkYiIEsLiv5Nm4= MIME-Version: 1.0 Received: by 10.231.146.147 with HTTP; Sat, 3 Apr 2010 01:02:36 -0700 (PDT) Date: Sat, 3 Apr 2010 02:02:36 -0600 Received: by 10.231.160.135 with SMTP id n7mr1334504ibx.26.1270281756170; Sat, 03 Apr 2010 01:02:36 -0700 (PDT) Message-ID: From: Tim Judd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Fwd: mkuzip and/or geom_uzip changes? - SOLVED X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 08:02:37 -0000 On 4/1/10, Tim Judd wrote: > On 4/1/10, Tim Judd wrote: >> On 4/1/10, John Baldwin wrote: >>> On Wednesday 31 March 2010 6:32:09 pm Tim Judd wrote: >>>> Hi All, >>>> >>>> Just starting to see if I can find other reports. You all probably >>>> have had the "more than one pair of eyes looking at a thing is better >>>> than my eyes alone." This is why I'm writing now, as I'm starting the >>>> discovery. >>>> >>>> Let me background this a little bit. I only started looking into this >>>> because mkuzip and it's counterpart, geom_uzip are throwing errors on >>>> FreeBSD8 i386 >>>> >>>> >>>> scenario (/etc/src.conf in effect, removing *LOTS* of stuff with >>>> knobs): >>>> make DESTDIR=/home/small8 installworld installkernel distribution >>>> mv /home/small8/boot /home/small8-boot/ >>>> makefs -t ffs /home/small8/usr.img /home/small8/usr/ >>>> mkuzip -o /home/small8/usr.uzip /home/small8/usr.img >>>> [*] >>>> chflags -R noschg /home/small8/usr/* >>>> rm -rf /home/small8/usr/* /home/small8/usr.img >>>> ee /home/small8/etc/rc.d/mountcritlocal >>>> [**] >>>> makefs -t ffs /home/small8-boot/mfsroot /home/small8/ >>>> gzip --best /home/small8-boot/mfsroot >>>> ee /home/small8-boot/boot/loader.conf >>>> [***] >>>> rm /home/small8-boot/boot/kernel/*.symbols >>>> gzip --best /home/small8-boot/boot/kernel/kernel >>>> mkisofs -U -J -r -V "FreeBSD8" -b boot/cdboot -no-emul-boot >>>> -iso-level 4 -o /home/small8.iso /home/small8-boot/ >>>> >>>> >>>> [*]: mkuzip inserts a script header that is broken. module name it's >>>> searching for may have been renamed? >>>> [**]: Edited mountcritlocal to mount the usr.uzip file as by using the >>>> above script header, throws errors >>>> [***]: added zlib and geom_uzip modules to load to the boot image, to >>>> satisfy the script header's requirements. >>>> >>>> OK, the above scenario creates about a 33MB usr.uzip, and a 68MB iso. >>>> Small enough to apparently fit into the undocumented 50 or 100MB size >>>> limit of mfs_root module >>> >>> BTW, you can raise this limit by changing NKPT. >>> >>>> The problem: >>>> mkuzip generates a few lines as a script in the head of the >>>> resulting *.uzip file. Two problems... >>>> 1) the module it queries for is geom_uzip (kldstat -m $m), but >>>> FreeBSD8 names the geom_uzip module (i guess, internally) as g_uzip. >>>> mkuzip's generated image will never find the module if they're not >>>> named the same. >>> >>> It is g_uzip even in 7: >>> >>> DECLARE_GEOM_CLASS(g_uzip_class, g_uzip); >>> MODULE_DEPEND(g_uzip, zlib, 1, 1, 1); >>> >>> This has probably just been broken from the start. If it used 'kldstat >>> -n' >>> then it might work. Well, it probably works (modulo a warning) by >>> accident >>> as >>> it doesn't hurt to kldload an already-loaded module. Note though that >>> it >>> assumes the raw usr.img is an ISO image, not a UFS filesystem. >>> >>>> 2) even with geom_uzip module and it's dependency zlib loaded, i don't >>>> get a mdconfig node '/dev/md?.uzip' to appear. >>>> >>>> It's been forever since I touched uzip, so I have to ask. >>> >>> Do you have a md0 device at all? I think you want to hack the script to >>> do >>> something like this: >>> >>> disk=`mdconfig -af /path/to/usr.img` >>> mount -r /dev/$disk.uzip /usr >>> >>> -- >>> John Baldwin >>> >> >> >> >> booted single-user >> md0 is the mfs_root >> >> here is the manual attachment of an mdconfig... >> # mdconfig -af /usr.uzip >> WARNING: opening backing store: /usr.uzip readonly >> md1.uzip: block size (24) should be a multiple of 512. >> md1 >> # ls /dev/md1* >> /dev/md1 >> # >> > > Forgot the kldstat, which was obviously omitted > > # kldstat > Id Refs Address Size Name > 1 5 0xc0400000 b6e060 kernel > 2 1 0xc0f6f000 3ffc geom_uzip.ko > 3 2 -xc0f73000 ac20 zlib.ko > John, All: Don't spend any more time on this issue as a show-stopper anymore. I understand what was going on enough to realize that the middle line, rather than a warning, was an outright error and the md?.uzip device cannot be presented. When I was trying to diagnose my cascading problems, one of the items I did was to edit (with ee) the usr.uzip binary file. I only used the cursor in the script header part, saved it and tried it out. Evidentally, that screwed the file up. Recreating the .img, converting to a .uzip is working. I'm back on track, no need to continue to search this. enjoy!