Thursday, June 07, 2007

Creating Ubuntu Addon CD

I, along with my friend salahuddin had been trying to make an addon cd for our Favourite Ubuntu 7.04 Feisty Fawn for those who does not have any internet connection. Salahuddin mainly worked on the package selection and dependency solving while I worked on writing a easy to use script to make the cd-making process easier. After some days hard work we were able to make one. Here is the whole procedure of making an addon cd that is compatible with the official ubuntu cd:

1. First download the packages with dependencies in your hard drive. One way to do this is using apt-get with -dy switch. For example you want to add eclipse in the addon cd. Then


$sudo apt-get install -dy eclipse eclipse-cdt
$sudo apt-get autoclean


By default these files are stored in /var/cache/apt/archives.

2. Now execute this script


#!/bin/sh

mkdir -p addon-ubuntu/dists/fiesty
cd addon-ubuntu/dists
ln -s fiesty/ stable
ln -s fiesty/ unstable
cd ..
mkdir pool
cp `find /var/cache/apt/archives/ | grep deb | grep -v /partial/` pool

dpkg-scanpackages pool /dev/null | gzip -9c > dists/fiesty/Packages.gz
gunzip -c dists/fiesty/Packages.gz > dists/fiesty/Packages
dpkg-scansources pool /dev/null | gzip -9c > dists/fiesty/Sources.gz
gunzip -c dists/fiesty/Sources.gz > dists/fiesty/Sources

echo "Origin: Ubuntu\nLabel: Ubuntu\nSuite: feisty\nVersion: 7.04\nCodename: feisty\nDate: `date -R`\nArchitectures: i386\nComponents: main restricted\nDescription: Ubuntu Feisty 7.04" > dists/fiesty/Release

apt-ftparchive release dists/fiesty >> dists/fiesty/Release
mkdir .disk

echo "Ubuntu 7.04 "Feisty Fawn" - Release i386 (`date +%Y%m%d`)" > .disk/info

cd ..
genisoimage -o ubuntu-addon.iso -r addon-ubuntu
#end of script


3. Now burn the ubuntu-addon.iso into a blank CD/DVD

4. Put the newly burned CD/DVD into the desired PC's CD/DVD drive. Open Synaptic Package Manager. There from the Edit menu selec Add CD rom and Press OK.

Now you can install all the new packages from the CD/DVD you just created. No need to download them from the net!

Back to Blogging

After a failed attempt last year to get back to blogging, I'm trying it again this year. I really wanted to get back, but got busy will...