@mniess " How would you remaster 14.04 or newer?" the manual version posted by izx and me are still valid for setting up the root system for editing. The new answer highly depends on knowing what you mean with "given recent changes". Every change will have a specific approach (edit dconf or edit a conf file) and all of that is already covered in the current answers. The one thing it is not is "copy/paste"; these new changes require someone to think beyond what is written. BUT I believe the answer also already requires this.
–
RinzwindAug 21 '14 at 13:26

2. Ubuntu Builder Basics

Start Ubuntu Builder from the Launcher. I recommend you set all three fields to "Ubuntu" (like the actual LiveCD), because setting custom fields led to Software Center crashing. When you install, you can choose your own username, machine name, etc. as always.

Load your ISO; I loaded the 64-bit with the Local Disk option, although Ubuntu Builder should be able to download the ISO if you want it to.

The buttons on the right are self-explanatory. Console gives you a CLI chroot, while Desktop gives you a graphical one!, i.e. a LiveCD session itself (this one may take a while to load). Note that the Select DE/WM does an incomplete job sometimes, so it's better to install via apt-get/Synaptic.

3. Updating, adding Gnome Classic and other package management

Note: All this can also be done from Synaptic if you are more comfortable with that.

You can edit the sources.list with the button (or via the console) to add your own mirrors, ppas, etc.

Let's start with:

Remove the games

apt-get remove --purge aisleriot gnome-games-data gnomine mahjongg -y

Do a general update and dist-upgrade to the latest stuff (optional, but recommended since the Gnome-classic and other packages you add will be the latest versions) -- on 12.04, this step also installs Thunderbird and the core Samba components. It will also save time on the actual install.

4. Customization 1: Files, configs and removing the top-panel

Note: All commands must be run from the chrooted console of Ubuntu Builder unless otherwise noted (usually when copying files from your own system). The absolute path of the chroot is /home/ubuntu-builder/FileSystem

5. Customization 2: Backgrounds and Themes

Note: /usr/share/glib-2.0/schemas contains most of the default background/theme settings; I found it easier to directly modify those for a LiveCD instead of having to deal complicated stuff just to, for example, prevent the login screen background from being the same as the desktop background.

Disable the login screen (lightdm) from "copying" the desktop background and other changes:

Open nano /usr/share/glib-2.0/schemas/com.canonical.unity-greeter.gschema.xml

You can change the login background from the default here if you want:

How to update/install a package which requires system-restart (for example kernel or dbus)? When I try to update it installs; but in gui-mode, session-indicator turns red & says restart to complete the update.
–
Khurshid AlamApr 1 '13 at 12:17

How do I replace the Ubuntu artwork with my own artwork ?
–
Roshan George Jun 10 '13 at 14:03

This one doesn't work. I dont know why. I am not sure whether this happens to me alone. When I run it inside a virtualbox, it shows a popu saying that "/casper/vmlinuz.efi: file not found". How to correct this? s24.postimg.org/jbez8svx1/Untitled.png
–
Roshan George Jun 19 '13 at 5:42

@izx Can you please tell me, how to set working directory for ubuntu-builder? It is creating directory in /home/ubuntu-builder. I run it with root access.
–
shantanuNov 28 '13 at 22:20

Just to clarify, doing this not only changes the live session but also the default set of packages that will be installed, correct?
–
OxwiviSep 16 '14 at 16:19

2. Customizing

You can get a list of all packages with
dpkg-query -W --showformat='${Package}\n' | less

You can remove games with apt-get remove --purge gnome-games*

Update your sources withsudoedit /etc/apt/sources.list. Comment out lines you do not want and uncomment the ones you do want, add in PPAs if you want and then you need to update with apt-get update && apt-get dist-upgrade

Adding packages like thunderbird, Samba, Samba systen config and SSH is done the same way as you would normally install from commandline. So sudo apt-get install thunderbird samba system-config-samba ssh will add those.

If you've manually downloaded the package from you can install it with sudo dpkg -i {file_name}.deb

You can check Ubuntu Software Center, Synaptic or the packages website for the names if more need to be installed.

You might consider adding (wireless) network utilities.

You will quickly run over 800 Mb; if you do you either remove more packages to get under 800 or you need to use a DVD when burning. Removing libre office will free up you 33+ Mb if you do not need it.

