个人工具

“UbuntuHelp:LiveCDCustomization”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/LiveCDCustomization}} {{Languages|UbuntuHelp:LiveCDCustomization}} == How To Customize the Hoary/Breezy Ubuntu Live CD == * '''This page is valid...)
 
 
(未显示同一用户的15个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/LiveCDCustomization}}
 
{{From|https://help.ubuntu.com/community/LiveCDCustomization}}
 
{{Languages|UbuntuHelp:LiveCDCustomization}}
 
{{Languages|UbuntuHelp:LiveCDCustomization}}
== How To Customize the Hoary/Breezy Ubuntu Live CD ==
+
== How to Customise the Ubuntu Desktop CD ==
 
+
You may wish to customise the Ubuntu Desktop [[UbuntuHelp:LiveCd|LiveCd]] to:
* '''This page is valid for Ubuntu 5.04 (Hoary Hedgehog) and 5.10 (Breezy Badger).'''
+
* make your own Linux / Ubuntu distribution
* '''For Ubuntu 6.06 LTS (Dapper Drake), see the page [[UbuntuHelp:/6.06]]'''
+
* show off a particular application
 
+
* localise to a certain language
=== Introduction ===
+
* remove software packages
 
+
* add software packages
Here we try to explain how to build a customized Ubuntu LiveCD
+
* update software packages
based on the new Live CD infrastructure (first used in the HoaryHedgehog development cycle). The
+
* change system defaults (theme, icons, desktop background, panels, browser homepage, etc)
method will be to modify an already existing CD and re-build it.
+
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=warning.png This guide is for the Desktop ![[UbuntuHelp:LiveCd|LiveCd]]; there is another page referring to customisation of the [[UbuntuHelp:InstallCDCustomization | Alternative Install Cd]] & the [[UbuntuHelp:InstallCDCustomization | Server Install Cd]] also there is a guide on how to create a ![[UbuntuHelp:LiveCd|LiveCd]] [[UbuntuHelp:LiveCDCustomizationFromScratch|| without using an existing LiveCd.]]
This way is less flexible, but avoids most of the
+
== System Requirements ==
(really unnecessary) complexity of building CDs from scratch.
+
* At least 3-5 GB of free space
 
+
* At least 512 MB RAM and 1 GB swap (recommended)
Why? Well, because some people want to create specialized Live CDs
+
* `squashfs-tools`
to show off a particular application or localized to a certain
+
* `genisoimage`, which provides `mkisofs`
language. If you can think of anything else that can be done,
+
* An Ubuntu kernel with `squashfs` support (present in Ubuntu 6.06 and later)
put it on the wiki.
+
* QEMU/KVM, [[UbuntuHelp:VirtualBox|VirtualBox]] or [[UbuntuHelp:VMware|VMware]] for testing (optional)
 
+
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=warning.png When trying to customize 9.10 Karmic Koala or later in an 9.04 Jaunty Jackalope or earlier environment:  `squashfs-tools` will need to be updated to version 4.0.  Inversely, the version of `squashfs-tools` in Ubuntu 9.10 is not compatible with earlier version of Ubuntu.
The [http://reconstructor.aperantis.com/ Reconstructor] tool can create custom GNOME-based Ubuntu LiveCDs from existing LiveCDs as well. There is also a [https://wiki.ubuntu.com/LiveCDCreator LiveCDCreator] specification that may or may not get implemented.
+
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=warning.png If customizing a CD for another architecture than the installation used for customization the executables from the [[UbuntuHelp:LiveCD|LiveCD]] may not run.  (i.e. it is not trivial to customize an AMD64 CD from an i386 install -- the binaries won't run -- that's needed to customize the CD -- the binaries from the CD to be customized have to run on the "host" system (in order to run `chroot`).)
 
+
== The Process ==
=== System Setup and Requirements ===
+
First, make sure that you have installed the needed tools
 
+
* About 3 gigabytes of available disk space
+
* `cloop-utils` - tools to compress and decompress the filesystem image
+
* `mkisofs`
+
* An Ubuntu kernel, version `2.6.9-7` or later (for the `cloop` module)
+
* A massive amount of swap space (3-5GB). You should be able to store the unextracted FS image in swap TWICE. Else, the recompression process will fail.
+
 
+
If you don't have enough swap, do:
+
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo dd if=/dev/zero of=/tmp/swap bs=1M count=3000
+
sudo aptitude install squashfs-tools genisoimage
$ sudo mkswap /tmp/swap
+
$ sudo swapon /tmp/swap
+
 
</nowiki></pre>
 
</nowiki></pre>
 
+
You need to download an official Desktop CD from http://releases.ubuntu.com/
Copy and paste:  
+
Note: the example shown here uses the ubuntu-9.04-desktop-i386.iso Desktop CD
 +
Move or copy it into an empty directory
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo apt-get install cloop-utils mkisofs
+
mkdir ~/live
$ echo "Kernel version is" $(dpkg-query -W --showformat '${Version}' linux-image-$(uname -r))
+
mv ubuntu-9.04-desktop-i386.iso ~/live
 +
cd ~/live
 
</nowiki></pre>
 
</nowiki></pre>
 
+
=== Extracting the CD contents ===
 
+
Mount the Desktop .iso
=== The Process ===
+
 
+
First you will need to extract the loopback compressed file system image - [http://build.lnx-bbc.org/packages/kernel/cloop.html Cloop], so we would be able to customize it as we see fit - this could usually mean setting up packages and software we would like to have available from the LiveCD, presetting some of its configuration and more. After all our good work is done, we would put everything back, and a new LiveCD is born.
+
 
+
Simple.
+
 
+
==== The Extraction Process ====
+
 
+
NOTE: Before starting make sure your locale is set to C (avoiding Unicode - but don't do this everywhere unless you know what you're doing), this just makes life easier:
+
 
<pre><nowiki>
 
<pre><nowiki>
$ export LC_ALL=C
+
mkdir mnt
 +
sudo mount -o loop ubuntu-9.04-desktop-i386.iso mnt
 
</nowiki></pre>
 
</nowiki></pre>
 
+
Extract .iso contents into dir 'extract-cd'
Grab a CD image from from http://mirror.mcs.anl.gov/pub/ubuntu-iso/ and put it into an empty directory. Make sure it is a Hoary image (Warty uses a different system).
+
 
+
* Mount the image() as a loop device:
+
 
<pre><nowiki>
 
<pre><nowiki>
$ mkdir mnt
+
mkdir extract-cd
$ sudo mount ubuntu-5.04-live-i386.iso mnt -o loop
+
rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd
 
</nowiki></pre>
 
</nowiki></pre>
 
+
=== Extracting the Desktop system ===
* Extract everything except the compressed filesystem to a temporary directory:
+
Extract the SquashFS filesystem
 
<pre><nowiki>
 
<pre><nowiki>
$ rsync --exclude=/casper/filesystem.cloop -a mnt/ extracted_cd
+
sudo unsquashfs mnt/casper/filesystem.squashfs
 +
sudo mv squashfs-root edit
 
</nowiki></pre>
 
</nowiki></pre>
 
+
=== Prepare and chroot ===
* Then we uncompress and extract the compressed filesystem:
+
If you need the network connection within chroot
 
<pre><nowiki>
 
<pre><nowiki>
$ extract_compressed_fs mnt/casper/filesystem.cloop > extracted_fs
+
sudo cp /etc/resolv.conf edit/etc/
 
</nowiki></pre>
 
</nowiki></pre>
 
+
Depending on your configuration, you ''may'' also need to copy the '''hosts''' file
(Cup of tea time, because this takes a while)
+
 
+
* After all this, we are done with the original CD and can unmount it (maybe also delete it if you are short of disk space):
+
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo umount mnt
+
sudo cp /etc/hosts edit/etc/
 
</nowiki></pre>
 
</nowiki></pre>
 
==== Customizations ====
 
 
To do the customizations we mount the now uncompressed filesystem image, use chroot to do our modifications and then start putting everything back together again.
 
 
===== Preparing the chroot =====
 
 
* So, to mount the uncompressed filesystem we do:
 
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo mount extracted_fs mnt -o loop
+
sudo mount --bind /dev/ edit/dev
 +
sudo chroot edit
 +
mount -t proc none /proc
 +
mount -t sysfs none /sys
 +
mount -t devpts none /dev/pts
 
</nowiki></pre>
 
</nowiki></pre>
 
+
(these mount important directories of your host system - if you later decide to delete the edit/ directory, then make sure to unmount before doing so, otherwise your host system will become unusable at least temporarily until reboot)
* Mounting proc and sysfs can also be a good idea:
+
To avoid locale issues and in order to import GPG keys
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo mount -t proc proc mnt/proc
+
export HOME=/root
$ sudo mount -t sysfs sysfs mnt/sys
+
export LC_ALL=C
 
</nowiki></pre>
 
</nowiki></pre>
 
+
=== Customizations ===
* If you want to transfer data from your home directory, the easiest way is a bind mount:
+
==== Apt-get ====
 +
===== Prerequisites =====
 +
In 9.10, before installing or upgrading packages you need to run
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo mount -o bind /home mnt/home
+
dbus-uuidgen > /var/lib/dbus/machine-id
 
</nowiki></pre>
 
</nowiki></pre>
 
+
and
NOTE: Obviously saving space on the compressed filesystem is a a good idea, so during these customizations some parts of the filesystem can be temporarily mounted with tmpfs and unmounted later. That way a lot of space can be saved. Some good targets for these mounts are var/log var/run var/cache/apt var/lib/apt tmp. Just remember to unmount them all before unmounting extracted_fs!!!
+
 
+
===== Language Localizations (hoary) =====
+
 
+
To add support for a specific language to a liveCD, follow the 'Updating Specific Packages' section below to install the appropriate <code><nowiki>language-support</nowiki></code> and <code><nowiki>language-pack</nowiki></code> packages for the desired languages.
+
 
+
You can pre-select a language at boot time with the following process: Edit <code><nowiki>extracted_cd/isolinux/isolinux.cfg</nowiki></code> to add <code><nowiki>preseed/locale=foo_BAR</nowiki></code> to the APPEND section. This will skip the language selection section in the installer, and presumes that you've installed the appropriate language/locale packages.
+
 
+
For example, to support greek, install <code><nowiki>language-pack-el</nowiki></code>, <code><nowiki>language-support-el</nowiki></code>, and add <code><nowiki>preseed/locale=el_GR</nowiki></code> to the isolinux.cfg. Note that the installed files generally require only the language (en, es, el, etc.) while the isolinux.cfg requires the full locale (en_US, en_GB, etc.)
+
 
+
To also set the default keymap, add <code><nowiki>preseed/locale=en_US kbd-chooser/method=us</nowiki></code> to isolinux.cfg.
+
 
+
TODO -
+
* Helping to translate with Rosetta
+
 
+
===== Language Localizations (breezy) =====
+
Same as above, except replace <code><nowiki>preseed/locale</nowiki></code> with <code><nowiki>debian-installer/locale</nowiki></code>, and additionally install <code><nowiki>language-pack-gnome-foo_BAR-base</nowiki></code> or <code><nowiki>language-pack-kde-foo_BAR-base</nowiki></code> besides the language packs above.
+
 
+
===== Updating Specific Packages =====
+
 
+
* If you need to test an additional package on a live CD, it's this easy:
+
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo chroot mnt/ /bin/sh
+
dpkg-divert --local --rename --add /sbin/initctl
# cd dir-holding-all-packages/
+
ln -s /bin/true /sbin/initctl
# dpkg -BOGiE *.deb
+
 
</nowiki></pre>
 
</nowiki></pre>
 
+
===== Tasks =====
This will only update packages that are already installed on the live CD, but have newer versions available.
+
To view installed packages by size
 
+
===== Installing Additional Packages =====
+
 
+
A common use for a LiveCD is to show off an application, normally not already installed on the CD.
+
 
+
NOTE: The default user is created on startup, so if you want to copy a file to the default users home directory, you could place the file in `mnt/etc/skel`.
+
 
+
* Copy in `resolv.conf` (containing already-resolved DNS addresses, because DNS doesn't work inside chroot):
+
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo cp /etc/resolv.conf mnt/etc
+
dpkg-query -W --showformat='${Installed-Size}\t${Package}\n' | sort -nr | less
 
</nowiki></pre>
 
</nowiki></pre>
 
+
When you want to remove packages remember to use purge
* If the packages you wish to add are not available with the default `sources.list`, you may modify it, or copy in your own:
+
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo vi mnt/etc/apt/sources.list
+
aptitude purge package-name
 
</nowiki></pre>
 
</nowiki></pre>
 +
==== Custom Background for GNOME ====
 +
Generally background files are located in '''/usr/share/backgrounds'''. Copy your png file there, adjust owner and file access,  and edit the files:
 +
<ol><li>'''/usr/share/gnome-background-properties/ubuntu-wallpapers.xml''' and
 +
</li><li>'''/usr/share/gconf/defaults/16_ubuntu-wallpapers''' or other files in the same directory.  by changing the string '''/usr/share/backgrounds/warty-final-ubuntu.png''' to point to your file</li></ol>
  
* Finally, we chroot into the chroot and install some packages, updating the apt cache along the way, and making sure to purge instead of just remove anything we want to get rid of:  
+
Eventually change or add attributes to  other configuration files such as: '''/var/lib/gconf/debian.defaults/%gconf-tree.xml''' or '''/etc/gconf/gconf.xml.defaults/%gconf-tree.xml''').
 +
Historical: [http://ubuntuforums.org/showthread.php?t=462810&highlight=warty-final-ubuntu.png More for Dapper...]
 +
==== Change gconf values (fonts, panels etc.) ====
 +
To make any change on the gconf attributes you must add the value that you want in the file '''/etc/gconf/gconf.xml.defaults/%gconf-tree.xml'''. Adding a value in that file will change the default values of Gnome or other applications, so you can change fonts, backgrounds, themes, cursors etc.
 +
Instead of editing the file with '''gedit''' or another text editor, you can use the '''gconftool-2''', under the chroot environment, running the following line:
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo chroot mnt /bin/bash
+
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type string --set yourkey "yourvalue"
# apt-get update
+
# apt-get install banana deadly-weapon
+
# apt-get clean
+
# dpkg --purge foobaz
+
# exit
+
 
</nowiki></pre>
 
</nowiki></pre>
 
+
where ''string'', ''yourkey'' and ''yourvalue'' must be the type, key and value that you want to change...
* To re-generate the manifest to reflect any changes you have made, you must become root or use sudo.  
+
===== Making several gconf changes =====
 
+
Editing gconf by setting each value separately takes too much time. There is a better way:
Then you can re-generate the manifest to reflect any changes you have made.
+
Make a test user and adjust the settings as you wish. Run
 
<pre><nowiki>
 
<pre><nowiki>
$ chroot mnt dpkg-query -W --showformat='${Package} ${Version}\n' > extracted_cd/casper/filesystem.manifest
+
gconftool-2 --dump /the/settings/branch/you/need > ~/live/your-new-settings.xml
# exit
+
sudo chown root:root ~/live/your-new-settings.xml
 +
sudo mv ~/live/your-new-settings.xml ~/live/edit/your-new-settings.xml
 
</nowiki></pre>
 
</nowiki></pre>
 
+
and then, in the chroot environment, run
===== Finding Packages to Remove =====
+
 
+
Obviously removing packages is dangerous; proceed at your own risk :) However, you can find the biggest packages (and hence sometimes the best to remove if you need space) with this command, run in the chroot:
+
 
+
<code><nowiki>dpkg-query -W --showformat='${Installed-Size;10} ${Package}\n' | sort -gr | less</nowiki></code>
+
 
+
TODO :
+
 
+
* Help removing stuff- 'recommended' list of packages to remove, including extra languages and everything that takes a lot of space so you can put your own apps on the CD. Note that you can see what the GNOME liveCD removes in: http://cvs.gnome.org/viewcvs/livecd-project/livecd.conf?view=markup
+
 
+
===== GNOME Customizations =====
+
 
+
A list of GNOME-specific customizations (changing gconf keys, making GDM colors match, etc.) is at [http://live.gnome.org/GnomeLiveCd_2fHowTo the GNOME Wiki.]
+
 
+
===== User-Mode bootsplash customizations =====
+
 
+
You can also customize the colors and the image presented to the user while the services are load. You can even customize the scrollbar colors! For further information, see [[UbuntuHelp:USplashCustomizationHowto]].
+
 
+
/!\ Notice that this this is different than the image showed just after the CD boots up. That image is loaded by the bootload and its customization process is described [[isolinuxsplash just below]].
+
 
+
===== Closing up the chroot =====
+
 
+
* Make sure to unmount everything mounted when setting up the chroot (tmp?? var/log??):
+
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo umount mnt/proc
+
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --load /your-new-settings.xml
$ sudo umount mnt/sys
+
rm /your-new-settings.xml
$ sudo umount mnt
+
 
</nowiki></pre>
 
</nowiki></pre>
 
+
This way you can import the whole branch, e.g. /apps/panel - all settings for Gnome's panels. Note that this way you import not only the keys, but also their descriptions, so all GConf descriptions will be changed to the language which was set for the test user, and there will be no way to safely change them back. Some programs (for example, keyboard shortcuts in Preferences menu) use descriptions from GConf.
===== Customizing the bootsplash =====
+
==== Change default language of gfxboot ====
[[Anchor(isolinuxsplash)]]
+
This customization must be done outside the chroot.
 
+
To create a custom splash screen:
+
* Create an image that is 640 pixels wide by somewhere between 200 and 300 pixels high, with 16 colors. (You can convert to 16 colors in GIMP with the Image->Mode->Indexed... menu item. Unselect "dithering" while converting, for a better result.). As a starting point, you may use [http://www.inkscape.org Inkscape] and this [http://planet.hellug.gr/misc/gnome-greek-logo.svg example file].
+
* Save the image as BMP, or if that is not possible, save to .png and run <code><nowiki>convert splash.png splash.bmp</nowiki></code>
+
* Convert the BMP to RLE format: <code><nowiki>bmptoppm < splash.bmp | ppmtolss16 > splash.rle</nowiki></code> If you're missing these tools, <code><nowiki>bmptoppm</nowiki></code> is in the <code><nowiki>netpbm</nowiki></code> package, and ppmtolss16 is in the <code><nowiki>syslinux</nowiki></code> package.
+
* copy the output (<code><nowiki>splash.rle</nowiki></code>) into <code><nowiki>extracted_cd/isolinux/</nowiki></code>
+
 
+
==== Cleaning up the extracted image ====
+
 
+
Ok, here's the deal: If you deleted files, the corresponding blocks in the extracted_fs file aren't zeroed. Therefore, as far as the create_compressed_fs program (which compresses the extracted_fs image) is concerned, the files are still there. As a result, files you delete won't really improve the amount of free space :(.
+
 
+
So, a quick workaround is to copy the old image onto a new one:
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo mkdir mnt.new
+
sudo aptitude install dpkg-dev uck
$ sudo dd if=/dev/zero of=extracted_fs.new bs=1M count=2000
+
apt-get source gfxboot-theme-ubuntu gfxboot
$ sudo mkfs.ext2 extracted_fs.new
+
cd gfxboot-theme-ubuntu*/
$ sudo mount -o loop,noatime,nodiratime extracted_fs mnt
+
make DEFAULT_LANG=fi
$ sudo mount -o loop,noatime,nodiratime extracted_fs.new mnt.new
+
sudo cp -af boot/* ../extract-cd/isolinux/
$ sudo rsync -avx --progress mnt/. mnt.new/.
+
$ sudo umount mnt mnt.new
+
 
</nowiki></pre>
 
</nowiki></pre>
 
+
Change "fi" to your preferred locale. Note that this does not change which languages are available in the F2 menu. For more info about gfxboot customization, see [http://uck.sourceforge.net/ Ubuntu Customization Kit].
Now, you have a new image, extracted_fs.new, that's both defragmented and cleaned with zeros.
+
* A other way to change the default language of gfxboot without rebuild the packages is to create a file name '''lang''' in the isolinux directory containing your locale's name.
 
+
==== Customization limits ====
==== Putting the CD back together ====
+
After customization make sure that there are no users with an UID > 999. Otherwise your image won't boot because no initial user is available (see /usr/share/initramfs-tools/scripts/casper-bottom/10adduser). While in chroot:
 
+
OK, almost done. We only have to pack up the CD.
+
 
+
* First compress the compressed filesystem and put it back on the CD (Another cup of tea required here):  
+
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo create_compressed_fs extracted_fs.new -B 65536 extracted_cd/casper/filesystem.cloop
+
awk -F: '$3 > 999' /etc/passwd
</nowiki></pre> TIP: If you'd like better compression (MantasKriaučiūnas: don't use cloop-utils from Ubuntu 5.10 with --best, because this version doesn't use 7zip compression and doesn't produce better compression), but with a SIGNIFICANTLY SLOWER (5-fold, at least) process, use:  
+
</nowiki></pre>
 +
If you get any hits, try changing the uid:
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo create_compressed_fs --best extracted_fs.new -B 65536 extracted_cd/casper/filesystem.cloop
+
usermod -u 500 $hit
 
</nowiki></pre>
 
</nowiki></pre>
 
+
==== Miscellaneous Defaults ====
* Then generate md5sum.txt file:  
+
You may wish to edit the files in /etc/default to change system behavior at startup. You might also edit /etc/profile, /etc/bash.bashrc, and /etc/bash_completion to change login settings for all users on the system. You cannot directly edit defaults for the live cd user (e.g., ''casper'', ''ubuntu'', or ''user'') since that account is created at boot time. You can directly edit root's default files (/root in the chroot environment).
 +
If you wish to change the default timezone used by the live cd, run:
 
<pre><nowiki>
 
<pre><nowiki>
$ (cd extracted_cd && find . -type f -print0 | xargs -0 md5sum > md5sum.txt)
+
dpkg-reconfigure tzdata
 
</nowiki></pre>
 
</nowiki></pre>
 
+
If you have added a locale and wish to make it the default, update /etc/default/localeYou may have to compile the locale:
* Then we re-build the cd'''NOTE: ''' This procedure is specific to the Intel x86 (i386) and x86_64 (amd64) live CDs.  Other architectures, such as PowerPC and IA64, will require different command line options.
+
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo mkisofs -r -V "Custom Ubuntu Live CD" \
+
locale-gen new_locale
-cache-inodes \
+
update-locale LANG=new_locale LANGUAGE=new_locale LC_ALL=new_locale
-J -l -b isolinux/isolinux.bin \
+
-c isolinux/boot.cat -no-emul-boot \
+
-boot-load-size 4 -boot-info-table \
+
-o custom-breezy-live-i386.iso extracted_cd
+
 
</nowiki></pre>
 
</nowiki></pre>
 +
These changes must be made as root in the chroot environment.
 +
=== Advanced Customizations ===
 +
==== Live CD Kernel ====
 +
If you want to customize further the boot process, you can change the livecd kernel, by copying the vmlinuz and initrd you want in place of the ones you find in extract-cd/casper.
 +
i.e.
 +
<pre><nowiki>
 +
sudo cp edit/boot/vmlinuz-2.6.15-26-k7 extract-cd/casper/vmlinuz
 +
sudo cp edit/boot/initrd.img-2.6.15-26-k7 extract-cd/casper/initrd.gz
 +
</nowiki></pre>
 +
==== Removing the (Casper) Autologin ====
 +
The autologin feature of the Jaunty/9.04 live CD is a bit of an on-the-fly boot-hack. 
 +
After extracting the initrd.gz, you need to edit the casper-bottom/25configure_init
 +
script and then recreate the initrd.gz file, replacing the original in extract-cd/casper.
 +
The process to do so goes like this:
 +
<pre><nowiki>
 +
# cd extract-cd/casper
 +
# mkdir tempdir
 +
# cd tempdir
 +
# gunzip -dc ../initrd.gz | cpio -imvd --no-absolute-filenames
 +
# cp scripts/casper-bottom/25configure_init scripts/casper-bottom/25configure_init.orig
 +
# vi scripts/casper-bottom/25configure_init
 +
</nowiki></pre>
 +
Now look for line 25 which has the conditional statement to test $USERNAME.
 +
Line 25 performs a conditional evaluation and if it evaluates to true, it will
 +
execute the code within the if block.  The if block contains code to modify
 +
files used in the boot process to create the live cd autologin.
 +
To disable the autologin feature, Remove $USERNAME, but just leave the quotes. 
 +
The -n modifier tests the $USERNAME string to see if it's length is non-zero. 
 +
By removing the variable, and leaving two double quotes, this statement evaluates
 +
to false because the two double quotes effectively make a zero-byte string. 
 +
Be sure to leave no whitespace between the quotes because whitespace will make
 +
the evaluation true and execution wil fall into the if block.
 +
<pre><nowiki>
 +
21:log_begin_msg "$DESCRIPTION"                                                         
 +
22:                                                                                     
 +
23:# Arrange for shells on virtual consoles, rather than login prompts                 
 +
24:                                                                                     
 +
25:if [ -n "$USERNAME" ]; then   
 +
</nowiki></pre>
 +
After making the change, line 25 will look like this:
 +
<pre><nowiki>
 +
25:if [ -n "" ]; then   
 +
</nowiki></pre>
 +
Save the file and quit the editor. Then, from extract-cd/casper/tempdir run the
 +
following command to re-create the initrd.gz file.  There are other methods for
 +
re-creating the initrd.gz file on this page which may work also.:
 +
<pre><nowiki>
 +
# cp ../initrd.gz ../initrd.gz.orig
 +
# find . | cpio -o -H newc | gzip -9 > ../initrd.gz
 +
</nowiki></pre>
 +
This will create a new initrd.gz file with no auto login.  You can then continue
 +
to remaster the CD as described on this page. '''Be sure to create a user and password to login with before you remaster the cd. If you do not, you will not be able to login after booting!'''
 +
Also, I have read a few articles mentioning that Karmic (9.10) uses initrd.lz instead
 +
of initrd.gz.  I do not know if this is true, but should mention it in case you are
 +
not getting the expected results.  To unpack the initrd.lz file, you need to do this:
 +
<pre><nowiki>
 +
# cd extract-cd/casper
 +
# mkdir lztempdir
 +
# cd lztempdir
 +
# lzma -dc -S .lz ../initrd.lz | cpio -imvd --no-absolute-filenames
 +
</nowiki></pre>
 +
And to re-create the initrd.lz file:
 +
<pre><nowiki>
 +
# cp ../initrd.lz ../inird.lz.orig
 +
# find . | cpio --quiet --dereference -o -H newc | lzma -7 > ../initrd.lz
 +
</nowiki></pre>
 +
==== Boot init ====
 +
You have to edit the files in edit/usr/share/initramfs-tools/scripts/casper-bottom/*
 +
For example you can change the hostname or the livecd user.
 +
i.e.
 +
<pre><nowiki>
 +
sudo nano edit/usr/share/initramfs-tools/scripts/casper
 +
</nowiki></pre>
 +
and edit the username or hostname
 +
<pre><nowiki>
 +
sudo nano edit/usr/share/initramfs-tools/scripts/casper-bottom/10adduser
 +
</nowiki></pre>
 +
to edit even the livecd user's password.
 +
P.S. in order to obtain an encrypted password, you have to use the mkpasswd program that's shipped with whois package!
 +
==== Rebuilding initrd ====
 +
After you've modified the kernel, init scripts or added new kernel modules, you need to rebuild the initrd.gz file and substitute it into the casper directory.
 +
<pre><nowiki>
 +
sudo chroot edit
 +
mkinitramfs -o /initrd.gz 2.6.15-26-k7
 +
</nowiki></pre>
 +
(replace the kernel version with the one that the CD will boot with - this can be found in edit/lib/modules)
 +
Exit from the chroot jail and move this file to extract-cd/casper:
 +
<pre><nowiki>
 +
exit
 +
mv edit/initrd.gz extract-cd/casper/
 +
</nowiki></pre>
 +
=== Cleanup ===
 +
Be sure to remove any temporary files which are no longer needed, as space on a CD is limited. A classic example is downloaded package files, which can be cleaned out using:
 +
<pre><nowiki>
 +
aptitude clean
 +
</nowiki></pre>
 +
Or delete temporary files
 +
<pre><nowiki>
 +
rm -rf /tmp/* ~/.bash_history
 +
</nowiki></pre>
 +
Or nameserver settings
 +
<pre><nowiki>
 +
rm /etc/resolv.conf
 +
</nowiki></pre>
 +
If you installed software, be sure to run
 +
<pre><nowiki>
 +
rm /var/lib/dbus/machine-id
 +
</nowiki></pre>
 +
and
 +
<pre><nowiki>
 +
rm /sbin/initctl
 +
dpkg-divert --rename --remove /sbin/initctl
 +
</nowiki></pre>
 +
from within the chroot environment.
 +
now umount (unmount) special filesystems and exit chroot
 +
<pre><nowiki>
 +
umount /proc
 +
umount /sys
 +
umount /dev/pts
 +
exit
 +
sudo umount edit/dev
 +
</nowiki></pre>
 +
Note: if "umount /proc" command fails try "umount -lf /proc"
 +
=== Putting the CD together ===
 +
Regenerate manifest
 +
<pre><nowiki>
 +
chmod +w extract-cd/casper/filesystem.manifest
 +
sudo chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract-cd/casper/filesystem.manifest
 +
sudo cp extract-cd/casper/filesystem.manifest extract-cd/casper/filesystem.manifest-desktop
 +
sudo sed -i '/ubiquity/d' extract-cd/casper/filesystem.manifest-desktop
 +
sudo sed -i '/casper/d' extract-cd/casper/filesystem.manifest-desktop
 +
</nowiki></pre>
 +
Compress filesystem
 +
<pre><nowiki>
 +
sudo rm extract-cd/casper/filesystem.squashfs
 +
sudo mksquashfs edit extract-cd/casper/filesystem.squashfs -nolzma
 +
</nowiki></pre>
 +
Note: The -nolzma option is only available from Hardy , and was removed in Karmic.  Also, the squashfs has to be generated using a version of mksquashfs that is compatible with the kernel used on the CD you are customizing.  For example, you cannot generate a jaunty squashfs on karmic, as the jaunty kernel is not able to mount a squashfs prepared using mksquashfs from karmic.
 +
Set an image name in extract-cd/README.diskdefines
 +
<pre><nowiki>
 +
sudo vim extract-cd/README.diskdefines
 +
</nowiki></pre>
 +
(you can use "sudo nano extract-cd/README.diskdefines" if you have difficulties understanding vim)
 +
Remove old md5sum.txt and calculate new md5 sums
 +
<pre><nowiki>
 +
cd extract-cd
 +
sudo rm md5sum.txt
 +
find -type f -print0 | sudo xargs -0 md5sum | grep -v isolinux/boot.cat | sudo tee md5sum.txt
 +
</nowiki></pre>
 +
Create Iso
 +
<pre><nowiki>
 +
sudo mkisofs -D -r -V "$IMAGE_NAME" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../ubuntu-9.04.1-desktop-i386-custom.iso .
 +
</nowiki></pre>
 +
=== Testing the CD ===
 +
Test using qemu emulator
 +
<pre><nowiki>
 +
qemu -cdrom ubuntu-9.04.1-desktop-i386-custom.iso -boot d -m 512
 +
</nowiki></pre>
 +
Or if you have hardware acceleration for kvm
 +
<pre><nowiki>
 +
kvm -cdrom ubuntu-9.04.1-desktop-i386-custom.iso -boot d -m 512
 +
</nowiki></pre>
 +
You can also test with virtualbox-ose, which is free software and available in the Ubuntu universe repository.
 +
==== Troubleshooting ====
 +
Some experience problems virtualizing the iso after changing the livecd linux kernel. If you do, go click F6 when the boot screen is showing. Move the cursor between splash quiet and -- and write: all_generic_ide
 +
=== Burning the image to CD ===
 +
Simple! Just do
 +
<pre><nowiki>
 +
cdrecord dev=/dev/cdrom ubuntu-9.04-desktop-i386-custom.iso
 +
</nowiki></pre>
 +
=== Additional uses for the image ===
 +
[[UbuntuHelp:Installation/FromUSBStick|Install|Ubuntu from a USB stick]]
 +
[[UbuntuHelp:Installation/FromImageLoadedOnHardDrive|Installation|From Image Loaded On Hard Drive]]
 +
== Comments ==
 +
If you have any comments or questions, please feel free to add them here.
 +
If you are answering a question, please rewrite the question into a tip that answers the question. (to help keep things to the point.)
 +
New questions at the bottom (I guess.)
 +
----
 +
I have created an small Customization Example (named Firebird Live CD) by adding an firebird2.1-superand flamerobin packages (this apply to ubuntu Hardy Heron also it was tested with xubuntu 8.04)
 +
http://flamerobin.blogspot.com/2008/08/creating-flamerobinfirebird-livecd-with.html
 +
----
 +
Warning: qemu did not work for me as given in the guide above. Even the normal 8.04 live cd would not boot correctly. Every time, I would get thrown into the ash shell (busybox, initramfs) and while there, a "cat /casper.log" would reveal that it was "Unable to find a medium containing a live filesystem". Just use virtualbox-ose. It actually works with virtualbox. However, after using apt-get to install virtualbox-ose, I had to run "sudo depmod" again in order for the vboxdrv module to be found by modprobe. Hope that helps!
 +
-[[UbuntuHelp:rocketman768|rocketman768]]
 +
----
 +
Warning: Squashfs is currently in development and is thus not finalized as a format. This means you cannot assume a filesystem.squashfs created using the Ubuntu 9.04 version of makesquashfs will be compatible with the squashfs drive an older live CD. I was customizing an Ubuntu 7.10 [[UbuntuHelp:LiveCD|LiveCD]] and when testing it always booted it an (initramfs) prompt--the squashfs was not getting mounted as /. I had to build from within an Ubuntu 7.10 chroot to get it to work.
 +
--Bob/Paul
 +
----
 +
I have created an small Customization Example (named Firebird Live CD) by adding an firebird-super-server and flamerobin packages (this apply to ubuntu dapper drake)
 +
http://flamerobin.blogspot.com/2006/05/creating-flamerobinfirebird-live-cd.html
 +
I created an updated guide with Ubuntu Festy Fawn also with an iso download for the Firebird/Flamerobin live cd
 +
http://flamerobin.blogspot.com/2007/09/creating-flamerobinfirebird-livecd-with.html
 +
----
 +
I have created tool for automatic remastering of live CD images. See http://uck.sourceforge.net/ .
 +
Features:
 +
* GUI for simple creation of localized CDs (including changing gfxboot and installing language packs)
 +
* Script for customization of ISO, SquashFS and initrd on live CD.
 +
----
 +
http://www.atworkonline.it/~bibe/ubuntu/custom-livecd.htm seems to have some nice info. no license that I can see so we would need to ask permission from the author to us its material.
 +
----
 +
If you want to make the CD boot faster, you might try sorting the files so that they are in the CD in the order that they are accessed: http://lichota.net/%7Ekrzysiek/projects/kubuntu/dapper-livecd-optimization/
 +
----
 +
Great How To.  I am having one issue however.  I would like to use custom xorg.conf and sources.list files.  Any tips on doing this?  Thanks.
 +
* Simply, copy the files to edit/etc/ in the same way (and at the same time) that you copy in the resolv.conf and hosts files.
 +
* I have found that copying xorg.conf doesn't work, as the boot-time scripts overwrite it. Besides, you can't guarantee that a particular xorg.conf will run on all hosts. I'm currently trying to get the binary NVIDIA drivers to work out of the box if an NVIDIA card is present. If I figure out how to fix the xorg.conf, I'll post it here. --JeremyVisser
 +
----
 +
I've managed to get Synaptic running from within the chroot environment, but it does hang when I try to apply packages.
 +
What you do is run "Xnest -ac :1" to get an Xnest server to run on display :1 without access control so anyone can connect to it. Then, in the chroot environment, run "export DISPLAY=:1" to get programs to use the display. Then, type "metacity &" to be able to move windows. Finally, run "synaptic".
 +
It works fine until you try to apply packages, where it hangs for me. --JeremyVisser
 +
----
 +
Shouldn't the mkinitramfs command use the casper scripts, like "mkinitramfs -o initrd.gz 2.6.15-23-386 -d /usr/share/initramfs-tools"?
 +
----
 +
There are tricks on how you can get to feel the GNOME system in your chroot environment.
 +
1. Copy your xorg.conf in the chrooted "etc/X11/" directory.
  
On PowerPC, download [http://people.ubuntu.com/~cjwatson/hfs.map], then use the following command:
 
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo mkisofs -r -V "Custom Ubuntu Live CD" \
+
cp /etc/X11/xorg.conf edit/etc/X11/
--netatalk -hfs -probe -map hfs.map \
+
-chrp-boot -iso-level 2 -part -no-desktop \
+
-hfs-bless extracted_cd/install \
+
-hfs-volid Ubuntu/PowerPC_breezy \
+
-o custom-breezy-live-powerpc.iso extracted_cd
+
 
</nowiki></pre>
 
</nowiki></pre>
 +
2. Create generic devices on your chroot system using MAKEDEV
  
On ia64:
 
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo mkisofs -r -V 'Custom Ubuntu 5.10 live ia64' \
+
cd /dev/
-o custom-breezy-live-ia64.iso -no-emul-boot \
+
MAKEDEV generic
-J -b boot/boot.img -c boot/boot.catalog extracted_cd
+
 
</nowiki></pre>
 
</nowiki></pre>
 +
3. Start X or restart gdm
  
And we are done!
 
 
=== Useful scripts: livecd_tools ===
 
 
All the above commands are resumed in this set of scripts: [https://help.ubuntu.com/community/LiveCDCustomization?action=AttachFile&do=get&target=livecd_tools-0.0.1.tgz livecd_tools v0.0.1]. This package includes the following commands:
 
 
livecd_extractcd:
 
Extracts the Live CD content and uncompress the compresed filesystem.
 
Needs to run as root, it mounts the iso using the loop device
 
 
livecd_createcd:
 
Compress the filesystem and creates the Live CD iso image.
 
 
livecd_mountfs:
 
Mount a filesystem with a linux instalation, mounting
 
temporal directories with tmpfs.
 
 
livecd_umountfs:
 
umount a filesystem with a linux instalation, umounting temporal directories
 
 
livecd_swap:
 
Creates and activates a temporal swap file
 
 
With this tools you can do:
 
 
<pre><nowiki>
 
<pre><nowiki>
# ./livecd_tools-0.0.1/livecd_extractcd ubuntu-live.iso
+
/etc/init.d/gdm start
# ./livecd_tools-0.0.1/livecd_mountfs -t livecd_fs.ext2 mnt
+
... Modify the instalation ...
+
# ./livecd_tools-0.0.1/livecd_umountfs mnt
+
# ./livecd_tools-0.0.1/livecd_swap start
+
# ./livecd_tools-0.0.1/livecd_createcd myubuntu-live.iso
+
 
</nowiki></pre>
 
</nowiki></pre>
 +
Supposed you want to make modifications on the Desktop, that will be used by all the new users,
 +
just change your $HOME to /etc/skel/ and start gdm or X.
 +
<pre><nowiki>
 +
export HOME=/etc/skel/
 +
</nowiki></pre>
 +
If you want to load all the other stuff GNOME needs (i.e, dbus, avahi, network-manager),
 +
just boot as (single-user mode), and start dbus in your chrooted environment.
 +
<pre><nowiki>
 +
/etc/init.d/dbus start
 +
</nowiki></pre>
 +
An example of the whole procedure. (under single-user mode)
 +
<pre><nowiki>
 +
sudo /etc/init.d/networking restart
 +
sudo cp /etc/resolv.conf edit/etc/
 +
sudo cp /etc/X11/xorg.conf edit/etc/X11/
 +
sudo chroot edit
 +
mount -o none /proc
 +
mount -o none /sys
 +
export HOME=/etc/skel/
 +
cd /dev/
 +
MAKEDEV generic
 +
/etc/init.d/dbus start
 +
/etc/init.d/gdm start
 +
</nowiki></pre>
 +
--- [[UbuntuHelp:joelbryan|joelbryan]]
 +
----
 +
Hello,
 +
I am about to build a new Livecd and have a question:
 +
When I change the username, hostname and the user's password the user login automatically during booting the livesystem. But this is not desired. Is it correct, that I have to enter a password under a Desktop [[UbuntuHelp:LiveCD|LiveCD]] when I delet the encrypted password in /usr/share/initramfs-tools/scripts/casper-bottom/10adduser ?
 +
Thanks
 +
Changing username and password will not change login behaviour, because this is done in /usr/share/initramfs-tools/scripts/casper-bottom/15autologin
 +
--- [[UbuntuHelp:Alexander Hosfeld|Alexander Hosfeld]]
 +
----
 +
Having trouble starting a MySQL server from within the chroot jail. Any suggestions?
 +
- Dave
 +
Hey,
 +
I am trying to make a customized live cd of Kubuntu 6.06 that will be completly preconfigured, so that when the user clicks on the install icon on KDE the installer should do everything by itself, meaning that the installer should not ask any questions to the user.
 +
To do this I am trying to write a preseed file to tell the installer the information that it needs.
 +
The problem is that even with this preseed file I could only tell the installer what is the username that it should use, the rest of the information is simply ignored by the installer.
 +
I must be doing something wrong and would appreciate any and all help given me.
 +
Thanks,
 +
Komyg
 +
PS: Should I post my preseed file here?
 +
----
 +
If the livecd is not going to be used for the purposes of installing what files can be removed? Can the "pool" files containing the .debs be removed too?
 +
- Mike
 +
----
 +
If I want to put in my [[UbuntuHelp:LiveCD|LiveCD]] applications that aren't in the sources.list (like ooffice 2.2 or perl audio converter), what cain I do?
 +
- Isoldanne
 +
When you're in the chroot you can install applications just like you would on a live system. If you install from source you can feel free to delete the source tarbal and make folders after you do 'make install'.
 +
- Bob/Paul
 +
----
 +
To get desired <code><nowiki>/etc/X11/xorg.conf</nowiki></code> one can modify the <code><nowiki>/usr/bin/dexconf</nowiki></code>.
 +
This script generates xorg.conf automatically in liveCD session
 +
according to the booted machine.
 +
For example:
 +
<pre><nowiki>
 +
# diff ~/bin/dexconf /usr/bin/dexconf
 +
268,269c268
 +
< Option "XkbLayout" "us,il"
 +
< Option          "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
 +
---
 +
> Option "XkbLayout" "$XKB_LAYOUT"
 +
</nowiki></pre>
 +
-- yotam
 +
----
 +
I cant do chroot. When i run it a get this error
 +
chroot: cannot run command `/bin/bash': No such file or directory
 +
Please help me out
 +
I had the same problem because the filesystem that I was working on was FAT32 instead of EXT2 or EXT3. Because of that, /bin/bash was not an executable I guess. If that is your case also, then please try again on a partition that is EXT2 or EXT3 (the Linux type of partition).
 +
Good luck,
 +
--[[UbuntuHelp:vvim|vvim]]
 +
----
 +
Hi, I've created a simple script to ease remastering the Kubuntu Live CD. It uses aufs to avoid copying all the files back and forth.
 +
Maybe it will be usefull to others too. The script must be run as root.
 +
<pre><nowiki>
 +
#!/bin/bash
 +
CD="${1:-kubuntu-9.04-desktop-i386.iso}" ; shift
 +
# exit after any error:
 +
set -e
  
This scripts accept options to tune paths. Read `Readme.txt`
+
which mkisofs mksquashfs tempfile sed
  
 +
WDIR=`mktemp -d $PWD/kubuntu-remastered.XXXXXXXXXX`
 +
ISO="$WDIR/${CD##*/}"
 +
ISO="${ISO%.iso}-remastered-KDM.iso"
 +
EXIT=""
 +
function addExit {
 +
    EXIT="$@ ; $EXIT"
 +
    trap "$EXIT" EXIT HUP TERM INT QUIT
 +
}
 +
function mnt {
 +
    local margs="$1" ; shift
 +
    local mp="$WDIR/$1"
 +
    for D in "$@" ; do
 +
mkdir -v -p "$WDIR/$D"
 +
    done
 +
    mount -v $margs "$mp"
 +
    addExit "umount -v $mp"
 +
}
  
 +
# mount the CD image
 +
mnt "-t auto $CD -o loop,ro" cd
  
 +
# mount compressed filesystem
 +
mnt "-t squashfs $WDIR/cd/casper/filesystem.squashfs -o ro,loop" sq
  
=== More information ===
+
# create joined writable filesystem for the new CD
 +
mnt "-t aufs -o br:$WDIR/cd-w=rw:$WDIR/cd=ro none" cd-u cd-w
  
The LiveCD is based on the Ubuntu installer and uses its infrastructure to
+
# create joined writable filesystem for the new compressed squashfs filesystem
bootstrap the system.  An additional installer component (`casper`) is used to load the live environment after bootstrap is complete.
+
mnt "-t aufs -o br:$WDIR/sq-w=rw:$WDIR/sq=ro none" sq-u sq-w
  
Perhaps you can find more information here: LiveCDDesign, LiveCD. Or look at
+
echo ">>> Updating CD content"
the code by downloading casper and the debian installer
+
(apt-get source casper debian-installer).  NOTE: no source code modifications of any kind are necessary in order to customize live environment (for example, installing additional packages).  This is purely informational.
+
  
From GrantEmsley Tue Apr 12 17:31:58 +0100 2005
+
(
From: Grant Emsley
+
    cd sq-u
Date: Tue, 12 Apr 2005 17:31:58 +0100
+
Subject: Live DVD
+
Message-ID: <[email protected]>
+
  
Would I do the same thing to make a Live DVD?  I assume some steps (esp. the mkisofs command) would be different for a DVD.
+
    # DO YOUR CUSTOMIZATION STUFF HERE, CHROOT, MODIFY FILES, ETC.
 +
    # ...
 +
    # ...
  
From unknown Sun May 8 05:34:13 +0100 2005
+
)
From:
+
Date: Sun, 08 May 2005 05:34:13 +0100
+
Subject:
+
Message-ID: <[email protected]>
+
  
This page belongs in
+
echo ">>> Compressing filesystem"
Releases  >>  HoaryHedgehog  >>  LiveCD  >>
+
mksquashfs $WDIR/sq-u/ $WDIR/cd-u/casper/filesystem.squashfs -noappend
not in
+
Releases  >>  WartyWarthog  >>  LiveCD  >>
+
  
From unknown Sun May 8 05:37:34 +0100 2005
+
echo ">>> Recomputing MD5 sums"
From:
+
( cd $WDIR/cd-u && find . -type f -not -name md5sum.txt -not -path '*/isolinux/*' -print0 | xargs -0 -- md5sum > md5sum.txt )
Date: Sun, 08 May 2005 05:37:34 +0100
+
Subject: InstallCDCustomizationHowTo InstallDVDCustomizationHowTo
+
liveDVDCustomizationHowTo
+
Message-ID: <20050508053734+0100@www.ubuntulinux.org>
+
  
are the InstallCDCustomizationHowTo, InstallDVDCustomizationHowTo, liveDVDCustomizationHowTo available,.. planned?
+
echo ">>> Creating ISO image $ISO"
 +
mkisofs \
 +
    -V "Custom KUbuntu Live CD" \
 +
    -r -cache-inodes -J -l \
 +
    -b isolinux/isolinux.bin \
 +
    -c isolinux/boot.cat \
 +
    -no-emul-boot -boot-load-size 4 -boot-info-table \
 +
    -o "$ISO" \
 +
    $WDIR/cd-u
  
From JordiMassaguerPla Tue Jun 7 18:14:34 +0100 2005
+
# The trap ... callbacks will unmount everything.
From: Jordi Massaguer Pla
+
</nowiki></pre>
Date: Tue, 07 Jun 2005 18:14:34 +0100
+
--- Petr Pudlak
Subject: needed enough swap space
+
----
Message-ID: <20050607181434+0100@https://www.ubuntulinux.org>
+
I need to know how to configure the live cd so that it does not use SWAP!
 
+
Please help me!
In order to use the "create_compressed_fs" tool, you must have enough swap space. Having enough swap space, means having a big swap partition and, in some cases, cleaning it. By having enough I mean around 5Gb (at least). Cleaning the swap parition could be done like this (before using the create_compressed_fs):
+
-- iceman
 
+
----
sudo mkswap /dev/hda4
+
Hi, I've been experiencing problems with aptitude and I'm pretty sure its because I'm doing all this stuff on NTFS partition (according to this thread http://ubuntuforums.org/showthread.php?t=521905). But I have no other choice,coz' I've got less then 1,7GB on my ext3 partition. Any suggestion ? THX
sudo swapon -a
+
Error messages I've been getting, when trying to install or update aptitude:
 
+
"E: Couldn't make mmap of 25165824 bytes - mmap (19 No such device)
Replace /dev/hda4 by your swap partition
+
W: Unable to munmap
Be very careful when cleaning your partition. Make sure that you do it on your swap partition and that you are not running any crucial programs that could be using your swap space.
+
E: The package lists or status file could not be parsed or opened."
Also, be very careful if you resize your swap partition, and thus, you change your partition table.
+
-heethen (heethen at centrum dot cz)
 
+
----
 
+
I would suggest creating an ext3 filesystem within your NTFS partition.  To create the file, type
 
+
dd if=/dev/zero of=/mnt/hda1/workspace.img bs=1024 count=$((1024*1024*15))
From LuisVilla Tue Jun 7 18:24:55 +0100 2005
+
Where I assumed your NTFS partition was on hda1, and you wanted to call the new filesystem workspace.img (it's really just a file within NTFS), and that you wanted 15Gb of room to work. (You don't need that much, but with 15Gb you should have plenty of room.)
From: Luis Villa
+
Then you format the new filesystem with the command
Date: Tue, 07 Jun 2005 18:24:55 +0100
+
sudo /sbin/mkfs.ext3 /mnt/hda1/workspace.img
Subject: swap space size
+
then create a mountpoint
Message-ID: <20050607182455+0100@https://www.ubuntulinux.org>
+
sudo mkdir /mnt/workspace
 
+
then mount the new filesystem
Jordi, are you sure on that? I've been making liveCDs with only 1.5G of swap (though tons of other free space.) Are you sure you're not confusing swap and other free space?
+
sudo mount -o loop /mnt/hda1/workspace.img /mnt/workspace
 
+
You can then use as much space on the NTFS partition as you want, and have all the benefits of ext3 (like getting the *** thing to work).
 
+
--Tom
 
+
----
From ArneCaspari2 ( Arne Caspari )
+
Editing gconf by setting each value separately takes too much time. There is a better way:
 
+
Make a test user and adjust the settings as you wish. Run
===== Debconf Questions =====
+
<pre><nowiki>
To skip all questions during startup ( ie. let the CD not to ask for the screen resolution ), add <code><nowiki>DEBCONF_PRIORITY=critical</nowiki></code> to the APPEND string in <code><nowiki>extracted_cd/isolinux/isolinux.cfg</nowiki></code>.  
+
gconftool-2 --dump /the/settings/branch/you/need > ~/live/your-new-settings.xml
 
+
sudo chown root:root ~/live/your-new-settings.xml
===== Default User =====
+
sudo mv ~/live/your-new-settings.xml ~/live/edit/your-new-settings.xml
The easiest way to create a usefull default for the live CD user is to boot once with the customized CD, then do all the actions to create the default settings ( ie. change the desktop background; create symlinks on the Desktop and so on ). Then log out and select "Save current setup" on the logout window ( this will save the session obviously so all windows that are still open while logging off will be opened when the CD starts ). After logout, change to a console ( eg. by pressing CTRL+ALT+F1 ) and create a TAR archive of the user's home directory. Copy this archive to a permanent storage ( ie. a network share or onto an USB stick ). Put the contents of the TAR archive into mnt.extracted_fs/etc/skel and recreate the CD. The new defaults will be copied when the user is created during the boot process.  
+
</nowiki></pre>
 
+
and then, in the chroot environment, run
===== Accelerate the CD Creation Process =====
+
This sounds strange and your mileage may vary according to your system/graphics card: I build the CD on a system with an SIS chipset which is possibly not too well accelerated. The actions that give plenty of output to the console ( ie. the ''rsync'' step or the ''create_compressed_fs'' step ) run significantly slower because the terminal takes up too much time drawing the text. They run way faster if the terminal is minimized while they run but if you want to see the progress of these commands, resizing the window to show only two lines of text also helps. ( Maybe running the commands on a text only console might also perform better ).
+
 
+
===== Testing the CD =====
+
The obvious tip to test the CD is to use '''rewritable''' CDs until you are realy happy with the result. But another tip to just check if the CD still boots correctly after making big changes is to boot the ISO image with '''qemu'''. QEMU is available in the ''universe'' repository. Run it like this:
+
 
<pre><nowiki>
 
<pre><nowiki>
$ qemu -cdrom liveimage.iso -boot d
+
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --load /your-new-settings.xml
 +
rm /your-new-settings.xml
 
</nowiki></pre>
 
</nowiki></pre>
 
+
This way you can import the whole branch, e.g. /apps/panel - all settings for Gnome's panels.
It might be a bit slow but at least it squares a burn/reboot/test/reboot cycle.  
+
---Jacob Popov
 
+
ubuntu-9.04-desktop-i386.iso
[[category:CategoryDocumentation]] [[category:CategoryCleanup]]
+
----
 +
Is there no way to copy the user's gconf-values to the default gconf-values in the chrooted environment? This would be a lot easier than writing commands.
 +
----
 +
It took me a long time to find the details for configuring a static IP on the live CD without doing it in the root file system. This enables you to create a few boot options with different static details and a DHCP on but all from the same rootfs.
 +
There is a casper parameter which is in the form:
 +
ip=IFACE,ADDRESS,NETMASK,GATEWAY[[UbuntuHelp:IFACE,ADDRESS,NETMASK,GATEWAY]]*
 +
--silid
 +
----
 +
----
 +
[[UbuntuHelp:"Creating a static pre-configured IP on a LiveCD"|http://ubuntuforums.org/showthread.php?t=839670]]
 +
I think I have discovered how to do this:
 +
1) Edit accordingly /usr/share/initramfs-tools/scripts/casper-bottom/23networking
 +
2) Run update-initramfs -u -k $version
 +
- Robert
 +
In order to get the livecd to boot from a static address found in the /etc/network/interfaces file.
 +
I edit the /etc/network/interfaces file and add a static address for the interface eth0.
 +
<pre><nowiki>
 +
auto eth0
 +
iface eth0 inet static
 +
address 10.xxx.xxx.xxx
 +
netmask 255.255.255.0
 +
gateway 10.xxx.xxx.1
 +
</nowiki></pre>
 +
edit somepath/isolinux/text.cfg
 +
add ip=frommedia after splash
 +
<pre><nowiki>
 +
label live
 +
  menu label ^Try Ubuntu without any change to your computer
 +
  kernel /casper/vmlinuz
 +
  append  file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.gz quiet splash ip=frommedia --
 +
</nowiki></pre>
 +
This was a little hard to find. Thanks Robert
 +
Nicholas A. Schembi
 +
Pittsburgh PA USA
 +
----
 +
I've tried installing adobe flash player but while it installs fine on chroot, and then shows as installed when booting from CD. Firefox thinks it is not installed and I need to install it manually. Anybody come upon a similar problem
 +
--------
 +
I tried to customize Ubuntu  Hardy by installing the RT kernel and did the changes as written in the howto... it goes well, but booting in vbox is really slow. What could be the cause? I tried is once again and also in another vbox installation, but still that problem. Would be nice if someone can point me to an solution! thanks in advance
 +
see also thread: http://ubuntuforums.org/showthread.php?p=7334890#post7334890
 +
edit: I think it has something to do with the fact that it is an RT kernel (from Hardy) ... Someone with experience with adding custom RT kernels?
 +
--------
 +
I wrote a script to automate the extraction / chroot / regeneration processes: http://david.decotigny.fr/wiki/wakka.php?wiki=RemasterUbuntu . It has been tested on a jaunty x86_64 host for a jaunty i386 CD image.
 +
-- [[UbuntuHelp:DavidDecotigny|DavidDecotigny]]
 +
--------
 +
To put the default user in the "video" group,  <pre><nowiki>
 +
printf "\nADD_EXTRA_GROUPS=1\nEXTRA_GROUPS="video"\n" >> /etc/adduser.conf </nowiki></pre>
 +
-- CarlKarsten
 +
--------
 +
In order to edit a Karmic [[UbuntuHelp:LiveCD|LiveCD]] in any release prior to Karmic, it looks like you will need to upgrade squashfs-tools to support SquashFS v4.0:
 +
<pre><nowiki>
 +
root@maxwell:/home/Z_Custom# unsquashfs mnt/casper/filesystem.squashfs
 +
Filesystem on mnt/casper/filesystem.squashfs is (4:0), which is a later filesystem version than I support!
 +
</nowiki></pre>
 +
I installed squashfs-tools_4.0-1 from the Karmic release into my Intrepid installation and it seems to be fine now.  Maybe we should update these directions to reflect that?
 +
Sincerely,
 +
--John D. Zollo
 +
--------
 +
Hi.. How can I add an a Post Installation script? I mean, I want to execute a script just after the installation process. THis script is simple and set a few things to customize the installation.
 +
Any ideas?
 +
Best Regards
 +
-- Alejandro
 +
--------
 +
Hallo, I'm trying to remaster ubuntu 9.10 livecd. I'm following instruction from this page.
 +
When I'm trying to boot from customized system it's seems I can't login to the system, so I can't got the system running.
 +
I am following instruction from limitation part about user id. And make sure there are none of users has uid more then 999. But, after making the squashfs file system I got a message that told me about a user with uid 1000.
 +
Actually my host system has a user with uid 1000. I'm using this user to remaster ubuntu livecd.
 +
Does my uid (1000) that I used for remastering the livecd make the new live cd can't login?
 +
If it does, how to fix it?
 +
Am I must use another user with uid less then 999 to remaster the livecd?
 +
Best Regards
 +
asw_te
 +
--------
 +
Hello, what is the best way to remaster the Karmic release [[UbuntuHelp:LiveCD|LiveCD]] (in [[UbuntuHelp:VirtualBox|VirtualBox]]) to include all the latest updates (more than 150) including new kernel and udev?
 +
The kernel changed from 2.6.31-14 to 2.6.31-16 and also udev.
 +
<code><nowiki>apt-get autoremove</nowiki></code> removes the old headers, but I have to purge the old kernel manually (<code><nowiki>apt-get purge linux-image-2.6.31-14-generic</nowiki></code>).
 +
The first problem is, <code><nowiki>update-initramfs -u -k all</nowiki></code> still runs for the old kernel, too.
 +
Only <code><nowiki>aptitude reinstall udev</nowiki></code> seems to stop this (<code><nowiki>depmod -a && dpkg --configure -a && dpkg-reconfigure udev</nowiki></code> does not help).
 +
The second problem is, how do I prepare initrd and isolinux to run and install from a subdirectory (to create a multi-boot DVD)?
 +
The base of the DVD is Ubuntu, so / contains ''ubuntu-9.10-desktop-i386.iso'', /kubuntu contains ''kubuntu-9.10-desktop-i386.iso'' and so on.
 +
Most things run fine when I introduce the prefix to scripts/casper and /isolinux/text.cfg:
 +
<pre><nowiki>
 +
LIVE_MEDIA_PATH=casper
 +
$path/.disk/casper-uuid
 +
append  file=/cdrom/preseed/kubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --
 +
</nowiki></pre>
 +
becomes
 +
<pre><nowiki>
 +
LIVE_MEDIA_PATH=kubuntu/casper
 +
$path/kubuntu/.disk/casper-uuid
 +
append  file=/cdrom/kubuntu/preseed/kubuntu.seed boot=casper initrd=/kubuntu/casper/initrd.lz quiet splash --
 +
</nowiki></pre>
 +
But the prefixed distributions show only an ''Install Ubuntu 9.10'' link on the desktop, not Kubuntu (Xubuntu, LUbuntu, ...).
 +
Thanks, René Leonhardt
 +
--------
 +
Hi!
 +
I was hoping to be able to remaster the Ubuntu Live disc so that I can stick it into almost any computer, have it boot up but NOT go into the GUI, just auto login and run a media player with arguements (like a stream address).  Was hoping to be able to make my own easy internet radio appliance.  Give old pentium computers with soundcards to businesses and they can play my station on their PA for free!
 +
-- Matt
 +
--------
 +
I updated the Karmic Live CD with the latest updates inside chroot using aptitude with update, dist-upgrade, purge linux-image-2.6.31-14-generic, install zsh zsh-doc, install ubuntu-restricted-extras, and enabled DVD playback.
 +
The resulting iso file turned out larger than a CD, and I put it on a USB Disk. The system boots fine, has the latest updates and can play restricted formats 'out of the box'. When I travel, I can just carry a USB Disk instead of a computer!
 +
All releases including Ubuntu 9.10 Karmic Koala now have newer kernels available via updates. The kernel in the live CD '''*MUST*''' match the ones inside squashfs. If it does not, you get strange problems (like the wireless interface not being detected or CDs not being recognized)
 +
i.e. for Karmic
 +
<pre><nowiki>
 +
sudo cp edit/boot/vmlinuz-2.6.31-16-generic extract-cd/casper/vmlinuz
 +
sudo cp edit/boot/initrd.img-2.6.31-16-generic extract-cd/casper/initrd.gz
 +
</nowiki></pre>
 +
Since Karmic uses initrd.lz, I had to uncompress the .gz file and put it back in .lz format.
 +
<pre><nowiki>
 +
cd extract-cd/casper
 +
sudo mv initrd.lz inird.lz.orig
 +
gzip -dc initrd.gz | sudo lzma -7 > initrd.lz
 +
cd ~/live
 +
</nowiki></pre>
 +
To conserve space, you can remove the original initrd files before changing the directory back
 +
<pre><nowiki>
 +
sudo rm -f inird.lz.orig initrd.gz
 +
</nowiki></pre>
 +
Best,
 +
Pradeep Sekar
 +
--------
 +
I have a few questions,
 +
I am remastering a copy of 9.04 for a community school program
 +
i ran into a few problems
 +
#1 how do you remove the option to update to 9.10 in the update manager
 +
#2 how do you get the CD to be recongnized in ubiquity installer as the named distro instead of ubuntu 9.04 (when i go to reinstall the softare still says it is a ubuntu 9.04 cd)
 +
#3how do you install a new kernel into the live cd and install part, i was able to upgrade it to 28.18 but when i try putting 31 on it ...it just wont boot.
 +
#4 i have a repos server, i edit the sources.list but ubuntu repos are still the primary, how do i change that over?
 +
#5 finally, i took out gnome games, and i want to add a list of eduacational games, but i want that as a optional install. (some computers won have game son there) is there a way to add the /.Games folder without actaully having data in it? i tried doing this in the chroot adn root menu and it still does not show up on install...
 +
Thank you
 +
ashlessburn
 +
-------------
 +
Can anyone tell me how I can take out the option of installing the Live CD at boot. I just want them to be able to use it, not install.
 +
Thanks
 +
--Steve
 +
------------
 +
You can edit the boot options in extract-cd/isolinux/text.cfg
 +
Delete all lines and sub-lines of a label you don't like:
 +
For example you can delete:
 +
<pre><nowiki>
 +
label live-install
 +
  menu label ^Install Ubuntu
 +
  kernel /casper/vmlinuz
 +
  append  file=/cdro...
 +
</nowiki></pre>
 +
-- jancelis
 +
-------------
 +
To remove the autologin, you make us work in the extract-cd directory. Does this mean that this process has to be the last one ? Do we have to do it after all the modifications on the edit directory ? Do we have to first create the new user in the chroot ?
 +
thx
 +
--lsga
 +
------------- 
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月19日 (三) 23:09的最新版本


How to Customise the Ubuntu Desktop CD

You may wish to customise the Ubuntu Desktop LiveCd to:

  • make your own Linux / Ubuntu distribution
  • show off a particular application
  • localise to a certain language
  • remove software packages
  • add software packages
  • update software packages
  • change system defaults (theme, icons, desktop background, panels, browser homepage, etc)

IconsPage?action=AttachFile&do=get&target=warning.png This guide is for the Desktop !LiveCd; there is another page referring to customisation of the Alternative Install Cd & the Server Install Cd also there is a guide on how to create a !LiveCd | without using an existing LiveCd.

System Requirements

  • At least 3-5 GB of free space
  • At least 512 MB RAM and 1 GB swap (recommended)
  • `squashfs-tools`
  • `genisoimage`, which provides `mkisofs`
  • An Ubuntu kernel with `squashfs` support (present in Ubuntu 6.06 and later)
  • QEMU/KVM, VirtualBox or VMware for testing (optional)

IconsPage?action=AttachFile&do=get&target=warning.png When trying to customize 9.10 Karmic Koala or later in an 9.04 Jaunty Jackalope or earlier environment: `squashfs-tools` will need to be updated to version 4.0. Inversely, the version of `squashfs-tools` in Ubuntu 9.10 is not compatible with earlier version of Ubuntu. IconsPage?action=AttachFile&do=get&target=warning.png If customizing a CD for another architecture than the installation used for customization the executables from the LiveCD may not run. (i.e. it is not trivial to customize an AMD64 CD from an i386 install -- the binaries won't run -- that's needed to customize the CD -- the binaries from the CD to be customized have to run on the "host" system (in order to run `chroot`).)

The Process

First, make sure that you have installed the needed tools

sudo aptitude install squashfs-tools genisoimage

You need to download an official Desktop CD from http://releases.ubuntu.com/ Note: the example shown here uses the ubuntu-9.04-desktop-i386.iso Desktop CD Move or copy it into an empty directory

mkdir ~/live
mv ubuntu-9.04-desktop-i386.iso ~/live
cd ~/live

Extracting the CD contents

Mount the Desktop .iso

mkdir mnt
sudo mount -o loop ubuntu-9.04-desktop-i386.iso mnt

Extract .iso contents into dir 'extract-cd'

mkdir extract-cd
rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd

Extracting the Desktop system

Extract the SquashFS filesystem

sudo unsquashfs mnt/casper/filesystem.squashfs
sudo mv squashfs-root edit

Prepare and chroot

If you need the network connection within chroot

sudo cp /etc/resolv.conf edit/etc/

Depending on your configuration, you may also need to copy the hosts file

sudo cp /etc/hosts edit/etc/
sudo mount --bind /dev/ edit/dev
sudo chroot edit
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts

(these mount important directories of your host system - if you later decide to delete the edit/ directory, then make sure to unmount before doing so, otherwise your host system will become unusable at least temporarily until reboot) To avoid locale issues and in order to import GPG keys

export HOME=/root
export LC_ALL=C

Customizations

Apt-get

Prerequisites

In 9.10, before installing or upgrading packages you need to run

dbus-uuidgen > /var/lib/dbus/machine-id

and

dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
Tasks

To view installed packages by size

dpkg-query -W --showformat='${Installed-Size}\t${Package}\n' | sort -nr | less

When you want to remove packages remember to use purge

aptitude purge package-name

Custom Background for GNOME

Generally background files are located in /usr/share/backgrounds. Copy your png file there, adjust owner and file access, and edit the files:

  1. /usr/share/gnome-background-properties/ubuntu-wallpapers.xml and
  2. /usr/share/gconf/defaults/16_ubuntu-wallpapers or other files in the same directory. by changing the string /usr/share/backgrounds/warty-final-ubuntu.png to point to your file

Eventually change or add attributes to other configuration files such as: /var/lib/gconf/debian.defaults/%gconf-tree.xml or /etc/gconf/gconf.xml.defaults/%gconf-tree.xml). Historical: More for Dapper...

Change gconf values (fonts, panels etc.)

To make any change on the gconf attributes you must add the value that you want in the file /etc/gconf/gconf.xml.defaults/%gconf-tree.xml. Adding a value in that file will change the default values of Gnome or other applications, so you can change fonts, backgrounds, themes, cursors etc. Instead of editing the file with gedit or another text editor, you can use the gconftool-2, under the chroot environment, running the following line:

gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type string --set yourkey "yourvalue"

where string, yourkey and yourvalue must be the type, key and value that you want to change...

Making several gconf changes

Editing gconf by setting each value separately takes too much time. There is a better way: Make a test user and adjust the settings as you wish. Run

gconftool-2 --dump /the/settings/branch/you/need > ~/live/your-new-settings.xml
sudo chown root:root ~/live/your-new-settings.xml
sudo mv ~/live/your-new-settings.xml ~/live/edit/your-new-settings.xml

and then, in the chroot environment, run

gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --load /your-new-settings.xml
rm /your-new-settings.xml

This way you can import the whole branch, e.g. /apps/panel - all settings for Gnome's panels. Note that this way you import not only the keys, but also their descriptions, so all GConf descriptions will be changed to the language which was set for the test user, and there will be no way to safely change them back. Some programs (for example, keyboard shortcuts in Preferences menu) use descriptions from GConf.

Change default language of gfxboot

This customization must be done outside the chroot.

sudo aptitude install dpkg-dev uck
apt-get source gfxboot-theme-ubuntu gfxboot
cd gfxboot-theme-ubuntu*/
make DEFAULT_LANG=fi
sudo cp -af boot/* ../extract-cd/isolinux/

Change "fi" to your preferred locale. Note that this does not change which languages are available in the F2 menu. For more info about gfxboot customization, see Ubuntu Customization Kit.

  • A other way to change the default language of gfxboot without rebuild the packages is to create a file name lang in the isolinux directory containing your locale's name.

Customization limits

After customization make sure that there are no users with an UID > 999. Otherwise your image won't boot because no initial user is available (see /usr/share/initramfs-tools/scripts/casper-bottom/10adduser). While in chroot:

awk -F: '$3 > 999' /etc/passwd

If you get any hits, try changing the uid:

usermod -u 500 $hit

Miscellaneous Defaults

You may wish to edit the files in /etc/default to change system behavior at startup. You might also edit /etc/profile, /etc/bash.bashrc, and /etc/bash_completion to change login settings for all users on the system. You cannot directly edit defaults for the live cd user (e.g., casper, ubuntu, or user) since that account is created at boot time. You can directly edit root's default files (/root in the chroot environment). If you wish to change the default timezone used by the live cd, run:

dpkg-reconfigure tzdata

If you have added a locale and wish to make it the default, update /etc/default/locale. You may have to compile the locale:

locale-gen new_locale
update-locale LANG=new_locale LANGUAGE=new_locale LC_ALL=new_locale

These changes must be made as root in the chroot environment.

Advanced Customizations

Live CD Kernel

If you want to customize further the boot process, you can change the livecd kernel, by copying the vmlinuz and initrd you want in place of the ones you find in extract-cd/casper. i.e.

sudo cp edit/boot/vmlinuz-2.6.15-26-k7 extract-cd/casper/vmlinuz
sudo cp edit/boot/initrd.img-2.6.15-26-k7 extract-cd/casper/initrd.gz

Removing the (Casper) Autologin

The autologin feature of the Jaunty/9.04 live CD is a bit of an on-the-fly boot-hack. After extracting the initrd.gz, you need to edit the casper-bottom/25configure_init script and then recreate the initrd.gz file, replacing the original in extract-cd/casper. The process to do so goes like this:

# cd extract-cd/casper
# mkdir tempdir
# cd tempdir
# gunzip -dc ../initrd.gz | cpio -imvd --no-absolute-filenames
# cp scripts/casper-bottom/25configure_init scripts/casper-bottom/25configure_init.orig
# vi scripts/casper-bottom/25configure_init

Now look for line 25 which has the conditional statement to test $USERNAME. Line 25 performs a conditional evaluation and if it evaluates to true, it will execute the code within the if block. The if block contains code to modify files used in the boot process to create the live cd autologin. To disable the autologin feature, Remove $USERNAME, but just leave the quotes. The -n modifier tests the $USERNAME string to see if it's length is non-zero. By removing the variable, and leaving two double quotes, this statement evaluates to false because the two double quotes effectively make a zero-byte string. Be sure to leave no whitespace between the quotes because whitespace will make the evaluation true and execution wil fall into the if block.

21:log_begin_msg "$DESCRIPTION"                                                          
22:                                                                                      
23:# Arrange for shells on virtual consoles, rather than login prompts                   
24:                                                                                      
25:if [ -n "$USERNAME" ]; then     

After making the change, line 25 will look like this:

25:if [ -n "" ]; then     

Save the file and quit the editor. Then, from extract-cd/casper/tempdir run the following command to re-create the initrd.gz file. There are other methods for re-creating the initrd.gz file on this page which may work also.:

# cp ../initrd.gz ../initrd.gz.orig
# find . | cpio -o -H newc | gzip -9 > ../initrd.gz

This will create a new initrd.gz file with no auto login. You can then continue to remaster the CD as described on this page. Be sure to create a user and password to login with before you remaster the cd. If you do not, you will not be able to login after booting! Also, I have read a few articles mentioning that Karmic (9.10) uses initrd.lz instead of initrd.gz. I do not know if this is true, but should mention it in case you are not getting the expected results. To unpack the initrd.lz file, you need to do this:

# cd extract-cd/casper
# mkdir lztempdir
# cd lztempdir
# lzma -dc -S .lz ../initrd.lz | cpio -imvd --no-absolute-filenames

And to re-create the initrd.lz file:

# cp ../initrd.lz ../inird.lz.orig
# find . | cpio --quiet --dereference -o -H newc | lzma -7 > ../initrd.lz

Boot init

You have to edit the files in edit/usr/share/initramfs-tools/scripts/casper-bottom/* For example you can change the hostname or the livecd user. i.e.

sudo nano edit/usr/share/initramfs-tools/scripts/casper

and edit the username or hostname

sudo nano edit/usr/share/initramfs-tools/scripts/casper-bottom/10adduser

to edit even the livecd user's password. P.S. in order to obtain an encrypted password, you have to use the mkpasswd program that's shipped with whois package!

Rebuilding initrd

After you've modified the kernel, init scripts or added new kernel modules, you need to rebuild the initrd.gz file and substitute it into the casper directory.

sudo chroot edit
mkinitramfs -o /initrd.gz 2.6.15-26-k7

(replace the kernel version with the one that the CD will boot with - this can be found in edit/lib/modules) Exit from the chroot jail and move this file to extract-cd/casper:

exit
mv edit/initrd.gz extract-cd/casper/

Cleanup

Be sure to remove any temporary files which are no longer needed, as space on a CD is limited. A classic example is downloaded package files, which can be cleaned out using:

aptitude clean

Or delete temporary files

rm -rf /tmp/* ~/.bash_history

Or nameserver settings

rm /etc/resolv.conf

If you installed software, be sure to run

rm /var/lib/dbus/machine-id

and

rm /sbin/initctl
dpkg-divert --rename --remove /sbin/initctl

from within the chroot environment. now umount (unmount) special filesystems and exit chroot

umount /proc
umount /sys
umount /dev/pts
exit
sudo umount edit/dev

Note: if "umount /proc" command fails try "umount -lf /proc"

Putting the CD together

Regenerate manifest

chmod +w extract-cd/casper/filesystem.manifest
sudo chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract-cd/casper/filesystem.manifest
sudo cp extract-cd/casper/filesystem.manifest extract-cd/casper/filesystem.manifest-desktop
sudo sed -i '/ubiquity/d' extract-cd/casper/filesystem.manifest-desktop
sudo sed -i '/casper/d' extract-cd/casper/filesystem.manifest-desktop

Compress filesystem

sudo rm extract-cd/casper/filesystem.squashfs
sudo mksquashfs edit extract-cd/casper/filesystem.squashfs -nolzma

Note: The -nolzma option is only available from Hardy , and was removed in Karmic. Also, the squashfs has to be generated using a version of mksquashfs that is compatible with the kernel used on the CD you are customizing. For example, you cannot generate a jaunty squashfs on karmic, as the jaunty kernel is not able to mount a squashfs prepared using mksquashfs from karmic. Set an image name in extract-cd/README.diskdefines

sudo vim extract-cd/README.diskdefines

(you can use "sudo nano extract-cd/README.diskdefines" if you have difficulties understanding vim) Remove old md5sum.txt and calculate new md5 sums

cd extract-cd
sudo rm md5sum.txt
find -type f -print0 | sudo xargs -0 md5sum | grep -v isolinux/boot.cat | sudo tee md5sum.txt

Create Iso

sudo mkisofs -D -r -V "$IMAGE_NAME" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../ubuntu-9.04.1-desktop-i386-custom.iso .

Testing the CD

Test using qemu emulator

qemu -cdrom ubuntu-9.04.1-desktop-i386-custom.iso -boot d -m 512

Or if you have hardware acceleration for kvm

kvm -cdrom ubuntu-9.04.1-desktop-i386-custom.iso -boot d -m 512

You can also test with virtualbox-ose, which is free software and available in the Ubuntu universe repository.

Troubleshooting

Some experience problems virtualizing the iso after changing the livecd linux kernel. If you do, go click F6 when the boot screen is showing. Move the cursor between splash quiet and -- and write: all_generic_ide

Burning the image to CD

Simple! Just do

cdrecord dev=/dev/cdrom ubuntu-9.04-desktop-i386-custom.iso

Additional uses for the image

Install|Ubuntu from a USB stick Installation|From Image Loaded On Hard Drive

Comments

If you have any comments or questions, please feel free to add them here. If you are answering a question, please rewrite the question into a tip that answers the question. (to help keep things to the point.) New questions at the bottom (I guess.)


I have created an small Customization Example (named Firebird Live CD) by adding an firebird2.1-superand flamerobin packages (this apply to ubuntu Hardy Heron also it was tested with xubuntu 8.04) http://flamerobin.blogspot.com/2008/08/creating-flamerobinfirebird-livecd-with.html


Warning: qemu did not work for me as given in the guide above. Even the normal 8.04 live cd would not boot correctly. Every time, I would get thrown into the ash shell (busybox, initramfs) and while there, a "cat /casper.log" would reveal that it was "Unable to find a medium containing a live filesystem". Just use virtualbox-ose. It actually works with virtualbox. However, after using apt-get to install virtualbox-ose, I had to run "sudo depmod" again in order for the vboxdrv module to be found by modprobe. Hope that helps! -rocketman768


Warning: Squashfs is currently in development and is thus not finalized as a format. This means you cannot assume a filesystem.squashfs created using the Ubuntu 9.04 version of makesquashfs will be compatible with the squashfs drive an older live CD. I was customizing an Ubuntu 7.10 LiveCD and when testing it always booted it an (initramfs) prompt--the squashfs was not getting mounted as /. I had to build from within an Ubuntu 7.10 chroot to get it to work. --Bob/Paul


I have created an small Customization Example (named Firebird Live CD) by adding an firebird-super-server and flamerobin packages (this apply to ubuntu dapper drake) http://flamerobin.blogspot.com/2006/05/creating-flamerobinfirebird-live-cd.html I created an updated guide with Ubuntu Festy Fawn also with an iso download for the Firebird/Flamerobin live cd http://flamerobin.blogspot.com/2007/09/creating-flamerobinfirebird-livecd-with.html


I have created tool for automatic remastering of live CD images. See http://uck.sourceforge.net/ . Features:

  • GUI for simple creation of localized CDs (including changing gfxboot and installing language packs)
  • Script for customization of ISO, SquashFS and initrd on live CD.

http://www.atworkonline.it/~bibe/ubuntu/custom-livecd.htm seems to have some nice info. no license that I can see so we would need to ask permission from the author to us its material.


If you want to make the CD boot faster, you might try sorting the files so that they are in the CD in the order that they are accessed: http://lichota.net/%7Ekrzysiek/projects/kubuntu/dapper-livecd-optimization/


Great How To. I am having one issue however. I would like to use custom xorg.conf and sources.list files. Any tips on doing this? Thanks.

  • Simply, copy the files to edit/etc/ in the same way (and at the same time) that you copy in the resolv.conf and hosts files.
  • I have found that copying xorg.conf doesn't work, as the boot-time scripts overwrite it. Besides, you can't guarantee that a particular xorg.conf will run on all hosts. I'm currently trying to get the binary NVIDIA drivers to work out of the box if an NVIDIA card is present. If I figure out how to fix the xorg.conf, I'll post it here. --JeremyVisser

I've managed to get Synaptic running from within the chroot environment, but it does hang when I try to apply packages. What you do is run "Xnest -ac :1" to get an Xnest server to run on display :1 without access control so anyone can connect to it. Then, in the chroot environment, run "export DISPLAY=:1" to get programs to use the display. Then, type "metacity &" to be able to move windows. Finally, run "synaptic". It works fine until you try to apply packages, where it hangs for me. --JeremyVisser


Shouldn't the mkinitramfs command use the casper scripts, like "mkinitramfs -o initrd.gz 2.6.15-23-386 -d /usr/share/initramfs-tools"?


There are tricks on how you can get to feel the GNOME system in your chroot environment. 1. Copy your xorg.conf in the chrooted "etc/X11/" directory.

cp /etc/X11/xorg.conf edit/etc/X11/

2. Create generic devices on your chroot system using MAKEDEV

cd /dev/
MAKEDEV generic

3. Start X or restart gdm

/etc/init.d/gdm start

Supposed you want to make modifications on the Desktop, that will be used by all the new users, just change your $HOME to /etc/skel/ and start gdm or X.

export HOME=/etc/skel/

If you want to load all the other stuff GNOME needs (i.e, dbus, avahi, network-manager), just boot as (single-user mode), and start dbus in your chrooted environment.

/etc/init.d/dbus start

An example of the whole procedure. (under single-user mode)

sudo /etc/init.d/networking restart
sudo cp /etc/resolv.conf edit/etc/
sudo cp /etc/X11/xorg.conf edit/etc/X11/
sudo chroot edit
mount -o none /proc
mount -o none /sys
export HOME=/etc/skel/
cd /dev/
MAKEDEV generic
/etc/init.d/dbus start
/etc/init.d/gdm start

--- joelbryan


Hello, I am about to build a new Livecd and have a question: When I change the username, hostname and the user's password the user login automatically during booting the livesystem. But this is not desired. Is it correct, that I have to enter a password under a Desktop LiveCD when I delet the encrypted password in /usr/share/initramfs-tools/scripts/casper-bottom/10adduser ? Thanks Changing username and password will not change login behaviour, because this is done in /usr/share/initramfs-tools/scripts/casper-bottom/15autologin --- Alexander Hosfeld


Having trouble starting a MySQL server from within the chroot jail. Any suggestions? - Dave Hey, I am trying to make a customized live cd of Kubuntu 6.06 that will be completly preconfigured, so that when the user clicks on the install icon on KDE the installer should do everything by itself, meaning that the installer should not ask any questions to the user. To do this I am trying to write a preseed file to tell the installer the information that it needs. The problem is that even with this preseed file I could only tell the installer what is the username that it should use, the rest of the information is simply ignored by the installer. I must be doing something wrong and would appreciate any and all help given me. Thanks, Komyg PS: Should I post my preseed file here?


If the livecd is not going to be used for the purposes of installing what files can be removed? Can the "pool" files containing the .debs be removed too? - Mike


If I want to put in my LiveCD applications that aren't in the sources.list (like ooffice 2.2 or perl audio converter), what cain I do? - Isoldanne When you're in the chroot you can install applications just like you would on a live system. If you install from source you can feel free to delete the source tarbal and make folders after you do 'make install'. - Bob/Paul


To get desired /etc/X11/xorg.conf one can modify the /usr/bin/dexconf. This script generates xorg.conf automatically in liveCD session according to the booted machine. For example:

# diff ~/bin/dexconf /usr/bin/dexconf
268,269c268
< 	Option		"XkbLayout"	"us,il"
< 	Option          "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
---
> 	Option		"XkbLayout"	"$XKB_LAYOUT"

-- yotam


I cant do chroot. When i run it a get this error chroot: cannot run command `/bin/bash': No such file or directory Please help me out I had the same problem because the filesystem that I was working on was FAT32 instead of EXT2 or EXT3. Because of that, /bin/bash was not an executable I guess. If that is your case also, then please try again on a partition that is EXT2 or EXT3 (the Linux type of partition). Good luck, --vvim


Hi, I've created a simple script to ease remastering the Kubuntu Live CD. It uses aufs to avoid copying all the files back and forth. Maybe it will be usefull to others too. The script must be run as root.

#!/bin/bash
CD="${1:-kubuntu-9.04-desktop-i386.iso}" ; shift
# exit after any error:
set -e

which mkisofs mksquashfs tempfile sed

WDIR=`mktemp -d $PWD/kubuntu-remastered.XXXXXXXXXX`
ISO="$WDIR/${CD##*/}"
ISO="${ISO%.iso}-remastered-KDM.iso"
EXIT=""
function addExit {
    EXIT="$@ ; $EXIT"
    trap "$EXIT" EXIT HUP TERM INT QUIT
}
function mnt {
    local margs="$1" ; shift
    local mp="$WDIR/$1"
    for D in "$@" ; do
	mkdir -v -p "$WDIR/$D"
    done
    mount -v $margs "$mp"
    addExit "umount -v $mp"
}

# mount the CD image
mnt "-t auto $CD -o loop,ro" cd

# mount compressed filesystem
mnt "-t squashfs $WDIR/cd/casper/filesystem.squashfs -o ro,loop" sq

# create joined writable filesystem for the new CD
mnt "-t aufs -o br:$WDIR/cd-w=rw:$WDIR/cd=ro none" cd-u cd-w

# create joined writable filesystem for the new compressed squashfs filesystem
mnt "-t aufs -o br:$WDIR/sq-w=rw:$WDIR/sq=ro none" sq-u sq-w

echo ">>> Updating CD content"

(
    cd sq-u

    # DO YOUR CUSTOMIZATION STUFF HERE, CHROOT, MODIFY FILES, ETC.
    # ...
    # ...

)

echo ">>> Compressing filesystem"
mksquashfs $WDIR/sq-u/ $WDIR/cd-u/casper/filesystem.squashfs -noappend

echo ">>> Recomputing MD5 sums"
( cd $WDIR/cd-u && find . -type f -not -name md5sum.txt -not -path '*/isolinux/*' -print0 | xargs -0 -- md5sum > md5sum.txt )

echo ">>> Creating ISO image $ISO"
mkisofs \
    -V "Custom KUbuntu Live CD" \
    -r -cache-inodes -J -l \
    -b isolinux/isolinux.bin \
    -c isolinux/boot.cat \
    -no-emul-boot -boot-load-size 4 -boot-info-table \
    -o "$ISO" \
    $WDIR/cd-u

# The trap ... callbacks will unmount everything.

--- Petr Pudlak


I need to know how to configure the live cd so that it does not use SWAP! Please help me! -- iceman


Hi, I've been experiencing problems with aptitude and I'm pretty sure its because I'm doing all this stuff on NTFS partition (according to this thread http://ubuntuforums.org/showthread.php?t=521905). But I have no other choice,coz' I've got less then 1,7GB on my ext3 partition. Any suggestion ? THX Error messages I've been getting, when trying to install or update aptitude: "E: Couldn't make mmap of 25165824 bytes - mmap (19 No such device) W: Unable to munmap E: The package lists or status file could not be parsed or opened." -heethen (heethen at centrum dot cz)


I would suggest creating an ext3 filesystem within your NTFS partition. To create the file, type dd if=/dev/zero of=/mnt/hda1/workspace.img bs=1024 count=$((1024*1024*15)) Where I assumed your NTFS partition was on hda1, and you wanted to call the new filesystem workspace.img (it's really just a file within NTFS), and that you wanted 15Gb of room to work. (You don't need that much, but with 15Gb you should have plenty of room.) Then you format the new filesystem with the command sudo /sbin/mkfs.ext3 /mnt/hda1/workspace.img then create a mountpoint sudo mkdir /mnt/workspace then mount the new filesystem sudo mount -o loop /mnt/hda1/workspace.img /mnt/workspace You can then use as much space on the NTFS partition as you want, and have all the benefits of ext3 (like getting the *** thing to work). --Tom


Editing gconf by setting each value separately takes too much time. There is a better way: Make a test user and adjust the settings as you wish. Run

gconftool-2 --dump /the/settings/branch/you/need > ~/live/your-new-settings.xml
sudo chown root:root ~/live/your-new-settings.xml
sudo mv ~/live/your-new-settings.xml ~/live/edit/your-new-settings.xml

and then, in the chroot environment, run

gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --load /your-new-settings.xml
rm /your-new-settings.xml

This way you can import the whole branch, e.g. /apps/panel - all settings for Gnome's panels. ---Jacob Popov ubuntu-9.04-desktop-i386.iso


Is there no way to copy the user's gconf-values to the default gconf-values in the chrooted environment? This would be a lot easier than writing commands.


It took me a long time to find the details for configuring a static IP on the live CD without doing it in the root file system. This enables you to create a few boot options with different static details and a DHCP on but all from the same rootfs. There is a casper parameter which is in the form: ip=IFACE,ADDRESS,NETMASK,GATEWAYUbuntuHelp:IFACE,ADDRESS,NETMASK,GATEWAY* --silid



http://ubuntuforums.org/showthread.php?t=839670 I think I have discovered how to do this: 1) Edit accordingly /usr/share/initramfs-tools/scripts/casper-bottom/23networking 2) Run update-initramfs -u -k $version - Robert In order to get the livecd to boot from a static address found in the /etc/network/interfaces file. I edit the /etc/network/interfaces file and add a static address for the interface eth0.

auto eth0
iface eth0 inet static
address 10.xxx.xxx.xxx
netmask 255.255.255.0
gateway 10.xxx.xxx.1

edit somepath/isolinux/text.cfg add ip=frommedia after splash

label live
  menu label ^Try Ubuntu without any change to your computer
  kernel /casper/vmlinuz
  append  file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.gz quiet splash ip=frommedia --

This was a little hard to find. Thanks Robert Nicholas A. Schembi Pittsburgh PA USA


I've tried installing adobe flash player but while it installs fine on chroot, and then shows as installed when booting from CD. Firefox thinks it is not installed and I need to install it manually. Anybody come upon a similar problem


I tried to customize Ubuntu Hardy by installing the RT kernel and did the changes as written in the howto... it goes well, but booting in vbox is really slow. What could be the cause? I tried is once again and also in another vbox installation, but still that problem. Would be nice if someone can point me to an solution! thanks in advance see also thread: http://ubuntuforums.org/showthread.php?p=7334890#post7334890 edit: I think it has something to do with the fact that it is an RT kernel (from Hardy) ... Someone with experience with adding custom RT kernels?


I wrote a script to automate the extraction / chroot / regeneration processes: http://david.decotigny.fr/wiki/wakka.php?wiki=RemasterUbuntu . It has been tested on a jaunty x86_64 host for a jaunty i386 CD image. -- DavidDecotigny


To put the default user in the "video" group,
printf "\nADD_EXTRA_GROUPS=1\nEXTRA_GROUPS="video"\n" >> /etc/adduser.conf 

-- CarlKarsten


In order to edit a Karmic LiveCD in any release prior to Karmic, it looks like you will need to upgrade squashfs-tools to support SquashFS v4.0:

root@maxwell:/home/Z_Custom# unsquashfs mnt/casper/filesystem.squashfs 
Filesystem on mnt/casper/filesystem.squashfs is (4:0), which is a later filesystem version than I support!

I installed squashfs-tools_4.0-1 from the Karmic release into my Intrepid installation and it seems to be fine now. Maybe we should update these directions to reflect that? Sincerely, --John D. Zollo


Hi.. How can I add an a Post Installation script? I mean, I want to execute a script just after the installation process. THis script is simple and set a few things to customize the installation. Any ideas? Best Regards -- Alejandro


Hallo, I'm trying to remaster ubuntu 9.10 livecd. I'm following instruction from this page. When I'm trying to boot from customized system it's seems I can't login to the system, so I can't got the system running. I am following instruction from limitation part about user id. And make sure there are none of users has uid more then 999. But, after making the squashfs file system I got a message that told me about a user with uid 1000. Actually my host system has a user with uid 1000. I'm using this user to remaster ubuntu livecd. Does my uid (1000) that I used for remastering the livecd make the new live cd can't login? If it does, how to fix it? Am I must use another user with uid less then 999 to remaster the livecd? Best Regards asw_te


Hello, what is the best way to remaster the Karmic release LiveCD (in VirtualBox) to include all the latest updates (more than 150) including new kernel and udev? The kernel changed from 2.6.31-14 to 2.6.31-16 and also udev. apt-get autoremove removes the old headers, but I have to purge the old kernel manually (apt-get purge linux-image-2.6.31-14-generic). The first problem is, update-initramfs -u -k all still runs for the old kernel, too. Only aptitude reinstall udev seems to stop this (depmod -a && dpkg --configure -a && dpkg-reconfigure udev does not help). The second problem is, how do I prepare initrd and isolinux to run and install from a subdirectory (to create a multi-boot DVD)? The base of the DVD is Ubuntu, so / contains ubuntu-9.10-desktop-i386.iso, /kubuntu contains kubuntu-9.10-desktop-i386.iso and so on. Most things run fine when I introduce the prefix to scripts/casper and /isolinux/text.cfg:

LIVE_MEDIA_PATH=casper
$path/.disk/casper-uuid
append  file=/cdrom/preseed/kubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --

becomes

LIVE_MEDIA_PATH=kubuntu/casper
$path/kubuntu/.disk/casper-uuid
append  file=/cdrom/kubuntu/preseed/kubuntu.seed boot=casper initrd=/kubuntu/casper/initrd.lz quiet splash --

But the prefixed distributions show only an Install Ubuntu 9.10 link on the desktop, not Kubuntu (Xubuntu, LUbuntu, ...). Thanks, René Leonhardt


Hi! I was hoping to be able to remaster the Ubuntu Live disc so that I can stick it into almost any computer, have it boot up but NOT go into the GUI, just auto login and run a media player with arguements (like a stream address). Was hoping to be able to make my own easy internet radio appliance. Give old pentium computers with soundcards to businesses and they can play my station on their PA for free! -- Matt


I updated the Karmic Live CD with the latest updates inside chroot using aptitude with update, dist-upgrade, purge linux-image-2.6.31-14-generic, install zsh zsh-doc, install ubuntu-restricted-extras, and enabled DVD playback. The resulting iso file turned out larger than a CD, and I put it on a USB Disk. The system boots fine, has the latest updates and can play restricted formats 'out of the box'. When I travel, I can just carry a USB Disk instead of a computer! All releases including Ubuntu 9.10 Karmic Koala now have newer kernels available via updates. The kernel in the live CD *MUST* match the ones inside squashfs. If it does not, you get strange problems (like the wireless interface not being detected or CDs not being recognized) i.e. for Karmic

sudo cp edit/boot/vmlinuz-2.6.31-16-generic extract-cd/casper/vmlinuz
sudo cp edit/boot/initrd.img-2.6.31-16-generic extract-cd/casper/initrd.gz

Since Karmic uses initrd.lz, I had to uncompress the .gz file and put it back in .lz format.

cd extract-cd/casper
sudo mv initrd.lz inird.lz.orig
gzip -dc initrd.gz | sudo lzma -7 > initrd.lz
cd ~/live

To conserve space, you can remove the original initrd files before changing the directory back

sudo rm -f inird.lz.orig initrd.gz

Best, Pradeep Sekar


I have a few questions, I am remastering a copy of 9.04 for a community school program i ran into a few problems

  1. 1 how do you remove the option to update to 9.10 in the update manager
  2. 2 how do you get the CD to be recongnized in ubiquity installer as the named distro instead of ubuntu 9.04 (when i go to reinstall the softare still says it is a ubuntu 9.04 cd)
  3. 3how do you install a new kernel into the live cd and install part, i was able to upgrade it to 28.18 but when i try putting 31 on it ...it just wont boot.
  4. 4 i have a repos server, i edit the sources.list but ubuntu repos are still the primary, how do i change that over?
  5. 5 finally, i took out gnome games, and i want to add a list of eduacational games, but i want that as a optional install. (some computers won have game son there) is there a way to add the /.Games folder without actaully having data in it? i tried doing this in the chroot adn root menu and it still does not show up on install...

Thank you ashlessburn


Can anyone tell me how I can take out the option of installing the Live CD at boot. I just want them to be able to use it, not install. Thanks --Steve


You can edit the boot options in extract-cd/isolinux/text.cfg Delete all lines and sub-lines of a label you don't like: For example you can delete:

label live-install
   menu label ^Install Ubuntu
   kernel /casper/vmlinuz
   append  file=/cdro...

-- jancelis


To remove the autologin, you make us work in the extract-cd directory. Does this mean that this process has to be the last one ? Do we have to do it after all the modifications on the edit directory ? Do we have to first create the new user in the chroot ? thx --lsga