summaryrefslogtreecommitdiff
path: root/docs/README.build
blob: 2a3d7099d3d1ab6b0d5e01ffed2b0a79f0513086 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
INDEX
-----

* Build requirements
* Image types generated by mkarchiso.
* File format for aitab.
* Why the /isolinux and /arch/boot/syslinux directories?
* Building the most basic Arch Linux live media. (configs/baseline)
* Building official Arch Linux live media. (configs/releng)



*** Build requirements

** For mkarchiso script needs these packages (build host):
 + squashfs-tools          for mksquashfs
 + libisoburn              for xorriso
 + btrfs-progs             for mkfs.btrfs (optional)

** For configs/releng build.sh needs theses packages (build host):
 + dosfstools              for mkfs.vfat
 + patch                   for patch
 + lynx                    for fetching the latest installation guide

** For these hooks needs these packages (on target root-image)
* archiso
 + (none)
* archiso_loop_mnt
 + (none)
* archiso_pxe_common
 + mkinitcpio-nfs-utils    for ipconfig
* archiso_pxe_nbd
 + nbd                     for nbd-client
* archiso_pxe_http
 + curl                    for curl
* archiso_pxe_nfs
 + mkinitcpio-nfs-utils    for nfsmount
* archiso_shutdown
 + (none)


*** Image types generated by mkarchiso.

* image-name.sfs     SquashFS image with all files directly on it.
* image-name.fs.sfs  SquashFS with only one file inside (image-name.fs),
                     which is an image of some type of filesystem
                     (ext4, ext3, ext2, xfs), all files reside on it.


*** File format for aitab.

The aitab file holds information about the filesystems images that must be
created by mkarchiso and mounted at initramfs stage from the archiso hook.
It consists of some fields which define the behaviour of images.

# <img>         <mnt>                 <arch>   <sfs_comp>  <fs_type>  <fs_size>

<img>      Image name without extension (.fs .fs.sfs .sfs).
<mnt>      Mount point.
<arch>     Architecture { i686 | x86_64 | any }.
<sfs_comp> SquashFS compression type { gzip | lzo | xz }.
<fs_type>  Set the filesystem type of the image
           { ext4 | ext3 | ext2 | xfs | btrfs }.
           A special value of "none" denotes no usage of a filesystem.
           In that case all files are pushed directly to SquashFS filesystem.
<fs_size>  An absolute value of file system image size in MiB.
           (example: 100, 1000, 4096, etc)
           A relative value of file system free space [in percent].
           {1%..99%} (example 50%, 10%, 7%).
           This is an estimation, and calculated in a simple way.
           Space used + 10% (estimated for metadata overhead) + desired %


*** Why the /isolinux and /arch/boot/syslinux directories?

The /isolinux directory holds files needed for the ISOLINUX boot loader
module of SYSLINUX. ISOLINUX can not find config files on
/arch/boot/syslinux, like other boot loaders modules (EXTLINUX, SYSLINUX, etc).
When make your custom boot-pendrive, you need to copy /arch directory to it.
/isolinux/isolinux.cfg just holds /arch/boot/syslinux/syslinux.cfg



*** Building the most basic Arch Linux live media. (configs/baseline)

* Install needed packages.
  # pacman -S git make squashfs-tools libisoburn rsync --needed

* Install archiso.
  # git clone git://projects.archlinux.org/archiso.git
  # make -C archiso install

* Build a basic iso.
  # /usr/share/archiso/configs/baseline/build.sh

Note: If you want to customize, just see the configs/releng directory which is
used to build official images with much more things.


*** Building official Arch Linux live media. (configs/releng)

* Install needed packages.
  # pacman -S git make squashfs-tools libisoburn dosfstools lynx patch --needed

* Install archiso.
  # git clone git://projects.archlinux.org/archiso.git
  # make -C archiso install

* Build them!
  # /usr/share/archiso/configs/releng/build.sh build all

Note: See build.sh -h for more options.