Home

Main

Friends

Links

Contact

Projects

Misc.

Cygwin Help


Making an ISO image from cd-rom

Find out the number of blocks on the cd-rom as demonstrated below.

    bash$ df

    Filesystem           1k-blocks      Used Available Use% Mounted on
    C:\cygwin\bin         10243768   5636528   4607240  56% /usr/bin
    C:\cygwin             10243768   5636528   4607240  56% /
    c:                    10243768   5636528   4607240  56% /cygdrive/c
    d:                      588620    588620         0 100% /cygdrive/d

    

In the above list, d: corresponds to the cd-rom drive. The number of blocks in the cd-rom drive is 588620. To make iso image use the dd command as follows:

    bash$ dd if=/dev/scd0 of=file_name.iso bs=2048 count=$((588620/2))
    

The number of blocks get divided by 2 to convert blocks to sectors. file_name.iso is the name of the output iso file. /dev/scd0 is the POSIX name mapped to NT cd-rom device.