Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Apr 2010 08:48:07 -0600
From:      Tim Judd <tajudd@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Fwd: mkuzip and/or geom_uzip changes?
Message-ID:  <v2iade45ae91004010748m7f6b30deh35f60a10f0789327@mail.gmail.com>
In-Reply-To: <201004010838.38794.jhb@freebsd.org>
References:  <x2lade45ae91003310359qa4141380he522aebf47d4e429@mail.gmail.com> <t2qade45ae91003311532h4ccd9b6ft874cccc4417386e0@mail.gmail.com> <201004010838.38794.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/1/10, John Baldwin <jhb@freebsd.org> 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.


I'm sorry, I'm not sure what you're referring to when you are telling me this.

>
>> 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:

I double check at home tonight, but I don't remember any additional md
devices, since I'm running from an MFS_ROOT, i get md0, but that's
all.

I definately do not get any /dev/md?.uzip files.  No .uzips show up.


>
> 	disk=`mdconfig -af /path/to/usr.img`
> 	mount -r /dev/$disk.uzip /usr
>
> --
> John Baldwin
>

I noted it defaulted to cd9660 too.  I hadn't gotten to debugging that
point, since I never get a devnode of .uzip


I'll follow up tonight.



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