From owner-freebsd-questions@FreeBSD.ORG Thu Jan 12 09:39:52 2012 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 1A00F106566C for ; Thu, 12 Jan 2012 09:39:52 +0000 (UTC) (envelope-from amitabhkant@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id C38148FC0C for ; Thu, 12 Jan 2012 09:39:51 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so1992210vcb.13 for ; Thu, 12 Jan 2012 01:39:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=RF8Qm0vQBtn5rvuvoYbZhi/P6RapPlbMcP2gOWtBUtA=; b=R/vTFoQs2Ute2UVD54OcchyvkFTo8ISeG979lymQY3lvqS+clzJwxqwcTZg3PEU6oH Owr2obiJuGNF0HFNouTff3jeMINZ7Gm3mDKMVrkx3UkhxvoE/0bMQuZrhz47fuEBc3RD 6JhS1Cs1pytnlMssXxh8oOEJoTeA3bgBDGTas= Received: by 10.220.213.200 with SMTP id gx8mr1677409vcb.13.1326361191117; Thu, 12 Jan 2012 01:39:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.18.239 with HTTP; Thu, 12 Jan 2012 01:39:30 -0800 (PST) In-Reply-To: References: <4F0DB6A8.3020308@janh.de> From: Amitabh Kant Date: Thu, 12 Jan 2012 15:09:30 +0530 Message-ID: To: Jan Henrik Sylvester Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: questions-list freebsd Subject: Re: mkisofs increasing iso size by 100 MB 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: Thu, 12 Jan 2012 09:39:52 -0000 On Thu, Jan 12, 2012 at 2:48 PM, Amitabh Kant wrote: > On Wed, Jan 11, 2012 at 9:49 PM, Jan Henrik Sylvester wrote: > >> On 01/-10/-28163 20:59, Amitabh Kant wrote: >> >>> I am trying to customise the bsdinstall auto script. I can mount the iso >>> (amd64 arch / 9.0 RELEASE) and change the shell script as per my >>> requirement. Once I try to re-create the iso file using mkisofs utility, >>> the size of the final iso increases by 100 MB if -J (joliet) mode is >>> used. >>> If I remove the joliet mode, it still increases by around 97 MB. Even if >>> no >>> changes are made to any of the files, the result is same. >>> >>> The process I have followed is as follows: >>> # mkdir /usr/iso >>> # cd /usr/iso >>> # dd if=/dev/cd0 of=org.iso bs=2048 >>> # mdconfig -a -t vnode -f org.iso -u 0 >>> # mount_cd9660 /dev/md0 /mnt >>> # mkdir staging >>> # cd staging >>> # rsync -a /mnt/ . >>> With Joliet mode >>> # mkisofs -J -R -V CustomBSD -no-emul-boot -b boot/cdboot -iso-level 3 -o >>> /usr/iso/my_custom.iso . >>> Without Joliet mode >>> # mkisofs -R -V CustomBSD -no-emul-boot -b boot/cdboot -iso-level 3 -o >>> /usr/iso/my_custom1.iso . >>> >>> The original iso is 612M, custom.iso is 712M and custom1.iso is 709M. >>> >>> System details: FreeBSD amd64 9.0 RELEASE running inside a virtualbox >>> with >>> 2GB RAM. >>> >>> Where am I going wrong? >>> >> >> There are many hardlinked files on the iso images. By the procedure >> above, you have them included multiple times. >> >> From the rsync manpage: "Note that -a does not preserve hardlinks, >> because finding multiply-linked files is expensive. You must separately >> specify -H." >> >> You will probably want "-cache-inodes" for mkisofs as well (and maybe >> other options). Or you could look at src/release/amd64/mkisoimages.**sh >> for the use of "makefs -t cd9660". >> >> Cheers, >> Jan Henrik >> > > Tried -H with rsync and -cache-inodes in mkisofs. Saw the mkisoimages.sh > and used the same parameters (at least to my understanding), still with the > same result. The only thing left to try is to get it running on a dedicated > machine rather than in a virtualbox. > > Amitabh > Same result on a dedicated machine too. Amitabh