Создание ISO-файлов Manjaro с помощью buildiso
Views
Actions
Namespaces
Variants
Tools
Предпосылки
Это подробное описание установки и настройки инструментов и процесса сборки.
Это требование - либо загрузить и установить последнюю версию Manjaro, либо работать с хорошо поддерживаемой системой Manjaro. Важно, чтобы ваша система была обновлена последними версиями ядра и пакетов.
Установка инструментов Manjaro
Для начала работы вам понадобятся следующие пакеты:
Мы будем работать с официальным XFCE, чтобы помочь вам понять, что нужно делать.
Профиль ISO
Загрузите последние профили ISO
Последние версии профилей можно найти на gitlab Manjaro. Вы можете загрузить их напрямую, используя команду:
.
Обзор профиля ISO
Профиль ISO для xfce теперь можно найти по адресу
Давайте подробнее рассмотрим каталог профиля XFCE (отмечен выше):
desktop-overlay live-overlay -> ../../shared/manjaro/live-overlay Packages-Desktop Packages-Live -> ../../shared/Packages-Live Packages-Mhwd -> ../../shared/Packages-Mhwd Packages-Root -> ../../shared/Packages-Root profile.conf
- desktop-overlay: после каждой успешной установки вашего ISO файлы и каталоги, находящиеся здесь, будут скопированы.
- live-overlay: аналогично desktop-overlay. Файлы и каталоги, находящиеся здесь, будут копироваться только на LiveCD вашего ISO.
- Packages-Desktop: этот файл содержит пакеты для установки ISO. Все пакеты также будут установлены на LiveCD.
- Packages-Live: этот файл содержит пакеты, которые будут установлены только на LiveCD.
- Packages-Mhwd: этот файл содержит пакеты Mhwd, важные для всех установок Manjaro и LiveCD.
- Packages-Root: этот файл содержит базовые пакеты, важные для всех установок Manjaro и LiveCD.
- profile.conf содержит основные настройки для вашей установки ISO и LiveCD.
Как вы, вероятно, заметили, некоторые из них являются всего лишь символическими ссылками на ISO-профиль shared
. Хорошей практикой является никогда не изменять файлы или каталоги в ISO-профиле shared
. Если вы когда-нибудь захотите их изменить - сначала скопируйте их в каталог вашего ISO-профиля и удалите символическую ссылку.
Все каталоги и файлы, специфичные для вашего ISO, выделены полужирным шрифтом. Вы можете изменить их по своему усмотрению.
Изменение профиля ISO
Наиболее распространенными местами для настройки ISO-профиля являются 3 каталога, отмеченные выше: desktop-overlay, profile.conf, Packages-Desktop:
desktop-overlay
Директория desktop-overlay выглядит следующим образом:
$ tree ~/iso-profiles/manjaro/xfce/desktop-overlay/etc
../iso-profiles/manjaro/xfce/desktop-overlay/ ├── etc │ ├── fonts │ │ └── conf.d │ │ └── 70-no-bitmaps.conf │ └── lightdm │ ├── lightdm.conf │ └── lightdm-gtk-greeter.conf └── usr └── share └── icons └── default └── index.theme
Перейдите в эту директорию.
Затем создайте каталог skel. В нем вы сможете клонировать в ISO все, что видите на экране рабочего стола.
После успешной установки ISO все файлы и каталоги из desktop-overlay копируются на установленную систему. Сюда входят файлы настроек/конфигурации, а также темы и фоны/картинки.
Все файлы и каталоги, находящиеся здесь, будут скопированы в домашний каталог. Большинство скрытых файлов и их структура в ~/iso-profiles/manjaro/xfce/desktop-overlay/etc/skel/
должны быть вам уже знакомы, поскольку ваша домашняя директория выглядит очень похоже.
Клонирование пользовательских обоев рабочего стола
Чтобы клонировать ваш рабочий стол с пользовательскими обоями. Откройте новый менеджер файлов и перейдите к этому файлу:
~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
Измените все каталоги изображений на те, в которых находились ваши пользовательские обои. Например:
/usr/share/backgrounds/<ВАШЕ ИЗОБРАЖЕНИЕ ЗДЕСЬ>
Пример
A sample `xfce4-desktop.xml` can be viewed by unfolding this block
Перейдите в эту директорию:
Затем создайте каталог usr/share/backgrounds
и поместите в него свои пользовательские обои.
profile.conf
Полное содержание примера profile.conf можно посмотреть, развернув этот блок. Всегда лучше использовать последнюю версию, а не копировать эту.
This config file contains setting options. All default settings are commented. If you want to change them, uncomment them (remove the #
symbol in front) and change it.
The following settings are noteworthy:
multilib=
setting belongs to the>multilib
flag in your package lists. multilib will install basic 32bit libraries on 64bit systems. This increases compatibility for 32bit applications on 64bit systems.displaymanager=
sets the display / login manager your system uses. You need to list your display manager in your package list, too.nonfree_xorg=
refers to proprietary graphics drivers.netinstall=
: do not usechrootcfg=
: do not usekernel=
lets you set the installed kernel. Do not include any kernels in your package list! This setting is all you need.enable_systemd=
let's you set systemd services, which get started on the installed system (and with a similar setting on the livecd).enable_openrc=
: do not use
Packages-Desktop
An example `Packages-Desktop` file can be viewed by unfolding this block. It is always best to use the latest version instead of copying this one.
This file contains a list of packages, which will get installed on your installed ISO (XFCE) and the LiveCD (the packages in Packages-Live file only get installled on the live ISO). 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.
You can add or remove package names from this list as you like. You do not need to worry about dependencies when adding package names, just make sure the package name is spelled correctly and the package is available in the Manjaro repositories.
#
marks a comment. The rest of the line after the #
symbol gets ignored.
Добавление пакетов AUR
If you want to add AUR packages to your ISO, you need to create a online repository and add it to a file user-repos.conf beside your profile.conf.
Only use your own http enabled repo.
[your-repo-name]
SigLevel = Optional TrustAll Server = http://repo.server.tld/your-repo-name
The article Buildiso with AUR packages: Using buildpkg contains more detailed information on this process.
manjaro-tools.conf
manjaro-tools.conf
is the central configuration file for all tools part of manjaro-tools. Only edit the general and the "buildiso" part to not exceed the scope of this tutorial. If you are not sure what and how to edit it, do not edit it. You can always use arguments with the buildiso
command later.
By default, the systemwide config file is installed in
/etc/manjaro-tools/manjaro-tools.conf
Best practice is to leave the systemwide file untouched and copy the system wide config to your home directory here:
~/.config/manjaro-tools
If the userconfig is present, manjaro-tools/buildiso will load the userconfig values. Best practice is to leave the systemwide file untouched. By default it is commented and shows just initialization values done in code.
Создание собственного ISO
Создайте свой ISO с помощью следующей команды:
Вам необходимо указать имя вашего ISO-профиля после аргумента -p
. В данном случае это <код>xfce.
If the build process fails with an error, start it again.
Attention: The build process needs at least 10 minutes to complete or much longer when you are using HDDs, slow CPUs, or large ISOs.
When the build process finishes successfully, the ISO file and the package list will appear in this folder:
/var/cache/manjaro-tools/iso/
Example:
You can use arguments with the buildiso
command for more build options:
-f
let's you specify if you want the full ISO. If omitted a minimal ISO will be build.-b
let's you specify the branch. You can also set this in yourmanjaro-tools.conf
file.
You can find other examples of builds using different arguments for buildiso here.
Очистка жесткого диска
После успешной или неудачной сборки вы можете избавиться от большинства данных ("сырой" ISO со всеми загруженными пакетами), удалив этот каталог:
Чтобы очистить систему от файлов пакетов, не установленных в системе (сюда входят все файлы пакетов, загруженные для вашего пользовательского ISO):
Вы также можете вручную посмотреть
/var/cache/manjaro-tools/
и удалить каталоги или файлы по своему усмотрению. Если вы хотите удалить все ISO-образы, списки пакетов и кэшированные пакеты Xorg, сделайте это:
Пожалуйста, помните, что все эти пакеты и файлы сохранены для вашего удобства. Если вы очистите систему, как указано выше, вам придется скачать все пакеты и собрать все образы снова, когда вы в следующий раз захотите собрать свой собственный Manjaro ISO.
По умолчанию ваш файл сохранится как manjaro-tools.conf
. Если вы хотите удалить его, используйте
Советы и хитрости
Building a minimal ISO
A minimal ISO is easy to create by modifying an entry in the profile.conf file. Find the section
# use extra packages as defined in pkglist to activate a full profile # extra="false" extra="true"
and remove the # mark in front of extra = "false" and add a # in front of extra = "true".
Если вы предпочтете не изменять это, то всегда можете использовать -f с buildiso для создания полного профиля.
See also
- Source: Manjaro Gitlab ISO Profiles (master branch may be unstable - select the branch for latest release)
- Forum: How to create your own Manjaro spin with Manjaro-Tools
- Forum: Philip Müller shows how-to
- Video: Building Manjaro ISO by Philip Müller(Tutorial Video)
- Wiki: Buildiso with AUR packages: Using buildpkg