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

Re: how to check size before burning with growisofs



Hi,

> Without -print-size, can the image producing stream benefits the
> following burning process by loading needed files into memory cache?

If you leave out -print-size and use -o in my genisoimage example then
a full image will get produced. All data file content will be read.
If your RAM is large enough and system load is low then the bytes
should stay in RAM for a while.

You may avoid to spam your disk and RAM with the resulting image
by piping genisoimage into command wc -c . Do not use option -o then.

  size=$(genisoimage ... | wc -c)
  echo $size

will tell the result size in bytes (not in 2048 blocks).
The image output will have few chance to push the input file data
out of RAM.


Another approach would be to let genisoimage write the result to
disk and to burn this result via cdrskin. For that you need an
accurate argument for option -C. No dummy numbers allowed.
I.e.:

  cparam=$(cdrskin dev=/dev/sr0 --grow_overwriteable_iso -msinfo)

  genisoimage -o /tmp/new_session.iso -M /dev/sr0 -C "$cparam" ...

  cdrskin -v dev=/dev/sr0 -multi --grow_overwriteable_iso \
          /tmp/new_session.iso

The option --grow_overwriteable_iso enables use of DVD+RW for
multi-session. This works only with ISO 9660 filesystems.


A -print-size run will only use readdir(3) to learn about directory
contents and perform stat(2) calls to inquire the properties of the
files.
It will not read the content of data files. So it will load at most a
few hundred bytes per file.
It is supposed to be much faster than a image production run.


Have a nice day :)

Thomas


Reply to: