Thursday, May 13, 2010

ubuntu cdrtools script

It's been a while since I've posted on here, but I thought I'd give the revised version of my cdrtools script that replaces cdrkit... and since I'm using ubuntu at the moment, it is formatted for sudo (though any other distro set up for sudo access should have no trouble).


#compile smake for ubuntu
cd ~
tar -zxf smake-1.2.1.tar.gz
cd smake-1.2.1
sudo cp Gmake.linux /usr/bin/Gmake
sudo make
sudo make install
sudo cp /opt/schily/bin/smake /usr/bin
sudo chmod +x /usr/bin/smake

#compile cdrtools for ubuntu
cd ~
tar -zxf cdrtools-beta.tar.gz
cd cdrtools-2.01.01
sudo smake
sudo smake install

# Ensure root ownership for proper operation
sudo chown root:root /opt/schily/bin/*

# Backup cdrkit files
cd ~
mkdir cdrkitbackup
sudo mv /usr/bin/wodim ~/cdrkitbackup
sudo mv /usr/bin/readom ~/cdrkitbackup
sudo mv /usr/bin/genisoimage ~/cdrkitbackup
sudo mv /usr/bin/btcflash ~/cdrkitbackup
sudo mv /usr/bin/devdump ~/cdrkitbackup
sudo mv /usr/bin/isodump ~/cdrkitbackup
sudo mv /usr/bin/isodebug ~/cdrkitbackup
sudo mv /usr/bin/isoinfo ~/cdrkitbackup
sudo mv /usr/bin/isovfy ~/cdrkitbackup
sudo mv /usr/bin/icedax ~/cdrkitbackup

# Remove soft links to cdrkit programs
sudo rm /usr/bin/cdrecord
sudo rm /usr/bin/cdda2wav
sudo rm /usr/bin/mkhybrid
sudo rm /usr/bin/mkisofs
sudo rm /usr/bin/readcd

# Create soft links to cdrtools programs
# Create soft links to cdrkit naming conventions for compatibility
sudo ln -s /opt/schily/bin/cdrecord /usr/bin/cdrecord
sudo ln -s /opt/schily/bin/cdrecord /usr/bin/wodim
sudo ln -s /opt/schily/bin/mkisofs /usr/bin/genisoimage
sudo ln -s /opt/schily/bin/mkisofs /usr/bin/mkisofs
sudo ln -s /opt/schily/bin/mkhybrid /usr/bin/mkhybrid
sudo ln -s /opt/schily/bin/readcd /usr/bin/readom
sudo ln -s /opt/schily/bin/readcd /usr/bin/readcd
sudo ln -s /opt/schily/bin/cdda2wav /usr/bin/cdda2wav
sudo ln -s /opt/schily/bin/cdda2wav /usr/bin/icedax
sudo ln -s /opt/schily/bin/btcflash /usr/bin/btcflash
sudo ln -s /opt/schily/bin/isodebug /usr/bin/isodebug
sudo ln -s /opt/schily/bin/isodump /usr/bin/isodump
sudo ln -s /opt/schily/bin/isoinfo /usr/bin/isoinfo
sudo ln -s /opt/schily/bin/isovfy /usr/bin/isovfy

there is a harmless error at the end of installation, so don't worry, it will have installed cdrtools correctly. Good luck!


Anonymous said...

Thanks for this script! Just installed this on Kubuntu 10.10.

MS said...

Why install Red Hat packages that will not update?

Install wodim for cdrecord and genisoimage for mkisofs. After you install them they will be in your /bin files. You can find them with the locate command.

sudo apt-get install wodim genisoimage

muaythaimaster said...

These are not Red Hat packages at all... This is the source material for cdrtools.

At the time of the original post, Ubuntu was shipping with cdrkit, which includes wodim and genisoimage. Some of us prefer cdrtools, which includes cdrecord and mkisofs... to which, this script is a guide on how to compile and install in ubuntu.

Manually checking Joerg's website and modifying the script to install new versions is a rather simple matter. Is it more work than relying on apt? of course... is it worth it? I strongly believe that it is.