Giter VIP home page Giter VIP logo

live-addon-maker's Introduction

live-addon-maker

Build Status

Customize your ubuntu iso images with additional software.

Ubunut live images come with software like Open Office and Pidgin for the end user. Programmers need other tools. We can equip USB devices with the additional software without changing the underlying system. The installation is just one copy and paste:

  1. Copy an example .squashfs file into the casper folder or wherever filesystem.squashfs is.
  2. Boot and you can start the Python Shell.

Documentation

There is a paper about the packground and how the live addon maker works.

Examples

The are examples available in the examples folder.

History & Idea

We can use live distributions on USB-sticks. However, it is hard to customize them: Using the persistent mode, the system broke for me when I had software installed. But, I found the following lines in the caspter/initrd.lz/initrd/scripts/casper in line 385 in setup_unionfs():

    for image_type in "ext2" "squashfs" "dir" ; do
        for image in "${image_directory}"/*."${image_type}"; do

These lines go through all .ext2, .squashfs files and .dir folders and mount them. filesystem.squashfs is just one of them. What happens:

  1. all .ext2 files are mounted readonly.
  2. all .squashfs files are mounted readonly.
  3. all .dir directories are mounted readonly. (Executable and access flags maybe lost because of the fat32 file system.)

Summary

The make-addon.sh script creates .squashfs files as a basis to customize the image. Without using any tool, you can also create a folder, e.g. example.dir in the folder of the filesystem.squashfs and put files there.

Tutorial

I assume you work under an Ubuntu system.

  • Install git:

      sudo apt-get -y install git
    
  • Clone this repository:

      git clone https://github.com/CodersOS/live-addon-maker.git
    
  • Change into the directory:

      cd live-addon-maker
    

Then, you can download an iso image for which you want to build an addon.

  • Download an iso image of any Ubuntu release, e.g. Xubuntu, Lubuntu or Ubuntu:

      wget -c http://de.releases.ubuntu.com/16.10/ubuntu-16.10-desktop-amd64.iso
    

Adding Files

We can add files to the live image. This makes for a simple addon. In the started live image, we want to find a file README.txt in the /home/ folder with a small explanation.

Now, when you start the live system, the file should be present.

Install Software

There is a software which you want to have installed on the live system. I assume you want to install the package git.

  • Create the addon:

      ./make-addon.sh *.iso git.squashfs \
                      -C 'apt-get update' \
                      -c 'apt-get -y install git'
    

Line 1 uses the .iso file you downloaded an wants git.squashfs as the output file.
In line 2, you update the sources of distribution. This may be useful if the install command fails because the software was not found. The cause is probably that the iso image is some days old the the location of the package is not up-to-date.
In line 3, git is installed.

Note the different cases -C and -c for the commands. The difference is: Every change to the file system with -c is added to the addon. Changes made with -C do not get added to the file system. -C keeps the addon small and reduces the risk that two addons change the same files, not knowing of each other.

Now, when you start the live system, git should be installed.

If you are interested in more examples, see the examples folder and read the scripts.

Install An Addon

To install an addon, you can choose from these options:

Install Addon On Existing USB Device

I assume you created a live usb stick and the contents of an iso were copied onto the stick. Then, you can find the casper folder somewhere on your usb device. If not, there might be any folder with a file named filesystem.squashfs.

  1. Copy your addon to the folder of the filesystem.squashfs file.
  2. Then, you can eject/unmount the device and wait for the copied files to be synced onto the usb device.
  3. Then, you can unplug it and plug into your computer.

Add Addon To Iso Image

TODO: describe add-addons-to-iso.sh

live-addon-maker's People

Contributors

niccokunzmann avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.