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

Re: identical iso to and from dvd+rw


> please, how to write a given iso file to a medium (dvd+rw in my case) and
> then extract the same iso (same in the sense of length and checksum) from
> the medium? Is this even possible?

Write it to the medium by normal means (dd, growisofs, cdrecord,
cdrskin, ...). The decisive trick is to only read as many bytes
as you wrote.
So memorize the original size of the iso file.

The size of the ISO filesystem inside the file and on medium
can be determined by tools like isosize or xorriso. But this might
be smaller than the size of the image file.
(You decide which of both sizes really does matter to you.)

Whatever, if you have the size then just read that amount from
the medium.

Assumed the size is integer divisible by 2048, use block size 2048
and the division result. E.g. if your file has a size of
4,581,523,456 bytes, then it has 2,237,072 blocks, So use

  dd if=/dev/sr0 bs=2048 count=2237072 of=my_extracted.iso

Have a nice day :)


Reply to: