Difference between revisions of "Build Manjaro ISOs with buildiso"

Updating this guide
imported>ABOhiccups
imported>ABOhiccups
(Updating this guide)
Line 1: Line 1:
__TOC__
__TOC__
This is a detailed tutorial aimed at beginners how to build and optionally customize Manjaro ISOs.
Manjaro Openbox edition is used as example throughout this tutorial, but there are many more pre-made Manjaro ISO profiles available: cinnamon, enlightenment, gnome, i3, kde, kde5, lxde, lxqt, lxqt-openrc, mate, net, net-minimal, netbook, net-openrc, openbox, openbox-legacy, pantheon, pekwm-openrc, xfce, xfce-minimal, and xfce-openbox-openrc.




=Prerequisites=
=Prerequisites=


''manjaro-tools-iso-profiles'' is needed for pre-built Manjaro ISO profiles.
Before we began. You need Kernel linux44 or newer.
 
''buildiso'' is needed to build an image/ISO from these profiles. Before March 2015, it used to be part of the ''manjaroiso'' package, but now it is integrated into ''manjaro-tools-iso''.
 
Please make sure you always use the absolute latest ''manjaro-tools-iso'' and ''manjaro-tools-iso-profiles'' packages available in order to minimize the chance of random or unexplained bugs.  
 


