Return to the main OBI page


Make a tarball with the One Button Installer

Introduction

Tarball as backup or in order to port the system to another computer

You can make a tarball of your current installed system as it is, if it has only two partitions, the root partition and a swap partition.

(Skip preparing for an OEM installation, when you want to make a tarball from a system that is installed with a normal user id and a password, that you select.)

OEM

You can make a tarball 'general' using the OEM configuration option.

In the Ubuntu flavours including Kubuntu, Lubuntu, standard Ubuntu, Ubuntu Gnome and Xubuntu, you can press F4 at an early stage of the installation to make it an OEM installation. This is not fully implemented in the re-spin Bento, but I found a tip via the internet, and was able to make it work in Bento. It is worth testing the same method in other re-spins of Ubuntu (although it does not work in all of them; I failed using it in Linux Mint 13 'Maya' Cinnamon 32-bit, based on Ubuntu 12.04 LTS).

Preparation when built in (F4) OEM configuration does not work

User input

Install the system manually from an ISO file with the following IDs:

    User name: OEM
    Login name: oem
    Password:123456  # can be anything
    Hostname: oem    # that is 'computer name'

It is not important if the oem user will be automatically logged in or not. A user in that stage probably needs the password anyway. If [s]he wants to add a program package, superuser privileges are necessary and the password must be used.

OEM-config

Install oem-config like this:

   sudo apt-get install oem-config
   sudo apt-get install oem-config-gtk

and copy the starter from the menu to the desktop for

   sudo oem-config-prepare

Language support

Finally to make it easier to install full language support, install (if not already installed)

   sudo apt-get install language-selector-gnome

and the end user should run 'Language Support' from the Settings menu, select and install the own language and probably make it work for the whole system. After reboot it will work properly (at least Swedish, also keyboard settings).

Tweaking

You may or may not want to add or tweak something else. But remember that a lot of tweaking is specific to the user's environment, and that kind of tweaks will not be ported to the new user, but will be wiped, when the user oem is wiped.

Check that the system is prepared

Anyway, let us say that the system is as you want it. Maybe with some tweaks by you, but no proprietary driver, and only two partitions, a root partition and a swap partition.

Cleaning

I usually clean the cached files with the *janitor* of Ubuntu Tweaks

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

Maybe you prefer to do it manually or with some other method.

Make tarballs

If you want to, you can make two tarballs like I did with Bento

Bento12.04.04-oem0.tar.xz  # in OEM mode, password: 123456
Bento12.04.04-oem1.tar.xz  # OEM: ready for the end user

But if you think it is enough with one tarball, make it 'ready for the end user', in other words after activating the 'end-user-icon'.

Boot into the One Button Installer

Shut down the system. Insert a USB drive with the OBI. Boot into the OBI. Check which partition is the root partition (the system to be imaged to a tarball. It is convenient, if it is /dev/sda1, but possible with other partitions too.

zmktbl

../zmktbl.png

One Button Installer version 3.0: graphical tool to make tarballs; Lubuntu system updated

zmktbl, a graphical tool to make tarballs, is added to the OBI system. An icon on the desktop brings you directly to the graphical tool, when you run the Lubuntu desktop.

This should work without much instructions, but

  • it is recommended to save the tarballs in the directory /tarballs, if it has write access and there is enough free space,

  • otherwise (for example in systems booted from ISO files) you should select a directory in a partition with enough free space for the tarball.

In graphics mode, you get to zmktbl.

In text mode, and if /dev/sda1 contains the root partition of the system to be imaged, go ahead and select 'Make tarball' at the starter menu.

Run mktbl from the bash shell

Otherwise, quit to the bash shell.

Compression

The One Button Installer can manage xz files as well as gz files. The xz files are compressed with xz which is often 20% or more efficient (smaller files) compared to gzip for gz files. During a test with low RAM, 128 MB, extracting the tarball with xz used 62 MB while extracting with gzip used 49 GB. xz is slower, but downloading is usually the bottleneck, so small files are preferred.

The default compression is using xz (starting with version 1.1). You must run mktbl from the bash shell to create a gzip tarball.

Start mktbl manually like this

sudo bash mktbl
[sudo] password for sudodus:
----------------------------------------------------------------
Usage:   sudo mktbl [source-partition] [compression] [filename]
Default: sudo mktbl  /dev/sda1  xz  ball
The file extension tar.xz or tar.gz is added automatically
Example: sudo mktbl  /dev/sdb5  gzip  myversion-123
Run from bash if not default
----------------------------------------------------------------
The default is xz compression because it is often 20% or more
efficient (smaller files) compared to gzip for gz files.
----------------------------------------------------------------
Run sudo mktbl to make a tarball of the files in /dev/sda1
You may need to remove some existing tarballs,
'*.tar.gz' and '*.tar.xz' from the tarballs directory
to make space for the new tarball
These main commands are prepared:
mount /dev/sda1 /mnt
cd /mnt
tar -cvJf ~/tarballs/ball.tar.xz .
Do you want to continue? (y/n)

Answer n (no) and edit the command like, for example

sudo bash mktbl /dev/sdb5

if /dev/sdb5 contains the system to imaged to a tarball.

xz is the default compression and ball is the default name. Use xz. Add the appropriate name here (without extension) if you wish. You can also rename the file afterwards.

Rename the tarball

If you want to create more than one tarball, you must rename it, otherwise the old tarball

ball.tar.xz

will be overwritten with the new one (if you use the default name).


Return to the main OBI page

OBI/MakeOBItarball (last edited 2015-07-30 10:57:14 by nio-wiklund)