Diskussion:Archiso
Das folgende ist aus der englischen Wiki und dient als Bearbeitungsvorlage.
Archiso is a small set of bash scripts
Login manager
Rebuilds can be sped up slightly by editing the pacstrap script (located at /bin/pacstrap) and changing the following at line 361:
Before:
if ! pacman -r "$newroot" -Sy "${pacman_args[@]}"; then
After:
if ! pacman -r "$newroot" -Sy --needed "${pacman_args[@]}"; then
This increases the speed of the initial bootstrap, since it doesn't have to download and install any of the base packages that are already installed.
Tips and tricks
Installation without Internet access
If you wish to install the archiso (e.g. the official monthly release) as it is without an Internet connection, or, if you do not want to download the packages you want again:
First, follow the Installation guide, skipping the Installation guide#Connect to the Internet section, until the Installation guide#Install the base packages step.
Wo gibt es das Script????
Configuration
- the
airootfs
directory - this directory acts as an overlay and it is where you make all the customizations.
Generally, every administrative task that you would normally do after a fresh install except for package installation can be scripted into archlive/airootfs/root/customize_airootfs.sh
. It has to be written from the perspective of the new environment, so /
in the script means the root of the live-iso which is to be created.
When ~/archlive/airootfs/root/customize_airootfs.sh
is executed and a new user is created, the files from the skel directory will automatically be copied over to the new home folder, permissions set right.
Ab hier kann wahrscheinlich alles weg!!!
Vorlage:Merge Vorlage:Out of date
You can also create a custom local repository for the purpose of preparing custom packages or packages from AUR/ABS. When doing so with packages for both architectures, you should follow a certain directory order to not run into problems.
For instance:
~/customrepo
~/customrepo/x86_64
~/customrepo/x86_64/foo-x86_64.pkg.tar.xz
~/customrepo/x86_64/customrepo.db.tar.gz
~/customrepo/x86_64/customrepo.db
(symlink created byrepo-add
)
~/customrepo/i686
~/customrepo/i686/foo-i686.pkg.tar.xz
~/customrepo/i686/customrepo.db.tar.gz
~/customrepo/i686/customrepo.db
(symlink created byrepo-add
)
You can then add your repository by putting the following into ~/archlive/pacman.conf
, above the other repository entries (for top priority):
# custom repository [customrepo] SigLevel = Optional TrustAll Server = file:///home/user/customrepo/$arch
So, the build scripts just look for the appropriate packages.
If this is not the case you will be running into error messages similar to this:
error: failed to prepare transaction (package architecture is not valid) :: package foo-i686 does not have a valid architecture
Preventing installation of packages belonging to base group
By default, /usr/bin/mkarchiso
, a script which is used by ~/archlive/build.sh
, calls one of the Vorlage:Pkg named pacstrap
without the -i
flag, which causes Pacman to not wait for user input during the installation process.
When blacklisting base group packages by adding them to the IgnorePkg
line in ~/archlive/pacman.conf
, Pacman asks if they still should be installed, which means they will when user input is bypassed. To get rid of these packages there are several options:
- Dirty: Add the
-i
flag to each line callingpacstrap
in/usr/bin/mkarchiso
.
- Clean: Create a copy of
/usr/bin/mkarchiso
in which you add the flag and adapt~/archlive/build.sh
so that it calls the modified version of the mkarchiso script.
- Advanced: Create a function for
~/archlive/build.sh
which explicitly removes the packages after the base installation. This would leave you the comfort of not having to type enter so much during the installation process.
Installing packages from multilib
To install packages from the multilib repository you have to create two pacman configuration files: one for x86_64 and one for i686. Copy pacman.conf
to pacmanx86_64.conf
and pacmani686.conf
. Uncomment the following lines to enable multilib in pacmanx86_64.conf
:
pacmanx86_64.conf
[multilib] SigLevel = PackageRequired Include = /etc/pacman.d/mirrorlist
Then edit build.sh
with an editor. Replace the following lines:
build.sh
run_once make_pacman_conf # Do all stuff for each airootfs for arch in i686 x86_64; do run_once make_basefs run_once make_packages done run_once make_packages_efi for arch in i686 x86_64; do run_once make_setup_mkinitcpio run_once make_customize_airootfs done
with:
build.sh
cp -v releng/pacmanx86_64.conf releng/pacman.conf run_once make_pacman_conf # Do all stuff for each airootfs for arch in x86_64; do run_once make_basefs run_once make_packages run_once make_packages_efi run_once make_setup_mkinitcpio run_once make_customize_airootfs done echo make_pacman_conf i686 cp -v releng/pacmani686.conf releng/pacman.conf cp -v releng/pacmani686.conf ${work_dir}/pacman.conf for arch in i686; do run_once make_basefs run_once make_packages run_once make_packages_efi run_once make_setup_mkinitcpio run_once make_customize_airootfs done
In this way packages for x86_64 and i686 will be installed with their own pacman configuration file.