You can add more of these (skip the mkdir part) by editing the URL to something else.
Courtesy of dv3500ea

Changing settings inside gconf-editor.

You can change any gconf option if you know what the path is of that option and the value you want it to be (and the type of the value ofcourse).

Changing the wallpaper is done with the path I pointed arrows to: /desktop/gnome/background/, it is a string value and it uses 'picture_filename' as an option. The value it currently holds on my desktop is '/discworld2/Downloads/fantasticwall_2.jpg'. The background itself should be copied into /usr/share/backgrounds/. Make sure to set permissions and owner.

Examples:

To change the wallpaper (change the filename in the 1st command to your own image) to this image and to change the theme to Radiance you can use this information to create commands to set this for your live cd:

Settings for icons, panels etc are all done by adding a command like this.

Alternatively you can edit /etc/gconf/gconf.xml.defaults/%gconf-tree.xml (or when you are down save this file for future usage). All the configuration settings done through gconftool-2 are stored in this file.

Change the default timezone used by the live cd

dpkg-reconfigure tzdata

Change locale setting to english (of course change it to what you want)

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

Configure configuration files.

If you want to have a custom configuration file for a certain package you can do this in several ways.

The difficult (but most logical) way would be to either find the package, change the configuration file and repackage it or to find the source files, figure out where they store their dummy config file and change that and then rebuild the package.
- Of course this only works if the default configuration file is included in the source package. Many packages auto-generate their config files in the {packagename}.postinst script so it would make it rather difficult to get this done.

The easiest way would be to create a script and copy your current config to /etc/skel so they get added to your desktop (similar to adding firefox shortcuts as explained above) and after installing click the desktop link to set the config file to the place it needs to be. The script could both do the copying and removal of both the script and config file from your desktop after it succesfully installed. This method can be used to update the Samba configuration (put your current config in /etc/skel/. Put a script in there that has execute permissions and contains a move of said config to /etc/samba/smbd.conf and all you need to do afterwards is execute the script).

This basically always works since it replaces a post-install manual action with a post-install manually activated script. But it also means it is not part of the custom live cd.

3. Cleaning up

