[root tip] [How To] Mini guide to build Manjaro ISO

Mini guide to build an ISO


Prerequisites

  1. lots of diskspace (skip this if your root is sufficiently large)
  2. installing the tools
  3. tools configuration
  4. building

Diskspace


You need a lot diskspace - 15-20G per iso you intend to build

The tools


Install the manjaro-tools-packages requred.

sudo pacman -Syu --needed git base-devel manjaro-chrootbuild manjaro-tools-iso-git manjaro-tools-yaml-git manjaro-tools-base-git

Configure tools


With the tools installed copy the default tools configuration to your home

cp -R /etc/manjaro-tools  ~/.config

Modify the tools configuration to point to your storage partition’s mount point - use your favorite editor to edit the file

micro ~/.config/manjaro-tools/manjaro-tools.conf

Then use git to clone the iso profiles repo in your home

git clone https://gitlab.manjaro.org/profiles-and-settings/iso-profiles

Create a config file ~/.config/manjaro-tools/iso-profiles.conf with content

run_dir=/home/$USER/iso-profiles

Building


The building can be as simple as

buildiso -p lxqt

If you did not change the paths in manjaro-tools.conf the resulting lxqt ISO is stored at

/var/cache/manjaro-tools/iso/community/lxqt

Building OEM iso

The profiles for the various hardware vendors supporting Manjaro is located in the oem folder of the iso-profiles.

There you will find profile for minisforum and other OEM branded profiles - e.g. UM350

buildiso -p minisforum-oem-kde-um350

Build an ISO from current system


There is no GUI to create an ISO from current state.

Technically you can use buildiso so I have outlined the commands necessary

I recommend to test them as they are written from memory - flash memory - the kind of memory which is gone in a flash :slight_smile: - after you have tested them you create a script to do lifting for you.

Steps

1. Create a folder in the root filesystem to hold your system

sudo mkdir /mybuild

2. Set permissions on the folder

Setting your user as owner which automagically gives rw access

sudo chown $USER:$USER /mybuild

3. Clone the iso-profiles repo into /mybuild

git clone https://gitlab.manjaro.org/profiles-and-settings/iso-profiles /mybuild/iso-profiles

4. Create a folder to hold your build

mkdir /mybuild/iso-profiles/$USER

5. Copy the relevant profile-folder into mybuild

In this case it is Plasma - it would work for any edition - ensure a unique name the folder - it must be unambigious across iso-profiles subfolders

cp -R /mybuild/iso-profiles/manjaro/kde /mybuild/iso-profiles/$USER/my-kde

6. Clean up your system for orphans

pamac remove --orphans

7. Create a package list of your current system

Excluding custom packages

pacman -Qqen > ~/my-packages.txt

8. Create new filtered list

Use the comm utility comparing the two files ~/my-packages.txt and /rootfs-pkgs.txt and pipe the result to replace the my-kde profile’s Packages-Desktop file

comm -23 <(sort ~/my-packages.txt) <(sort /rootfs-pkgs.txt) > /mybuild/iso-profiles/$USER/my-kde/Packages-Desktop

9. Create the folder to hold your personal settings

mkdir -p /mybuild/iso-profiles/$USER/my-kde/desktop-overlay/etc/skel

10. Copy the content of your home

Place the content in the desktop-overlay/etc/skel folder - make sure to be selective and remove unwanted files like Documents and Pictures and whatnot

cp -R $HOME/. /mybuild/iso-profiles/$USER/my-kde/desktop-overlay/etc/skel

11. Run buildiso

Use the -t target directory argument to place your build inside the /mybuild folder.

If you have used buildiso previously with another profile-root you need to edit the file ~/.config/manjaro-tools/iso-profiles.conf to point to the folder /mybuild/iso-profiles

buildiso -p my-kde -t /mybuild

The size of the final ISO will be reflected by the packagelist and the size of your $HOME folder

More reading


More info can be found at the wiki - including how to include your own web based package repository

7 Likes

This is not a support thread.

If you have questions please create a new topic - link to this.