2021-12-04 - Sorry the Gramps wiki is currently being upgraded to a newer software version. Please check back after the 2021-12-06.

Difference between revisions of "Customizing Ubuntu Desktop CD"

From Gramps
Jump to: navigation, search
(Linux Genealogy CD)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This page describes how to customize the Ubuntu Dekstop CD. This is typically done to showcase certain packages that don't come with the default Ubuntu CD. This information is based on Ubuntu 8.04 and may or may not be applicable to future releases.
+
#REDIRECT [[Linux Genealogy CD]]
 
 
==Brief overview of the process==
 
An extremely general picture is: unpack stuff from CD, add our packages, pack it all back. Now a little more detail on each part.
 
* The whole filesystem of the Ubuntu that will run in the Live session is packed into a single file on the CD. This file is <code>/casper/filesystem.squashfs</code> and one needs the <code>squashfs</code> kernel module to work with such filesystems.
 
* One needs to prepare packages (.deb files) that are to be added to the system. These packages may have dependencies that also need to be downloaded beforehand.
 
* The final CD image may turn up to be more than 700MB after we add our stuff. So some sacrificing of other useless contents might be needed after we add our packages.
 
* There are tricks to pack everything back. They all will be explained below in their respective order.
 
 
 
==Unpacking==
 
This part is by far the easiest. Once you have downloaded the original iso file with the Ubuntu desktop CD, mount it: <pre>mount ubuntu-8.04-desktop-i386.iso mnt -o loop</pre> assuming that you have an empty directory <code>mnt</code> and the iso file in your working directory. Then copy everything into another directory using <code>rsync</code>: <pre>rsync --exclude=/casper/filesystem.squashfs -a mnt/ iso</pre> This will create the directory called <code>iso</code> with the contents of the CD, '''except''' for the largest file <code>/casper/filesystem.squashfs</code> that holds the whole target filesystem.
 
 
 
Next we unpack the target filesystem from that huge file. First we will mount it using another empty directory <code> mnt_sq</code>: <pre>mount mnt/casper/filesystem.squashfs mnt_sq -o loop -t squashfs</pre> And then we <code>rsync</code> from it to a new directory: <pre>rsync -a mnt_sq/ squash</pre> This should create the directory <code>squash</code> with the contents of the target filesystem. Now that we are done with the mounted images, we may unmount them: <pre>umount mnt_sq
 
umount mnt</pre> At this point you should have the directory <code>iso</code> with all the contents on the CD needed for booting the Ubuntu system, and the directory <code>squash</code> with the system itself.
 
 
 
==Adding our packages==
 
For the sake of simplicity, let's assume that you have collected all the packages you want to add in a separate directory <code>new/debs</code> relative to your working directory. That is, there's <code>new</code> dir with the subdir <code>debs</code> where all the deb packages are collected. Let's copy all these packages onto the target filesystem (any place will do for now, but I chose <code>/root</code>): <pre>cp new/debs/* squash/root/</pre> Then we will prepare <code>chroot</code> environment like so: <pre>mount -t proc proc squash/proc
 
mount -t sysfs sysfs squash/sys</pre> and then we will "change root" (<code>chroot</code>) to that target filesystem and install packages. <pre>chroot squash dpkg -i /root/gramps_3.0.1-1_all.deb</pre> Changing root means we will see '''only''' the target filesystem as if we were trully running it it and it were our root filesystem. So the above command changes root to <code>squash</code> and then runs <code>dpkg -i /root/gramps_3.0.1-1_all.deb</code> command to install GRAMPS.
 

Latest revision as of 02:55, 8 October 2011

Redirect to: