New packages to ISO

From Hamara Wiki
Revision as of 13:31, 24 June 2018 by Unixia (talk | contribs) (Parameters)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Hamara Live Build

We use the code here to build the ISO. Before you proceed, make sure you read about the roles of different sub-directories as explained in the README.

Mechanism behind building ISO

Before you learn to include packages in Hamara ISO, it will be great if you understand what will happen when you add one.

                                       | Copy important scripts required pre, post and |
                                       |          during the build procedure           |
                                          | Cleanup previously build residue (if any) |
                                         | Download packages from the specified mirror |
                                                       | Magical build |
                                      | Calculation and verification of checksum for packages |
                                          | Write the iso, checksum, packages to output |


Before building the ISO, you need to take care of certain parameters and choose the correct values for them as per your need.


Like any other distro, you will require a Mirror where you can download all your packages from.

Possible values: or


The release name of Hamara which you want to build.

Possible values: hamara-sugam (latest) or hamara


Architecture of the machine where you wish to run the Operating System.

Possible values: amd64 or i386 or all


Version of the Release you're targeting in your end product.

Possible values: alpha or beta or all

Adding new packages

At this point, you should have cloned the hamara-live-build repo and looked up the roles of different folders.


Look at the tree structure below. We're concerned with the package-lists folder for this task.

├── config.d
│   ├── hamara
│   │   └── config
│   │       └── package-lists
│   └── hamara-sugam
│       └── config
│           ├── hooks
│           ├── includes.chroot
│           └── package-lists
└── data
    ├── hamara
    │   ├── bootloaders
    │   │   ├── grub-pc
    │   │   ├── isolinux
    │   │   └── syslinux
    │   └── lb_scripts
    └── hamara-sugam
        ├── bootloaders
        │   ├── grub-pc
        │   ├── isolinux
        │   └── syslinux
        └── lb_scripts

Understanding multiple files in package-lists

package-lists directory has mutiple files for different purposes.

├── desktop.list.chroot
├── live.list.chroot
├── live-packages.list.chroot_live
├── memtest.list.chroot
├── non-free.list.chroot
├── tools.list.chroot
└── uefi.list.binary

Pay attention to the part after last .. They define the stages when the packages in that file are to be installed. The first part of every file is used to segregate packages as per their role.

For example, desktop.list.chroot should have packages relating to DE and Themes. memtest.list.chroot should have packages for memory testing.

Things to check before adding a package to a list

  • The package should not affect any existing package. Check for conficts.
  • The right list to add it to.
  • The right place to add it. Follow the existing pattern and add the package name in lexicographical order.


Build the ISO while taking care of the parameters mentioned earlier with the command below.

./mkbuild iso amd64 hamara-sugam final

Replace the architecture, mirror, release and version as per your need.


After adding the package, build an ISO for yourself and check it in live mode. It should have the package you added to the list.

Small exercise

If you're still unsure, try doing something simple. Follow the steps below to remove Firefox from Hamara.

Step 1

Go to ./hamara-live-build/config.d/hamara-sugam/config/package-lists and open tools.list.chroot in your favorite editor.

Step 2

Look for firefox and remove it. Save the file and exit.

Vim assistance: Press Esc. Then, type :wq

Step 3

Build the ISO using, ./mkbuild iso amd64 hamara-sugam final from the root of your project.

Step 4

Burn the ISO to any device using Etcher and live boot into any system.

Step 5

Click on Top left navigation button and search for Firefox.

Voila! No results for Firefox.

Now, try adding it again and follow the same procedure.

Congratulations on adding your first package to Hamara ISO!

Things to take care of

  • Do not add unnecessary whitespaces, newlines, comments.
  • Add package names lexicographically in any list.
  • Test the build before submitting a patch.
  • Explain your changes very well in your commit message. Refer here for a stringent guide.

Possible obstructions

  • If you haven't deleted the previous build_area, you might encounter unusual errors while building the ISO.
  • Build architecture, release mismatch than what you wished for i.e. typos.
  • Package checksum does not match the anticipated correct value.

Getting out of obstructions

  • Make sure you've removed previous build_area and output.
  • You should be building a recent release, older releases might be unmaintained.
  • If you think its a bug, consider submitting it here


Still unsure about things? Connect with developers for assistance here.