[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bootable pendrive from zip file



Hi,

Luis Muñoz Fuente wrote:
> why does extracting the files from the debian iso increase the
> size so much?

Hard to say if you do not show what you do in particular.


In general an increase of about 120 MB is to be expected because of
expansion of hardlinks:

  $ du debian-12.2.0-amd64-netinst.iso
  643076  debian-12.2.0-amd64-netinst.iso
  $ sudo mount debian-12.2.0-amd64-netinst.iso /mnt/iso
  mount: /dev/loop0 is write-protected, mounting read-only
  $ du -s /mnt/iso
  762497  /mnt/iso

The bulk of duplication is with directory trees /firmware and
/pool/non-free-firmware . Some is with kernels and initrds.


> When I take a folder that occupies 5 GiB and with mkisofs I create an iso
> file, it still occupies 5 GiB.

Not if your disk filesystem supports sparse files and your files contain
substantial areas of unwritten bytes. In that case the ISO will be larger.

> And if I later extract the files it takes up 5 GiB again,

Not if there was a substantial amount of hardlink siblings among your
input files. mkisofs will store them with shared content but Linux will
represent them as independent files.

But an increase of an amd64 netinst ISO from 659 to 1500 MB cannot be
explained by hardlinks alone. Maybe you put it into the ZIP archive
twice ?


Have a nice day :)

Thomas


Reply to: