2011-06-18 23:38:58 +02:00
|
|
|
INDEX
|
|
|
|
-----
|
|
|
|
|
2011-06-22 03:56:57 +02:00
|
|
|
* Boot parameters (initramfs stage)
|
|
|
|
* hooks/archiso
|
2011-12-02 04:44:02 +01:00
|
|
|
* hooks/archiso_pxe_common
|
2011-06-22 03:56:57 +02:00
|
|
|
* hooks/archiso_pxe_nbd
|
2011-12-03 22:08:57 +01:00
|
|
|
* hooks/archiso_pxe_http
|
2011-12-02 04:44:02 +01:00
|
|
|
* hooks/archiso_pxe_nfs
|
2011-06-22 03:56:57 +02:00
|
|
|
* hooks/archiso_loop_mnt
|
|
|
|
* Boot parameters (only for configs/releng)
|
|
|
|
* etc/rc.conf
|
2011-06-28 07:07:24 +02:00
|
|
|
* Build requirements
|
2011-06-18 23:38:58 +02:00
|
|
|
* 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)
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-22 03:56:57 +02:00
|
|
|
*** Boot parameters (initramfs stage)
|
|
|
|
|
|
|
|
** hooks/archiso
|
|
|
|
|
|
|
|
* archisolabel= Set the filesystem label where archiso files reside.
|
|
|
|
Default: (unset)
|
|
|
|
* archisodevice= Set the device node where archiso medium is located.
|
|
|
|
Default: "/dev/disk/by-label/${archisolabel}"
|
|
|
|
* archisobasedir= Set the base directory where all files reside.
|
|
|
|
Default: "arch"
|
|
|
|
* aitab= Set the path for "aitab" file.
|
|
|
|
Default: ${archisobasedir}/aitab
|
|
|
|
* copytoram= If set to "y" or just "copytoram" without arguments,
|
|
|
|
all SquashFS are copied to "RAM".
|
|
|
|
Default: (unset)
|
2011-08-12 05:10:44 +02:00
|
|
|
* checksum= If set to "y" or just "checksum" without arguments,
|
|
|
|
performs a self-test of all files inside ${install_dir},
|
|
|
|
and continue booting if ok.
|
|
|
|
Default: (unset)
|
2011-10-24 02:24:17 +02:00
|
|
|
* cow_label= Set the filesystem label where COW (dm-snapshot)
|
|
|
|
files must be stored.
|
|
|
|
Default: (unset)
|
|
|
|
* cow_device= Set the device node where COW (dm-snapshot) files
|
|
|
|
must be stored.
|
|
|
|
Default: (unset) or "/dev/disk/by-label/${cow_label}"
|
|
|
|
* cow_directory= Set a directory inside ${cow_device}.
|
|
|
|
Default: "/persistent_${archisolabel}/${arch}"
|
|
|
|
* cow_persistent= Set if snapshots are persistent "P" or non-persistent "N".
|
|
|
|
Default: "N" (if no ${cow_device} is used) otherwise "P".
|
2011-06-22 03:56:57 +02:00
|
|
|
* cowspace_size= Set the size of tmpfs /cowspace. This space is used for
|
|
|
|
Copy-On-Write files of dm-snapshot.
|
|
|
|
Size is in bytes (suffix with "k", "m" and "g") or
|
|
|
|
in percentage of available RAM.
|
|
|
|
Default: "75%"
|
2011-10-24 02:24:17 +02:00
|
|
|
* copytoram_size= Set the size of tmpfs. This space is used for
|
2011-06-22 03:56:57 +02:00
|
|
|
copy of all SquashFS images used, if copytoram=y.
|
|
|
|
Size is in bytes (suffix with "k", "m" and "g") or
|
|
|
|
in percentage of available RAM.
|
|
|
|
Default: "75%"
|
2011-08-09 21:28:52 +02:00
|
|
|
* dm_snap_prefix= Set a prefix for device-mapper snapshot node names.
|
|
|
|
Default: "arch"
|
2011-06-22 03:56:57 +02:00
|
|
|
* arch= Force an architecture type (i686 | x86_64).
|
|
|
|
Do not set it for normal operations.
|
|
|
|
Useful for running a 64 bit kernel / 32 bit userspace.
|
|
|
|
Default: (architecture of running kernel)
|
|
|
|
|
|
|
|
|
2011-11-28 16:28:03 +01:00
|
|
|
** hooks/archiso_pxe_common
|
2011-06-22 03:56:57 +02:00
|
|
|
|
|
|
|
* ip= This parameter is setup automatically by PXELINUX
|
|
|
|
when option "IPAPPEND" is set to 1 or 2 in config.
|
|
|
|
ip=<client-ip>:<boot-server-ip>:<gw-ip>:<netmask>
|
|
|
|
Default: (set via PXE server)
|
|
|
|
* BOOTIF= This parameter is setup automatically by PXELINUX
|
|
|
|
when option "IPAPPEND" is set to 2 or 3 in config.
|
|
|
|
BOOTIF=<hardware-address-of-boot-interface>
|
|
|
|
Default: (set via PXELINUX)
|
2011-11-28 16:28:03 +01:00
|
|
|
|
2011-11-28 16:28:03 +01:00
|
|
|
|
2011-11-28 16:28:03 +01:00
|
|
|
** hooks/archiso_pxe_nbd
|
|
|
|
|
2011-07-07 20:24:24 +02:00
|
|
|
* archiso_nbd_name= Set NBD export name used by the server.
|
|
|
|
Default: archiso
|
2011-11-28 16:28:03 +01:00
|
|
|
* archiso_nbd_srv= Set an IP address where NBD reside.
|
2011-12-02 04:44:02 +01:00
|
|
|
If ${pxeserver} is used, PXE IP will be used.
|
|
|
|
Default: (unset)
|
2011-06-22 03:56:57 +02:00
|
|
|
|
|
|
|
|
2011-12-03 22:08:57 +01:00
|
|
|
** hooks/archiso_pxe_http
|
2011-11-28 16:28:03 +01:00
|
|
|
|
2011-12-03 22:20:43 +01:00
|
|
|
* archiso_http_srv= Set an HTTP URL (must end with /) where ${archisobasedir}
|
2011-12-03 21:45:45 +01:00
|
|
|
is found with all *.sfs files.
|
|
|
|
In the IP/domain part if ${pxeserver} is used, use PXE IP.
|
2011-11-28 16:28:03 +01:00
|
|
|
Default: (unset)
|
2011-12-03 22:20:43 +01:00
|
|
|
* archiso_http_spc= Set the size of tmpfs where *.sfs files are downloaded.
|
2011-11-28 16:28:03 +01:00
|
|
|
Default: "75%"
|
|
|
|
|
|
|
|
|
[archiso] Add PXE NFS support
It add support for using *.sfs images via NFS.
It must be located after archiso_pxe_nbd in mkinitcpio.conf, in that way
NBD is the default.
New boot parameters:
archiso_nfs_srv=IP:/path
Set the NFS IP and path. Accepts ${pxeserver} as IP.
archiso_nfs_opt= Sets NFS mount opts (comma separated)
Defaults to:
port = as given by server portmap daemon
rsize = 1024
wsize = 1024
timeo = 7
retrans = 3
acregmin = 3
acregmax = 60
acdirmin = 30
acdirmax = 60
flags = hard, nointr, noposix, cto, ac
:: Running Hook [archiso_pxe_common]
IP-Config: eth0 hardware address 52:54:00:12:34:57 mtu 1500
IP-Config: eth0 guessed broadcast address 192.168.0.255
IP-Config: eth0 guessed nameserver address 192.168.0.218
IP-Config: eth0 complete (from 192.168.0.218):
address: 192.168.0.90 broadcast: 192.168.0.255 netmask: 255.255.255.0
gateway: 192.168.0.218 dns0 : 192.168.0.218 dns1 : 0.0.0.0
rootserver: 192.168.0.218 rootpath:
filename :
:: Running Hook [archiso_pxe_nbd]
:: Running Hook [archiso_pxe_curl]
:: Running Hook [archiso_pxe_nfs]
:: Mounting '192.168.0.77:/mnt/iso'
...
192.168.0.77:/mnt/iso/ on /run/archiso/bootmnt type nfs (rw,relatime,vers=3,rsize=524288,wsize=524288,namlen=255,hard,nolock,proto=tcp,port=65535,timeo=7,retrans=3,sec=sys,local_lock=all,addr=192.168.0.77)
...
My /etc/exports
/mnt/iso 192.168.0.90(ro,no_subtree_check,no_root_squash)
2011-11-28 16:28:03 +01:00
|
|
|
** hooks/archiso_pxe_nfs
|
|
|
|
|
|
|
|
* archiso_nfs_srv= Set the NFS-IP:/path of the server
|
|
|
|
In the IP part if ${pxeserver} is used, PXE IP will be used.
|
|
|
|
Default: (unset)
|
|
|
|
* archiso_nfs_opt= Set NFS mount options separated by comma.
|
|
|
|
Default: (unset, see below)
|
|
|
|
These are the implicit options:
|
|
|
|
port = as given by server portmap daemon
|
|
|
|
rsize = 1024
|
|
|
|
wsize = 1024
|
|
|
|
timeo = 7
|
|
|
|
retrans = 3
|
|
|
|
acregmin = 3
|
|
|
|
acregmax = 60
|
|
|
|
acdirmin = 30
|
|
|
|
acdirmax = 60
|
|
|
|
flags = hard, nointr, noposix, cto, ac
|
|
|
|
|
|
|
|
|
2011-06-22 03:56:57 +02:00
|
|
|
** hooks/archiso_loop_mnt
|
|
|
|
|
2011-10-24 02:24:17 +02:00
|
|
|
* img_label= Set the filesystem label where archiso-image.iso.
|
2011-06-22 03:56:57 +02:00
|
|
|
Default: (unset)
|
2011-10-24 02:24:17 +02:00
|
|
|
* img_dev= Device where archiso-image.iso reside.
|
|
|
|
Default: (unset) or "/dev/disk/by-label/${img_label}"
|
2011-06-22 03:56:57 +02:00
|
|
|
* img_loop= Full path where archiso-image.iso is located on ${img_dev}
|
|
|
|
Default: (unset)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*** Boot parameters (only for configs/releng)
|
|
|
|
|
|
|
|
** /etc/rc.conf
|
|
|
|
|
|
|
|
By default these parameters are set by default to these values
|
|
|
|
if nothing is specified on command line.
|
|
|
|
|
|
|
|
* locale= "en_US.UTF-8"
|
|
|
|
* daemon_locale= "no"
|
|
|
|
* hardwareclock= "UTC"
|
|
|
|
* timezone= "Canada/Pacific"
|
|
|
|
* keymap= "us"
|
|
|
|
* consolefont= (unset)
|
|
|
|
* consolemap= (unset)
|
|
|
|
* usecolor= "yes"
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-28 07:07:24 +02:00
|
|
|
*** Build requirements
|
|
|
|
|
|
|
|
** For mkarchiso script needs these packages (build host):
|
|
|
|
+ devtools for mkarchroot
|
|
|
|
+ squashfs-tools for mksquashfs
|
2011-08-29 06:47:57 +02:00
|
|
|
+ libisoburn for xorriso
|
2011-06-28 07:07:24 +02:00
|
|
|
|
|
|
|
** For these hooks needs these packages (on target root-image)
|
|
|
|
* archiso
|
|
|
|
+ (none)
|
|
|
|
* archiso_loop_mnt
|
|
|
|
+ (none)
|
2011-11-28 16:28:03 +01:00
|
|
|
* archiso_pxe_common
|
2011-06-28 07:07:24 +02:00
|
|
|
+ mkinitcpio-nfs-utils for ipconfig
|
2011-11-28 16:28:03 +01:00
|
|
|
* archiso_pxe_nbd
|
2011-06-28 07:07:24 +02:00
|
|
|
+ nbd for nbd-client
|
2011-12-03 22:08:57 +01:00
|
|
|
* archiso_pxe_http
|
2011-11-28 16:28:03 +01:00
|
|
|
+ curl for curl
|
[archiso] Add PXE NFS support
It add support for using *.sfs images via NFS.
It must be located after archiso_pxe_nbd in mkinitcpio.conf, in that way
NBD is the default.
New boot parameters:
archiso_nfs_srv=IP:/path
Set the NFS IP and path. Accepts ${pxeserver} as IP.
archiso_nfs_opt= Sets NFS mount opts (comma separated)
Defaults to:
port = as given by server portmap daemon
rsize = 1024
wsize = 1024
timeo = 7
retrans = 3
acregmin = 3
acregmax = 60
acdirmin = 30
acdirmax = 60
flags = hard, nointr, noposix, cto, ac
:: Running Hook [archiso_pxe_common]
IP-Config: eth0 hardware address 52:54:00:12:34:57 mtu 1500
IP-Config: eth0 guessed broadcast address 192.168.0.255
IP-Config: eth0 guessed nameserver address 192.168.0.218
IP-Config: eth0 complete (from 192.168.0.218):
address: 192.168.0.90 broadcast: 192.168.0.255 netmask: 255.255.255.0
gateway: 192.168.0.218 dns0 : 192.168.0.218 dns1 : 0.0.0.0
rootserver: 192.168.0.218 rootpath:
filename :
:: Running Hook [archiso_pxe_nbd]
:: Running Hook [archiso_pxe_curl]
:: Running Hook [archiso_pxe_nfs]
:: Mounting '192.168.0.77:/mnt/iso'
...
192.168.0.77:/mnt/iso/ on /run/archiso/bootmnt type nfs (rw,relatime,vers=3,rsize=524288,wsize=524288,namlen=255,hard,nolock,proto=tcp,port=65535,timeo=7,retrans=3,sec=sys,local_lock=all,addr=192.168.0.77)
...
My /etc/exports
/mnt/iso 192.168.0.90(ro,no_subtree_check,no_root_squash)
2011-11-28 16:28:03 +01:00
|
|
|
* archiso_pxe_nfs
|
|
|
|
+ mkinitcpio-nfs-utils for nfsmount
|
2011-10-24 02:24:18 +02:00
|
|
|
* archiso_shutdown
|
|
|
|
+ (none)
|
2011-06-28 07:07:24 +02:00
|
|
|
|
|
|
|
|
2011-06-18 23:38:58 +02:00
|
|
|
*** 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 }.
|
|
|
|
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)
|
|
|
|
|
2011-06-22 03:56:57 +02:00
|
|
|
* Install devtools if needed, mkarchroot needs it
|
|
|
|
[host] # pacman -S devtools --needed
|
2011-06-18 23:38:58 +02:00
|
|
|
|
2011-06-22 03:56:57 +02:00
|
|
|
* Create a base chroot to work on it.
|
2011-06-18 23:38:58 +02:00
|
|
|
(prefix with linux32 if you want to build a 32 bits enviroment under 64 bits)
|
|
|
|
[host] # mkarchroot /tmp/chroot base
|
|
|
|
|
2011-06-22 03:56:57 +02:00
|
|
|
* Install archiso on chroot (needs git and make)
|
|
|
|
[host] # pacman -S git make --needed
|
|
|
|
[host] # git clone git://projects.archlinux.org/archiso.git
|
|
|
|
[host] # make -C archiso/archiso DESTDIR=/tmp/chroot install
|
|
|
|
|
|
|
|
* Enter to chroot (prefix with linux32 if needed).
|
2011-06-18 23:38:58 +02:00
|
|
|
[host] # mkarchroot -r bash /tmp/chroot
|
|
|
|
|
|
|
|
* Create a loopback device.
|
2011-06-22 03:56:57 +02:00
|
|
|
(mkarchroot does not create it, use other number if not available)
|
2011-06-18 23:38:58 +02:00
|
|
|
[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.
|
2011-08-29 06:47:57 +02:00
|
|
|
[chroot] # pacman -S devtools squashfs-tools libisoburn
|
2011-06-18 23:38:58 +02:00
|
|
|
|
|
|
|
* Build a basic iso.
|
2011-06-22 03:56:57 +02:00
|
|
|
[chroot] # cp -r /usr/share/archiso/configs/baseline /tmp
|
|
|
|
[chroot] # cd /tmp/baseline
|
2011-06-18 23:38:58 +02:00
|
|
|
[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.
|
|
|
|
|
2011-06-22 03:56:57 +02:00
|
|
|
[host64] # linux32 mkarchroot /tmp/chroot32 base
|
|
|
|
[host64] # linux32 mkarchroot -r bash /tmp/chroot32
|
|
|
|
[chroot32] # echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
|
2011-08-29 06:47:57 +02:00
|
|
|
[chroot32] # pacman -S devtools squashfs-tools libisoburn
|
2011-06-22 03:56:57 +02:00
|
|
|
[chroot32] # exit
|
2011-06-18 23:38:58 +02:00
|
|
|
|
|
|
|
* Prepare a 64 bits chroot enviroment.
|
|
|
|
|
2011-06-22 03:56:57 +02:00
|
|
|
[host64] # mkarchroot /tmp/chroot64 base
|
|
|
|
[host64] # mkarchroot -r bash /tmp/chroot64
|
|
|
|
[chroot64] # echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
|
2011-08-29 06:47:57 +02:00
|
|
|
[chroot64] # pacman -S devtools squashfs-tools libisoburn
|
2011-06-22 03:56:57 +02:00
|
|
|
[chroot64] # exit
|
|
|
|
|
|
|
|
* Install archiso on both chroots.
|
|
|
|
|
|
|
|
[host64] # git clone git://projects.archlinux.org/archiso.git
|
|
|
|
[host64] # make -C archiso/archiso DESTDIR=/tmp/chroot32 install
|
|
|
|
[host64] # make -C archiso/archiso DESTDIR=/tmp/chroot64 install
|
|
|
|
|
|
|
|
* Create a shared /tmp directory between two chroots for working.
|
|
|
|
|
|
|
|
[host64] # mkdir /tmp/shared
|
|
|
|
[host64] # chmod 1777 /tmp/shared
|
|
|
|
[host64] # mount --bind /tmp/shared /tmp/chroot32/tmp
|
|
|
|
[host64] # mount --bind /tmp/shared /tmp/chroot64/tmp
|
|
|
|
|
|
|
|
* Enter 32 bits chroot enviroment then build core and netinstall single images.
|
|
|
|
|
2012-01-05 21:58:12 +01:00
|
|
|
[host32] # linux32 mkarchroot -r bash /tmp/chroot32
|
2011-08-29 06:45:49 +02:00
|
|
|
[chroot32] # mknod /dev/loop1032 b 7 1032 # assumed loop.max_part=0 (by default)
|
2011-06-22 03:56:57 +02:00
|
|
|
[chroot32] # cp -r /usr/share/archiso/configs/releng /tmp
|
|
|
|
[chroot32] # cd /tmp/releng
|
2011-08-29 06:45:49 +02:00
|
|
|
[chroot32] # ./build.sh build single all
|
|
|
|
[chroot32] # ./build.sh purge single # optional step
|
2011-06-22 03:56:57 +02:00
|
|
|
|
|
|
|
* Enter 64 bits chroot enviroment then build core and netinstall single images.
|
|
|
|
|
2012-01-05 21:58:12 +01:00
|
|
|
[host64] # mkarchroot -r bash /tmp/chroot64
|
2011-08-29 06:45:49 +02:00
|
|
|
[chroot64] # mknod /dev/loop1064 b 7 1064 # assumed loop.max_part=0 (by default)
|
2011-06-22 03:56:57 +02:00
|
|
|
[chroot64] # cp -r /usr/share/archiso/configs/releng /tmp
|
|
|
|
[chroot64] # cd /tmp/releng
|
2011-08-29 06:45:49 +02:00
|
|
|
[chroot64] # ./build.sh build single all
|
|
|
|
[chroot64] # ./build.sh purge single # optional step
|
2011-06-22 03:56:57 +02:00
|
|
|
|
|
|
|
* Build core and netinstall dual images from any of the chroot enviroments.
|
|
|
|
|
2011-08-08 20:40:31 +02:00
|
|
|
[host64] # mkarchroot -r bash /tmp/chroot64
|
2011-06-22 03:56:57 +02:00
|
|
|
[chroot64] # cd /tmp/releng
|
2011-08-29 06:45:49 +02:00
|
|
|
[chroot64] # ./build.sh build dual all
|
|
|
|
[chroot64] # ./build.sh purge dual # optional step
|