Building an offline version of Easy Ubuntu - EasyERUbuntu HOWTO
Motivation
Ubuntu has become a popular GNU/Linux distributions and has introduced many new users to the world of GNU/Linux and FOSS. Nevertheless, some felt that new users migrating would find it difficult not being able to perform certain functions such as play DVDs, listening to mp3 etc., even though the platform supports these functions. Getting these packages installed might not be trivial for some newbies even though much of the details has been well documented at http://ubuntuguide.org.
Easy Ubuntu was an attempt to provide a user-friendly front end that made it very easy to install several key packages that were missing in Ubuntu due to possible legal reasons. Unfortunately, the current stable version of Easy Ubuntu doesn’t support an offline mode. The development versions seemed to have a work-in-progress implementation for an offline mode, but that doesn’t seem to support the same user friendly GUI that is available during the network install.
EasyER Ubuntu (pronounced Easier Ubuntu) is an attempt to provide a companion CD for Ubuntu that uses a slightly modified version of Easy Ubuntu. Additionally, the CD is aptable, meaning you can add it as an apt resource using the apt-cdrom tool.
Here is how I made this CD:
Steps
- Downloaded easyubuntu and ran the installer, selecting all packages.
- Install any other packages. If you want you can use the option –download-only to prevent the package from being installed.
- Installed apt-move utility and configured it so that it doesn’t actually delete the package cache (as a result of moving)
- Created the local apt mirror directory
- Ran apt-move to copy the debs from the apt archive
- Because ubuntu repository structure, not all packages are inserted into the Packages.gz file by apt-move. We must remake Packages.gz with the help of apt-ftparchive.
- We need to remake the Release file so we first create a template apt configuration file called myapt.conf
- Next we need to sign the Release file using out GPG key. But first we need to create our GPG key if it doesn’t already exist
- Next, we delete unwanted .apt-move directory
- Next we need to identify the cd by making a .disk directory and making an info file in it.
- Then we need to put our public keys in it.
apt-get --download-only install foo
# apt-get install apt-move
# vi /etc/apt-move.conf
COPYONLY=yes
# rm -rf /mirrors/debian
# mkdir -p /mirrors/debian
# apt-move -d dapper update
# cd /mirrors/debian/dists/dapper
# mkdir -p {non-free,contrib}/binary-i386
For some reason the non-free and contrib directories were missing even though they were present at the /mirrors/debian/pool/ directory.
# apt-ftparchive packages pool/main/ | gzip -9c > dists/dapper/main/binary-i386/Packages.gz
# apt-ftparchive packages pool/multiverse/ | gzip -9c > dists/dapper/multiverse/binary-i386/Packages.gz
# apt-ftparchive packages pool/contrib/ | gzip -9c > dists/dapper/contrib/binary-i386/Packages.gz
# apt-ftparchive packages pool/non-free/ | gzip -9c > dists/dapper/non-free/binary-i386/Packages.gz
Make sure that binary-i386/Release file exists and has the correct component entry.
Archive: contrib
Component: contrib
Origin: APT-Move
Label: APT-Move
Architecture: i386
APT::FTPArchive::Release {
Origin "APT-Move";
Label "APT-Move";
Suite "dapper";
Codename "dapper";
Architectures "i386";
Components "main multiverse contrib non-free";
Description "Ubuntu Updates CD";
};
# rm dists/dapper/Release
# apt-ftparchive -c ~/myapt.conf release dists/dapper/ > Release
# mv Release dists/dapper/
# gpg --gen-key
# gpg -bao dists/dapper/Release.gpg dists/dapper/Release
# rm -rf .apt-move
# mkdir .disk
# echo EasyERUbuntu `date +%Y-%m-%d` > .disk/info
# gpg --export -a "Your Name" > public.key
Easy Ubuntu Hack
- Stop Easy Ubuntu from updating the conf/sources.list file by commenting out detect.replace(confdir) from easyubuntu.in
- Put a static sources.list line that only uses the CD ROM
- We can further modify the EasyUbuntu script to prevent it from running apt-get update on the CD everytime you install a package, which would cause an annoying error message .
###detect.replace(confdir)
deb cdrom:[EasyERUbuntu]/ dapper contrib main multiverse non-free
where “EasyERUbuntu” is the label of the CD, which we define during mkisofs.
Edit EasyUbuntu/gtkprocess.py and look for self.manager.remove(”–update-at-startup”) and comment it out. Also comment out the line synaptic.update()
### self.manager.remove("--update-at-startup") # EasyER Ubuntu Hack
### synaptic.update() # EasyER Ubuntu Hack
Thats it!
Burning and Using
- Copy the modified easyubuntu directory to /mirrors/debian.
- To create the iso
- Before you could use the CD, you need to add our GPG key to apt GPG keys
- Finally add the CD as a source.
- You can now extract the easyerubuntu.tar.gz from the CD to your home directory
- Now you can execute EasyERUbuntu
# tar zcvf /mirrors/debian/easyerubuntu.tar.gz easyubuntu
# mkisofs -r -A "EasyERUbuntu" -o ubuntu-companion.iso /mirrors/debian
# apt-key add /cdrom/public.key
# apt-cdrom add
$ mount /media/cdrom
$ tar zxvf /media/cdrom/ubuntu.tar.gz
$ cd easyubuntu
$ ./launchEU.sh
Issues: While most packages install properly, not all of them do. Most packages in the system tab don't work. These may require a bit more hacking to get working offline.
See Also: AptMoveHowto
Comments
I was bored and googling around, and came to your site. I am one of the devs of the easyubuntu program.
EasyUbuntu now has an "Offline Mode" which supports exactly this. However, most of the process is different.
The way we approached this was to create a script which would download the debs needed, and then we use dpkg-scanpackages to create the repository.
I do like the idea of optionally creating an iso, so I might just go ahead and implement it in the gui.
Yes having an iso is very convenient for the few of us who dont always have broadband access and I think its easier for the newbie user if you distribute a 2 CD pack containing Ubuntu and EasyUbuntu.
Keep up the good work with EasyUbuntu
How about
created mirror-debian-sarge
How to if source from 14CDs