Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/README
blob: dee3a50b0c52b319b295ad062061205d5af2cdf9 (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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
INDEX
-----

* 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)



*** 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.
* image-name.fs      Like image-name.fs.sfs but without SquashFS.
                     (For testing purposes only. The option copytoram
                     for archiso hook does not have any effect on these images)



*** 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 }.
           A special value of "none" denotes no usage of SquashFS.
<fs_type>  Set the filesystem type of the image { ext4 | ext3 | ext2 | xfs }.
           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 %

Note: Some combinations are invalid, example: sfs_comp=none and fs_type=none



*** 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)

* First install devtools if needed, mkarchroot needs it.
  [host] # pacman -S devtools

* Create a chroot to work on it.
  (prefix with linux32 if you want to build a 32 bits enviroment under 64 bits)
  [host] # mkarchroot /tmp/chroot base

* Enter it. (prefix with linux32 if needed).
  [host] # mkarchroot -r bash /tmp/chroot

* Create a loopback device.
  (mkarchiso does not create it, use other number if not available)
  [chroot] # mknod /dev/loop0 b 7 0

* Setup a mirror.
  [chroot] # echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist

* Install aditional packages needed for mkarchiso.
  (git is only needed to get a copy of archiso.git)
  [chroot] # pacman -S git squashfs-tools syslinux devtools cdrkit make

* Install archiso.
  [chroot] # cd /tmp
  [chroot] # git clone git://projects.archlinux.org/archiso.git
  [chroot] # cd archiso/archiso
  [chroot] # make install-program

* Build a basic iso.
  [chroot] # cd /tmp/archiso/configs/baseline
  [chroot] # ./build.sh

* Exit from chroot.
  [chroot] # exit

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)

Note: These steps should be done with 64 bits support.

* Prepare a 32 bit chroot enviroment.

linux32 mkarchroot /tmp/chroot32 base
linux32 mkarchroot -r bash /tmp/chroot32
echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
pacman -S squashfs-tools syslinux devtools cdrkit make mkinitcpio-nfs-utils nbd --noconfirm --needed
exit

* Prepare a 64 bits chroot enviroment.

mkarchroot /tmp/chroot64 base
mkarchroot -r bash /tmp/chroot64
echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
pacman -S squashfs-tools syslinux devtools cdrkit make mkinitcpio-nfs-utils nbd --noconfirm --needed
exit

* Create a shared directory which archiso can access from both chroot enviroments.

mkdir /tmp/shared
cd /tmp/shared
git clone git://github.com/djgera/archiso.git -b dm-snapshot
cd
mount --bind /tmp/shared /tmp/chroot32/tmp
mount --bind /tmp/shared /tmp/chroot64/tmp

* Enter 32 bits chroot enviroment, install mkarchiso,
  then build core and netinstall single images.

linux32 mkarchroot -r bash /tmp/chroot32
mknod /dev/loop1032 b 7 1032
cd /tmp/archiso/archiso
make install-program
cd ../configs/releng/
./build.sh all_iso_single

* Enter 64 bits chroot enviroment, install mkarchiso,
  then build core and netinstall single images.

mkarchroot -r bash /tmp/chroot64
mknod /dev/loop1064 b 7 1064
cd /tmp/archiso/archiso
make install-program
cd ../configs/releng/
./build.sh all_iso_single

* Finally build core and netinstall dual images
  from any of the chroot enviroments. (The final result is the same).

mkarchroot -r bash /tmp/chroot64
cd /tmp/archiso/configs/releng/
./build.sh all_iso_dual