This removes all the temporary files; not what we created. ~/livecd/ is readonly so a normal rm will not remove these files. You need to mount it with write access (or as I did use the new live cd to boot and mount the home and rm it from there.

6. Unmount & Clean

7. Comments:

Everything was tested with an Ubuntu 11.04 Live CD. Only thing that went wrong was chrooting: I added dchroot to the files you need to install to do this.

Regarding "should create some firefox shortcuts on desktop", "Should change the default theme to radiance" and "Should change the default ubuntu wallpaper". I edited these in after dv3500ea put it into the comments; I did not test this while creating the 11.04 live cd.

Will apt-get update && apt-get dist-upgrade also upgrade the kernel/initrd used on the Live CD? I mean the kernel for the boot process form the live medium, loaded by Syslinux, not the one installed.
–
gertvdijkJan 29 '13 at 22:24

what about the UEFI, will it be automatically taken care of or need to do any modification?
–
souravcFeb 24 at 14:50

apt-get dist-upgrade works without a flaw, except for some warning: could not determine root device from /etc/fstab messages. Is it supposed to become a problem?
–
Sopalajo de Arrierez2 hours ago

Actually after further review it appears the /etc/hosts file that gets installed is not generated by the ubiquity plugininstall.py module. If you do wish to modify the default /etc/hosts file you will likely have to make a script that will run once after first boot and delete or rename itself. Unless you recompile the netcfg module - which is not recommended.
–
SW_user2953243Oct 10 '14 at 18:14

Creating a live CD from an existing/new installation

EDIT: This method doesn't seem to work anymore. I suggest you try other methods suggested in this QA.

A good way would be making a live CD from a current installation. This can be done using a virtual machine (just don't install any VM tools inside the guest OS)

So, first we need a fresh install(if you can't install it for real, try using a virtual machine) with only things that you need (in your case thunderbird, samba and ssh). Then we tweak the system and record where the tweaks are (e.g. you change your desktop background, the settings are in ~/.gconf or you add firefox shortcuts, they are located in ~/Desktop). This is needed for step 4.

If you have a separate boot partition, execute this: sudo cp -av /boot/* ${WORK}/rootfs/boot
In your case, you want to copy settings and some files from the home directory. First, define what directories we want to copy:
CONFIG='.config .gconf Desktop someotherfolder andanotherfolder'
And now we copy that:

I have a question about the grub.cfg. Is this file grub.cfg just used while installation, or is it persistent to the installed system also. What if I dont edit the grub.cfg ?
–
Roshan George Jun 10 '13 at 14:13

@RoshanGeorge This configures GRUB on the CD. It shouldn't persist after installation.
–
nickguletskiiJun 12 '13 at 12:55

Can we just have the installation like how it is for Ubuntu normally, that is, show the ubiquity installer, rather than showing grub? Means, in Ubuntu installation, when we insert and run the cd, ubiquity shows up rather than grub menu, Can we do like that ?
–
Roshan George Jun 12 '13 at 17:14

@RoshanGeorge It should be possible by adding a menu entry with linux /boot/vmlinuz boot=casper only-ubiquity quiet splash. I will test and verify.
–
nickguletskiiJun 13 '13 at 16:18

@RoshanGeorge I have successfully added an option to launch Ubiquity from the boot menu. However, I need to fix the guide - some ubiquity steps are missing. I will attempt to fix it tomorrow.
–
nickguletskiiJun 13 '13 at 21:22

Remastersys could be the answer to your needs. You need to go to http://www.remastersys.com/ubuntu.html and follow the instructions. This program makes an iso from your running os including all settings and apps. Than you can burn a CD using this iso. Unfortunately, there was in the past an issue to get it running as a live cd, while installing was no problem (I dont know if this is still a problem).

uck is available from Ubuntu's official software sources, in all versions of Ubuntu since 10.04 LTS Lucid Lynx. You can install uck from the Software Center, with apt-get on the command-line, or by clicking here.

"Reconstructor is an Ubuntu GNU/Linux CD Creator that allows you to modify an existing Ubuntu distribution and save as your own Linux distribution. It uses the Desktop(Live), Alternate(Install), or Server disc as a base, and then allows for user customization.
You can basically customize the entire environment, such as add/remove software, change the default look (splash, themes, fonts, wallpaper, etc.), add desktop links, etc."

It is a collection of scripts that make it easier to create a custom LiveCD from an existing .iso image. It is very similar to Remastersys, with the difference that it is actively maintained. It has a GUI to help with the customization, but one can also use the command-line to do the same.

It will ask to select which language packs to include in the CD.

Then, it will ask to select the .iso image file, which will be used as the base for the new CD.

Give a name for the new .iso image that will be created.

Then, it will ask for the packages that are to be added/removed to/from the LiveCD. It will give you an option between the command-line and the default GUI (Ubuntu Software Center). Note: You should select command-line. From the command-line, you can add/remove packages either using apt-get or using Ubuntu Software Center (type software-center from the command-line). You can also modify configuration settings for all the software/apps.

After you have finished (it might take some time to download the required packages), continue.

Now, just sit back and relax. After some time, your customized LiveCD will be ready.

I've followed exact the same procedures as you described here, but unfortunately during boot it's showing "could not find ramdisk image: /ubninit" and get refreshed again and again with 10 seconds interval. Result: I can't boot my customized ISO. Could you tell me how can I solve this? Please.
–
tuxtuJun 13 '13 at 9:17

If you need more control over exactly what changes are made, it is possible to make the modification manually.

The process consists of unpacking the SquashFS data file containing the live OS's root filesystem, chrooting into the extracted filesystem, making your modifications, exiting the chroot, repacking the SquashFS file, and then regenerating the ISO image.

There is no "GUI" that I know of outside of Lucid, however gNewsense, which is a fork of Ubuntu makes their scripts to take an Ubuntu release and make a custom fork freely available and rather well documented.

Its basically a process of:

Placing your custom artwork where the scripts can find it

Deciding what you want in your kernel (or what you don't want)

Deciding what packages you want (or what you don't want)

Running a script that mirrors an apt repository

Creating the distribution CD / ISO.

While not exactly 'novice friendly', their tools are relatively easy to use.