Furthermore, at least kernel version 3.18 or newer is needed on your host system and ISO for <code>aufs</code> support. <code>aufs</code> or the more modern <code>OverlayFS</code> is needed for building ISO images. <code>OverlayFS</code> support can be enabled in your <code>manjaro-tools.conf</code> file, but it requires at least kernel version 4.0 or newer on both your host system and ISO.
It is recommend to download the latest version of [https://sourceforge.net/projects/manjarolinux/files/?source=navbar Manjaro Distribution].




==Install manjaro-tools-iso==
==Install manjaro-tools-iso==


''buildiso'' has often bugs introduced my new upstream package changes, therefore it is recommended to install the absolute latest version with the most recent bug fixes. A relatively easy way is to install ''manjaro-tools-iso'' from the unstable repositories of Manjaro:
To get started you need to download the following packages.


* '''manjaro-tools-base'''
* '''manjaro-tools-iso'''
* '''manjaro-efi-shell'''
* '''manjaro-isolinux'''


If you are using the [https://wiki.manjaro.org/index.php?title=Access_the_Unstable_Repositories unstable repositories] already:


sudo pacman -S manjaro-tools-iso
==Install manjaro-iso-profiles==


You will also need to download manjaro-iso-profiles from Package Manager.


There are three manjaro-iso-profiles packages to choose.


If you do '''not''' use the unstable repositories, you need to install ''manjaro-tools-base'' and ''manjaro-tools-iso'' from the unstable repositories manually:
* '''manjaro-iso-profiles-official'''
* '''manjaro-iso-profiles-minimal'''
* '''manjaro-iso-profiles-community'''


Please keep in mind that you need to update/re-install these packages every time a new version gets released.


Go to this Manjaro mirror in your web browser:
You can choose any profiles you want.
http://mirror.netzspielplatz.de/manjaro/packages/unstable/extra/
Choose your architecture and search for the ''manjaro-tools-base'' and ''manjaro-tools-iso'' packages and remember their complete names (especially the version number).  


Then, use your architecture and the name to install ''manjaro-tools-base'' and ''manjaro-tools-iso'' directly, e.g. with these commands:
We're going to choose <code>manjaro-iso-profiles-official</code> along with XFCE to help you understand what you need to do.


sudo pacman -U http://mirror.netzspielplatz.de/manjaro/packages/unstable/extra/x86_64/manjaro-tools-base-0.9.8-3-any.pkg.tar.xz


sudo pacman -U http://mirror.netzspielplatz.de/manjaro/packages/unstable/extra/x86_64/manjaro-tools-iso-0.9.8-3-any.pkg.tar.xz
We do not recommend downloading profiles from GitHub. It may not work for you while building. But, if it does work for you. That's fine.




=Name your own Manjaro Distribution=


Alternatively, you can download and build the complete ''manjaro-tools'' from GitHub directly. In this case, you should build the absolute latest available [https://github.com/manjaro/manjaro-tools/tree/devel manjaro-tools] from the <code>devel</code> branch. This branch is in sync with the <code>devel</code> branch of [https://github.com/manjaro/manjaro-tools-iso-profiles/tree/devel manjaro-tools-iso-profiles].
Open Thunar Root and go to this file


/usr/share/manjaro-tools/isolinux/gfxboot.cfg


==Install manjaro-tools-iso-profiles==
Find '''product=Manjaro Linux''' and change from '''Manjaro Linux''' to whatever you want to name it.


Clone ''manjaro-tools-iso-profiles'' profiles from GitHub (this requires the ''git'' package to be installed on your system). Open your terminal in your home directory (or any other directory you want) and type:
===Example:===


  git clone https://github.com/manjaro/manjaro-tools-iso-profiles.git
  ; Sections are read in the order given in base::layout, with section 'base'
 
; implicitly added at the end. If a config value is given more than once,
 
; the first entry wins.
==Update manjaro-tools-iso-profiles==
;
 
; If a screen resolution can't be set, 640x480 is used as fallback (and
Whenever you want to update the ''manjaro-tools-iso-profiles'' directory with the latest files from GitHub, execute these commands:
; section '640x480' added to the layout list).
 
;
  cd manjaro-tools-iso-profiles
; Setting livecd=1 implicitly adds section 'live' to the layout list.
 
;
  git pull origin master
; Color values: 24 bit RGB (e.g. 0xff0000 = red).
;
[base]
; theme name
theme=artwork-gfxboot
; product name
product='''NAME YOUR MANJARO DISTRIBUTION HERE'''
; other sections to read
layout=800x600,live,install
; sound volume (0..100)
volume=70
; menu background transparency (0..255)
menu.transparency=0x0
; default font
font.normal=16x16.fnt
; main menu font
font.large=16x16.fnt
; max. visible main menu items
mainmenu.entries=8
; minimal main menu selection bar width
mainmenu.bar.minwidth=300
; main menu selection bar transparency (0..255)
mainmenu.bar.transparency=0
; main menu colors
mainmenu.bar.color=0xffffff
mainmenu.normal.fg=0xffffff
mainmenu.selected.fg=0x000000
; boot option colors
bootopt.label.fg=0xffffff
bootopt.text.fg=0xffffff
; progress bar color
progress.bar.color=0x295202
; menu colors
menu.normal.bg=0xd8deed
menu.normal.fg=0x000000
menu.normal.alt.fg=0x606060
menu.selected.bg=0x6c6c6c
menu.selected.fg=0xffffff
; window colors
window.bg=0xd8deed
window.fg=0x000000
window.title.bg=0x217b05
window.title.fg=0xffffff
window.title.error.bg=0xc00000
; help system colors
help.link.fg=0x0000a0
help.link.selected.fg=0xffffff
help.link.selected.bg=0x0000a0
help.highlight.fg=0x009000
; panel colors
panel.fg=0xffffff
panel.title.fg=0xffffff
panel.f-key.fg=0xffe050
; default keymap (e.g. de-latin1-nodeadkeys or cz-lat2-us)
keymap=
; replace underscores ('_') with space in menu entries
_2space=1
[800x600]
; screen size
screen.size=800,600
; background image
background=back800x600.jpg
; upper left corner, if x = -1, center horizontally
mainmenu.pos=-1,240
; boot option input field position
bootopt.pos=263,480
[640x480]
; screen size
screen.size=640,480
; background image
background=back640x480.jpg
; upper left corner, if x = -1, center horizontally
mainmenu.pos=-1,170
; boot option input field position
bootopt.pos=263,380
[live]
; show welcome animation
welcome=1
; set livecd flag
livecd=1
; main menu items where user can't add boot options
nobootoptions=hdt,memtest
; move down one menu entry the first time an F-key is used
autodown=0
; F-key assignments, see install section for doc
; serial line setup (up to four lines)
; format: port,baud,dev
- port: 0-3: first four BIOS serial lines (COM1-COM4); >=4: I/O port (0x3f8)
;  - baud: baud rate (e.g. 115200); 0 = autodetect (considers baud rates >= 9600)
  - dev: linux device name (e.g. ttyS0)
; - all lines are set up with 8 bits, no parity, 1 stop bit
; - if the bootloader also has a serial line setup, the port is
;  automatically used
serial.line0=0,0,ttyS0
serial.line1=1,0,ttyS1
serial.line2=
serial.line3=
key.F2=lang
key.F3=video
key.F4=kernelopts
key.F5=
key.F6=
key.F7=
key.F8=
key.F11=
key.F12=
; show keymap menu as submenu in lang dialog
keymap.submenu=1
; add 'keytable' option with current keymap
addopt.keytable=1
; add 'lang' option with current locale
addopt.lang=1
; add 'layout' option with current keyboad layout
addopt.layout=1
   




Line 70: Line 183:
==ISO profile overview==
==ISO profile overview==


Your <code>manjaro-tools-iso-profiles</code> folder contains these ISO profiles:
Open Thunar Root and go to this directory.
 
cinnamon/
enlightenment/
gnome/
i3/
kde/
kde5/
kde-minimal/
kde-openrc/
lxde/
lxqt/
lxqt-openrc/
mate/
net/
netbook/
net-minimal/
net-openrc/
openbox/
pantheon/
shared/
sysmenu/
'''xfce'''/
xfce-minimal/
xfce-openrc/
README.md
 
The <code>shared</code> ISO profile is special, because it contains common files for all Manjaro ISO profiles (unless the profile creators explicitly used their own customized files)


/usr/share/manjaro-tools/iso-profiles/official/xfce/


Let's take a closer look at the XFCE profile folder (marked above):
Let's take a closer look at the XFCE profile folder (marked above):


  '''xfce-overlay'''
  '''xfce-overlay'''
isolinux -> usr/share/manjaro-tools/isolinux/ <========== This directory folder is not in profile folder. The directory folder was locatated at.
  mkinitcpio.conf -> ../shared/mkinitcpio.conf
  mkinitcpio.conf -> ../shared/mkinitcpio.conf
  root-overlay -> ../shared/root-overlay/
  root-overlay -> ../shared/root-overlay/
Line 114: Line 200:


* ''xfce-overlay'': After every successful installation of your ISO (XFCE) the files and folders in here will get copied over.
* ''xfce-overlay'': After every successful installation of your ISO (XFCE) the files and folders in here will get copied over.
* ''isolinux'': Contains files important for booting your ISO. This includes isolinux.cfg file to start syslinux bootloader.
* ''mkinitcpio.conf'' holds the information of all needed kernel modules.
* ''mkinitcpio.conf'' holds the information of all needed kernel modules.
* ''root-overlay'': Similar to ''xfce-overlay'', but it contains files and folders important to all Manjaro installations and LiveCDs.
* ''root-overlay'': Similar to ''xfce-overlay'', but it contains files and folders important to all Manjaro installations and LiveCDs.
Line 121: Line 206:
* ''Packages-Live'': This file contains packages, which will only get installed on the LiveCD.
* ''Packages-Live'': This file contains packages, which will only get installed on the LiveCD.
* ''Packages-Xfce'': This file contains packages specific to your ISO (XFCE) installation. All packages will also get installed on LiveCDs.
* ''Packages-Xfce'': This file contains packages specific to your ISO (XFCE) installation. All packages will also get installed on LiveCDs.
* ''Packages-Mhwd'': This file contains Xorg packages important to all Manjaro installations and LiveCDs.
* ''Packages-Mhwd'': This file contains Mhwd packages important to all Manjaro installations and LiveCDs.
* ''profile.conf'' contains basic settings for your ISO installation and LiveCD.
* ''profile.conf'' contains basic settings for your ISO installation and LiveCD.


Line 127: Line 212:


All folders and files specific to your ISO (in this example XFCE) are marked. You can change them to your liking.
All folders and files specific to your ISO (in this example XFCE) are marked. You can change them to your liking.


==Modifying an ISO profile==
==Modifying an ISO profile==
Line 138: Line 224:


  └── etc
  └── etc
     ├── lightdm
    ├── lightdm
      │   └── lightdm-gtk-greeter.conf
    │   └── lightdm-gtk-greeter.conf
     ├── mdm
    └── samba
     │   └── custom.conf
        └── smb.conf
     └── '''skel''' <========== This Folder needs to be create.
 
Go to this directory.


After the XFCE ISO has been successfully installed all files and folder in ''xfce-overlay'' folder get copied over to the installed system. This includes settings/config files but also themes and backgrounds/pictures.
/usr/share/manjaro-tools/iso-profiles/official/xfce/xfce-overlay/etc/


There is one special folder (marked above):
Then create '''skel''' folder. This is where you can clone everything you see on your Desktop Screen to ISO.


manjaro-tools-iso-profiles/xfce/xfce-overlay/etc/skel
 
After the XFCE ISO has been successfully installed all files and folder in ''xfce-overlay'' folder get copied over to the installed system. This includes settings/config files but also themes and backgrounds/pictures.


All files and folder in here will get copied to the home folder. Most hidden files and their structure in <code>manjaro-tools-iso-profiles/xfce/xfce-overlay/etc/skel/</code> should be already familiar to you, because your home folder looks very similar.
All files and folder in here will get copied to the home folder. Most hidden files and their structure in <code>manjaro-tools-iso-profiles/xfce/xfce-overlay/etc/skel/</code> should be already familiar to you, because your home folder looks very similar.


===profile.conf===
===profile.conf===
Line 157: Line 246:
  ###### use this file in the profile ######
  ###### use this file in the profile ######
  ##########################################
  ##########################################
# possible values: openrc,systemd
initsys="systemd"
   
   
  # use multilib packages; x86_64 only
  # use multilib packages; x86_64 only
  # multilib="true"
  # multilib="true"
   
   
  displaymanager="sddm"
  displaymanager="lightdm"
   
   
  # Set to false to disable autologin in the livecd
  # Set to false to disable autologin in the livecd
Line 176: Line 262:
   
   
  # use pxe boot; initcpio hook
  # use pxe boot; initcpio hook
  pxe_boot="false"
  # pxe_boot="true"
   
   
  ################ install ################
  ################ install ################
# unset defaults to given value
# kernel="linux318"
   
   
  # unset defaults to given value
  # unset defaults to given value
Line 187: Line 270:
   
   
  # set uefi partition size
  # set uefi partition size
  # efi_part_size=31M
  # efi_part_size=32M
   
   
  # unset defaults to given value
  # unset defaults to given value
Line 194: Line 277:
  # unset defaults to given values
  # unset defaults to given values
  # names must match systemd service names
  # names must match systemd service names
  # start_systemd=('bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'org.cups.cupsd' 'tlp' 'tlp-sleep')
  start_systemd=('avahi-daemon' 'bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'org.cups.cupsd' 'tlp' 'tlp-sleep')
 
disable_systemd=('pacman-init')
  ...
# unset defaults to given values,
# names must match openrc service names
# start_openrc=('acpid' 'bluetooth' 'cgmanager' 'consolekit' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager')
# disable_openrc=('pacman-init')
################# livecd #################
# unset defaults to given value
# hostname="manjaro"
# unset defaults to given value
# username="manjaro"
# unset defaults to given value
# password="manjaro"
# unset defaults to given values
# addgroups="video,audio,power,disk,storage,optical,network,lp,scanner,wheel"
# unset defaults to given values
# names must match systemd service names
# services in start_systemd array don't need to be listed here
# start_systemd_live=('manjaro-live' 'mhwd-live' 'pacman-init')
# unset defaults to given values,
# names must match openrc service names
# services in start_openrc array don't need to be listed here
# start_openrc_live=('manjaro-live' 'mhwd-live' 'pacman-init')
   


This config file contains setting options. All default settings are commented. If you want to change them, uncomment them (remove the <code>#</code> symbol in front) and change it.
This config file contains setting options. All default settings are commented. If you want to change them, uncomment them (remove the <code>#</code> symbol in front) and change it.
Line 214: Line 326:
===Packages-Xfce===
===Packages-Xfce===


  ### Manjaro Packages
  ######################################################
### THIS FILE WILL INCLUDE shared/Packages-Desktop ###
######################################################
   
   
  ## XFCE Main Packages
  ## XFCE Main Packages
  ffmpegthumbnailer
  ffmpegthumbnailer
  gconf                   # fix qt-theme
  gconf # fix qt-theme
  gnome-keyring           # fix wlan segfault
  gnome-keyring # fix wlan segfault
  gufw                     # firewall
  gufw # firewall
# mdm-themes
  accountsservice
  accountsservice
  lightdm-gtk-greeter
  lightdm-gtk-greeter
Line 227: Line 340:
  light-locker
  light-locker
  manjaro-settings-manager
  manjaro-settings-manager
  >i686 gcc
  menulibre
  >x86_64 gcc-multilib
mugshot
network-manager-applet
networkmanager-openconnect
networkmanager-openvpn
networkmanager-pptp
networkmanager-vpnc
orage
#plank
poppler-glib
thunar-archive-plugin
thunar-media-tags-plugin
xcursor-simpleandsoft
xcursor-vanilla-dmz-aa
xcursor-menda
xfce4
libgsf      # support ODF and
libopenraw  # RAW thumbnailing
#xscreensaver
git
openssh
## XFCE Extra Packages
xfce4-artwork
xfce4-battery-plugin
xfce4-clipman-plugin
xfce4-cpufreq-plugin
xfce4-cpugraph-plugin
#xfce4-datetime-plugin
xfce4-dict
xfce4-diskperf-plugin
xfce4-fsguard-plugin
xfce4-genmon-plugin
xfce4-mailwatch-plugin
xfce4-mount-plugin
xfce4-mpc-plugin
xfce4-netload-plugin
xfce4-notes-plugin
xfce4-notifyd
xfce4-screenshooter
xfce4-sensors-plugin
xfce4-smartbookmark-plugin
xfce4-systemload-plugin
xfce4-taskmanager
xfce4-time-out-plugin
xfce4-timer-plugin
xfce4-verve-plugin
xfce4-wavelan-plugin
xfce4-weather-plugin
xfce4-whiskermenu-plugin
xfce4-xkb-plugin
## Applications
catfish # needed for desktop search
engrampa-thunar-plugin
firefox-gtk2
galculator-gtk2
gimp
gksu
gnome-vfs
gparted
guayadeque
gvfs
gvfs-afc
gvfs-gphoto2
gvfs-mtp
gvfs-smb
hexchat
manjaro-welcome
#midori
mlocate
mousepad
#parole
pidgin
#evince
#raktpdf
qpdfview
qpdfview-djvu-plugin
qpdfview-ps-plugin
thunderbird
viewnior
vlc
xfburn
#xnoise
yelp
open-fuse-iso
p7zip
xorg-xkill
## Network
netctl
networkmanager
networkmanager-dispatcher-ntpd
openresolv
blueman
#samba
#thunar-shares-plugin-manjaro
## Artwork
menda-circle-icon-theme
faenza-green-icon-theme
gtk-theme-ceti
menda-themes
menda-themes-dark
gnome-themes-standard
manjaro-artwork
xfce-theme-greenbird
plymouth-theme-manjaro-elegant
xfce4-weather-plugin-menda-circle-icons
## Packages for Sound and Audio
gst-libav
gst-plugins-bad
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
gstreamer0.10-bad-plugins
gstreamer0.10-base-plugins
gstreamer0.10-good-plugins
gstreamer0.10-ugly-plugins
flashplugin
libdvdcss
manjaro-alsa
manjaro-pulse
pavucontrol
pa-applet
pulseaudio-bluetooth
pulseaudio-ctl
pulseaudio-zeroconf
## Package management
pamac
## Games
steam-manjaro
## Fonts
#adobe-source-sans-pro-fonts
cantarell-fonts
## Java
jre8-openjdk
jre8-openjdk-headless
icedtea-web
## Printing
manjaro-printer
## Office
#abiword
#gnumeric
libreoffice-still
## AUR Access
autoconf
automake
binutils
bison
fakeroot
flex
gcc
  >multilib gcc-multilib
libtool
m4
make
patch
subversion
yaourt
## Documentation
manjaro-documentation
manjaro-xfce-settings
manjaro-backgrounds
   
   
...


This file contains a list of packages, which will get installed on your installed ISO (XFCE) and the LiveCD. This is a package list with Xfce specific packages (and packages you like to add to your custom Manjaro ISO) of multiple package lists in your ISO profile. The other package lists are more generic.
This file contains a list of packages, which will get installed on your installed ISO (XFCE) and the LiveCD. This is a package list with Xfce specific packages (and packages you like to add to your custom Manjaro ISO) of multiple package lists in your ISO profile. The other package lists are more generic.
Line 245: Line 529:
===Adding AUR packages===
===Adding AUR packages===


If you want to add AUR packages to your ISO, you need to create a online repository and add it to the right <code>pacman-XXXXX.conf</code> file in your ISO profile.
If you want to add AUR packages to your ISO, you need to create a online repository and add it to the right <code>pacman-XXXXX.conf</code> file in <code>/usr/share/manjaro-tools/</code>
 


=manjaro-tools.conf=
=manjaro-tools.conf=
Line 264: Line 549:
=Build your ISO=
=Build your ISO=


Navigate to the <code>manjaro-tools-iso-profiles</code> folder:
Open Terminal and enter this command to Root Terminal.
 
su
 
Navigate to <code>manjaro-tools</code> folder:


  cd manjaro-tools-iso-profiles
  cd /usr/share/manjaro-tools/




Build your ISO with the following command:
Build your ISO with the following command:


  sudo buildiso -p openbox
  buildiso -p xfce


You need to specify the name of your ISO profile after the <code>-p</code> argument. In this case, it is <code>openbox</code>.
You need to specify the name of your ISO profile after the <code>-p</code> argument. In this case, it is <code>xfce</code>.


If the build process fails with an error, start it again.  
If the build process fails with an error, start it again.  
Line 288: Line 577:
You can use arguments with the <code>buildiso</code> command for more build options:
You can use arguments with the <code>buildiso</code> command for more build options:


  sudo buildiso -p xfce-minimal -a i686 -b unstable
  buildiso -p xfce -a i686 -b stable


* <code>-a</code> let's you build for other architectures. Here, it builds a 32bit ISO image on a 64bit host system. You can also set this in your <code>manjaro-tools.conf</code> file.
* <code>-a</code> let's you build for other architectures. Here, it builds a 32bit ISO image on a 64bit host system. You can also set this in your <code>manjaro-tools.conf</code> file.
Line 300: Line 589:
After a successful or failed build, you can get rid of most data (the "raw" ISO with all downloaded packages) by deleting this folder:
After a successful or failed build, you can get rid of most data (the "raw" ISO with all downloaded packages) by deleting this folder:


  sudo rm -r /var/lib/manjaro-tools/buildiso/openbox/
  sudo rm -r /var/lib/manjaro-tools/buildiso/xfce/




Line 331: Line 620:
* [https://github.com/manjaro/manjaro-tools manjaro-tools on GitHub] (always up to date)
* [https://github.com/manjaro/manjaro-tools manjaro-tools on GitHub] (always up to date)
* [[Manjaro-tools]] (outdated)
* [[Manjaro-tools]] (outdated)
* [https://forum.manjaro.org/index.php?topic=31731.0 How to create your own Manjaro Distro with Manjaro-Tools?]
* [https://forum.manjaro.org/index.php?topic=21976.0 simple buildiso tutorial] (outdated)
* [https://forum.manjaro.org/index.php?topic=21976.0 simple buildiso tutorial] (outdated)
* [https://forum.manjaro.org/index.php?topic=20167.0 How to use Manjaro-Tools] (outdated)
* [https://forum.manjaro.org/index.php?topic=20167.0 How to use Manjaro-Tools] (outdated)
Anonymous user