How to rip a cd/dvd

Copy all the data from a CD/DVD:

cat /dev/sr0 > data.iso

Note: This will not pick up the MBR from a bootable installation CD or DVD.

Copy all the data from a CD/DVD:

dd if=/dev/sr0 of=/tmp/isofile.iso

Note: This will capture boot information from a bootable CD or DVD.

Create ISO file image copy of CD:

mkisofs -r -R -J -l -L -o /tmp/isofile.iso /mnt/sr0

Note: The CD must be mounted first.