Diskussion:Archiso: Unterschied zwischen den Versionen

Aus wiki.archlinux.de
(Aufräumen)
K (Experimenteller Artikelteil)
Zeile 1: Zeile 1:
Das folgende ist aus der englischen Wiki und dient als Bearbeitungsvorlage.<br><br>
Um ehrlich zu sein. Bis zum roten Kasten ist der Artikel ganz o.K.
 
Alles Weitere ist zwar nicht falsch, führt aber letztlich auch nicht dahin wo ich eigentlich hin will. Ich hoffe der rote Kasten langt aus um das deutlich zu machen.
 
Irgendwo brauche ich noch den richtigen Dreh dabei und hoffe in ein paar Tagen die passende Idee zu bekommen. Bis dahin möchte ich den Artikel so stehen lassen.
 
Das Gerüst ist wenigsten schon mal sehr brauchbar.
 
--[[Benutzer:Tuxnix|Tuxnix]] ([[Benutzer Diskussion:Tuxnix|Diskussion]]) 10:03, 20. Dez. 2017 (CET)
'''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 ===
 
{{Move|Installation without Internet access|seems like this could stand alone}}
 
If you wish to install the archiso (e.g. [https://www.archlinux.org/download/ 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.
 
 
 
{{Note|Before performing the other [[Installation guide#Configure the system]] steps (e.g. locale, keymap, etc.), it is necessary to get rid of the trace of the Live environment (in other words, the customization of archiso which does not fit a non-Live environment).}}
 
 
 
 
 
 
 
Wo gibt es das Script????
 
== Configuration ==
 
 
* the {{ic|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 {{ic|''archlive''/airootfs/root/customize_airootfs.sh}}. It has to be written from the perspective of the new environment, so {{ic|/}} in the script means the root of the live-iso which is to be created.
 
When {{ic|~/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!!!
 
{{Merge|Pacman tips#Custom local repository|Move the general information (e.g. repo tree) into the main article.}}
{{Out of date|References to i686 need to be removed due to its phasing out.}}
 
You can also [[custom local repository|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:
 
*{{ic|~/customrepo}}
**{{ic|~/customrepo/x86_64}}
***{{ic|~/customrepo/x86_64/foo-x86_64.pkg.tar.xz}}
***{{ic|~/customrepo/x86_64/customrepo.db.tar.gz}}
***{{ic|~/customrepo/x86_64/customrepo.db}} (symlink created by {{ic|repo-add}})
**{{ic|~/customrepo/i686}}
***{{ic|~/customrepo/i686/foo-i686.pkg.tar.xz}}
***{{ic|~/customrepo/i686/customrepo.db.tar.gz}}
***{{ic|~/customrepo/i686/customrepo.db}} (symlink created by {{ic|repo-add}})
 
You can then add your repository by putting the following into {{ic|~/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, {{ic|/usr/bin/mkarchiso}}, a script which is used by {{ic|~/archlive/build.sh}}, calls one of the {{Pkg|arch-install-scripts}} named {{ic|pacstrap}} without the {{ic|-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 {{ic|IgnorePkg}} line in {{ic|~/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 {{ic|-i}} flag to each line calling {{ic|pacstrap}} in {{ic|/usr/bin/mkarchiso}}.
 
* '''Clean''': Create a copy of {{ic|/usr/bin/mkarchiso}} in which you add the flag and adapt {{ic|~/archlive/build.sh}} so that it calls the modified version of the mkarchiso script.
 
* '''Advanced''': Create a function for {{ic|~/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 {{ic|pacman.conf}} to {{ic|pacmanx86_64.conf}} and {{ic|pacmani686.conf}}. Uncomment the following lines to enable ''multilib'' in {{ic|pacmanx86_64.conf}}:
{{hc|pacmanx86_64.conf|2=
[multilib]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
}}
 
Then edit {{ic|build.sh}} with an editor. Replace the following lines:
 
{{hc|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:
 
{{hc|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.

Version vom 20. Dezember 2017, 11:03 Uhr

Um ehrlich zu sein. Bis zum roten Kasten ist der Artikel ganz o.K. Alles Weitere ist zwar nicht falsch, führt aber letztlich auch nicht dahin wo ich eigentlich hin will. Ich hoffe der rote Kasten langt aus um das deutlich zu machen. Irgendwo brauche ich noch den richtigen Dreh dabei und hoffe in ein paar Tagen die passende Idee zu bekommen. Bis dahin möchte ich den Artikel so stehen lassen. Das Gerüst ist wenigsten schon mal sehr brauchbar. --Tuxnix (Diskussion) 10:03, 20. Dez. 2017 (CET)