Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jan 2012 14:48:24 +0530
From:      Amitabh Kant <amitabhkant@gmail.com>
To:        Jan Henrik Sylvester <me@janh.de>
Cc:        questions-list freebsd <freebsd-questions@freebsd.org>
Subject:   Re: mkisofs increasing iso size by 100 MB
Message-ID:  <CAPTAQBLBETWNrgUqH0jt0sZv86Lg0XUwZjMFX-Or2PbBBvTKHg@mail.gmail.com>
In-Reply-To: <4F0DB6A8.3020308@janh.de>
References:  <CAPTAQBJL2=5O2ia2bk3cKUarro5S10HnsRmpWTtkCxwfbUQ8PA@mail.gmail.com> <4F0DB6A8.3020308@janh.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 11, 2012 at 9:49 PM, Jan Henrik Sylvester <me@janh.de> 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



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