Re: FreeBSD-11.0-BETA1-amd64-disc1.iso is too big for my 700MB CD-r

From: Glen Barber <gjb_at_FreeBSD.org>
Date: Wed, 13 Jul 2016 14:31:57 +0000
Hi Maxim,

Ok, thanks for the information.  I'm glad you replied, because I what
I was going to do was wrong.  I'm testing things now, and if it works,
would integrate this into the build.

Thank you for providing this information.

Glen

On Wed, Jul 13, 2016 at 07:22:58AM -0700, Maxim Sobolev wrote:
> Glen, UFSFILE here is the path to the UFS file system input image that can
> be created either via attaching file (vnode) with mdconfig, doing newfs
> mdX, mount mdX etc or by using mkimg tool. The UZPFILE is resulting CLOOP
> image, temporary file. ISOFILE is the output file (ISO). Let me know if you
> have some more specific questions, I'll be glad to help.
> 
> -Max
> 
> On Wed, Jul 13, 2016 at 6:52 AM, Glen Barber <gjb_at_freebsd.org> wrote:
> 
> > On Mon, Jul 11, 2016 at 05:23:32PM -0700, Maxim Sobolev wrote:
> > > P.S. Just in case if somebody wants to integrate this method into FreeBSD
> > > liveCD build, we do a bit of trick there by making normal ISO9660 file
> > > system with compressed kernel and relevant boot pieces and then also
> > > sticking in BSD label on the same disk image. It turns out ISO9660 and
> > BSD
> > > disklabel structures do not overlap, so it works nicely since 2005 or
> > > so. Then we append UFS image compressed with mkuzip at the end of it.
> > > Resulting image can be used just as any ISO would. We also cook up UFS
> > with
> > > unique label and then use GEOM_LABEL to easily find relevant file system
> > on
> > > boot regardless of the physical device name.
> > >
> > >   mkuzip -dL -S -s 65536 -o ${UZPFILE} ${UFSFILE}
> > >   mkisofs -b boot/${CDBOOT} -no-emul-boot -r -o ${ISOFILE} ${CDIR}
> > >   eval $(stat -s ${UZPFILE})
> > >   UZPSIZE=$((st_size + 2048 - (st_size % 2048)))
> > >   truncate -s ${UZPSIZE} ${UZPFILE}
> > >   eval $(stat -s ${ISOFILE})
> > >   ISOSIZE=${st_size}
> > >   echo "bytes/sector:  2048"                                            >
> > > ${TDIR}/label.txt
> > >   echo "sectors/unit:  $(((UZPSIZE + ISOSIZE) / 2048))"                >>
> > > ${TDIR}/label.txt
> > >   echo "a:             $((UZPSIZE / 2048)) $((ISOSIZE / 2048)) unused" >>
> > > ${TDIR}/label.txt
> > >   echo "c: $(((UZPSIZE + ISOSIZE) / 2048))                   0 unused" >>
> > > ${TDIR}/label.txt
> > >   truncate -s $((ISOSIZE + UZPSIZE)) ${ISOFILE}
> > >   disklabel -A -R -f ${ISOFILE} ${TDIR}/label.txt
> > >   truncate -s ${ISOSIZE} ${ISOFILE}
> > >   cat ${UZPFILE} >> ${ISOFILE}
> > >
> >
> > I'm very interested in implementing this, provided it solves the
> > disc1.iso size issue.  Could you provide a bit explanation on what the
> > variables above represent?  At the moment, I'm having trouble parsing
> > the file paths and input/output paths.
> >
> > Glen
> >
> >
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"

Received on Wed Jul 13 2016 - 12:31:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:06 UTC