summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile13
-rw-r--r--README711
-rw-r--r--archiso/initcpio/hooks/archiso11
-rwxr-xr-xconfigs/releng/build.sh72
-rw-r--r--configs/releng/efiboot/EFI/boot/startup_iso.nsh10
-rw-r--r--configs/releng/efiboot/EFI/boot/startup_usb.nsh10
-rw-r--r--configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf4
-rw-r--r--configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf4
-rw-r--r--configs/releng/efiboot/loader/entries/uefi-shell-v1-x86_64.conf2
-rw-r--r--configs/releng/efiboot/loader/entries/uefi-shell-v2-x86_64.conf2
-rw-r--r--configs/releng/efiboot/loader/loader.conf2
-rw-r--r--configs/releng/mkinitcpio.conf2
-rw-r--r--configs/releng/packages.both60
-rw-r--r--configs/releng/packages.i68650
-rw-r--r--configs/releng/packages.x86_6453
-rw-r--r--configs/releng/root-image/etc/archiso/functions20
-rw-r--r--configs/releng/root-image/etc/conf.d/dhcpcd6
-rw-r--r--configs/releng/root-image/etc/fstab0
-rw-r--r--configs/releng/root-image/etc/inittab48
-rw-r--r--configs/releng/root-image/etc/rc.conf23
-rw-r--r--configs/releng/root-image/etc/rc.d/functions.d/automated_script23
-rw-r--r--configs/releng/root-image/etc/rc.d/functions.d/setup_special_console25
-rwxr-xr-xconfigs/releng/root-image/etc/rc.d/pacman-init34
-rw-r--r--configs/releng/root-image/etc/systemd/system/dhcpcd.service13
-rw-r--r--configs/releng/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount8
-rw-r--r--configs/releng/root-image/etc/systemd/system/pacman-init.service15
-rw-r--r--configs/releng/root-image/etc/timezone1
-rw-r--r--configs/releng/root-image/etc/vconsole.conf2
-rwxr-xr-xconfigs/releng/root-image/root/.automated_script.sh34
-rw-r--r--configs/releng/root-image/root/.zlogin1
-rw-r--r--configs/releng/syslinux.dual/archiso_pxe_both_inc.cfg2
-rw-r--r--configs/releng/syslinux.dual/archiso_sys_both_inc.cfg2
-rw-r--r--docs/README.altbootmethods128
-rw-r--r--docs/README.bootparams127
-rw-r--r--docs/README.build112
-rw-r--r--docs/README.knowissues16
-rw-r--r--docs/README.transfer122
37 files changed, 720 insertions, 1048 deletions
diff --git a/Makefile b/Makefile
index 1abeb4a..2deb9fa 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,18 @@
-V=2
+V=3
INSTALL_FILES=$(wildcard archiso/initcpio/install/*)
HOOKS_FILES=$(wildcard archiso/initcpio/hooks/*)
SCRIPT_FILES=$(wildcard archiso/initcpio/script/*)
-
INSTALL_DIR=$(DESTDIR)/usr/lib/initcpio/install
HOOKS_DIR=$(DESTDIR)/usr/lib/initcpio/hooks
SCRIPT_DIR=$(DESTDIR)/usr/lib/initcpio
+DOC_FILES=$(wildcard docs/*)
+
+DOC_DIR=$(DESTDIR)/usr/share/doc/archiso
+
+
all:
install: install-program install-initcpio install-examples install-doc
@@ -24,10 +28,11 @@ install-initcpio:
install-examples:
install -d -m 755 $(DESTDIR)/usr/share/archiso/
- cp -a configs $(DESTDIR)/usr/share/archiso/
+ cp -a --no-preserve=ownership configs $(DESTDIR)/usr/share/archiso/
install-doc:
- install -D -m 644 README $(DESTDIR)/usr/share/doc/archiso/README
+ install -d $(DOC_DIR)
+ install -m 644 -t $(DOC_DIR) $(DOC_FILES)
dist:
git archive --format=tar --prefix=archiso-$(V)/ v$(V) | gzip -9 > archiso-$(V).tar.gz
diff --git a/README b/README
deleted file mode 100644
index 6625e8d..0000000
--- a/README
+++ /dev/null
@@ -1,711 +0,0 @@
-INDEX
------
-
-This is a rebranded fork of the original Archiso for Parabola GNU/Linux-libre.
-
-* Boot parameters (initramfs stage)
- * hooks/archiso
- * hooks/archiso_pxe_common
- * hooks/archiso_pxe_nbd
- * hooks/archiso_pxe_http
- * hooks/archiso_pxe_nfs
- * hooks/archiso_loop_mnt
-* Boot parameters (only for configs/releng)
- * etc/rc.conf
-* Transfer ISO file to target medium (configs/releng)
- * To -> CD / DVD / BD
- * To -> USB-key / SD / HDD / SSD
- * PC-BIOS (MBR)
- * PC-BIOS (ISOHYBRID-MBR)
- * PC-EFI (GPT) [x86_64 only]
-* Alternative boot methods (configs/releng)
- * ISO in loopback mode
- * ISO in memdisk mode
- * Network booting (PXE) [first stage]
- * DHCP + TFTP
- * DHCP + HTTP
- * HTTP/NFS/NBD [second stage]
-* Build requirements
-* Image types generated by mkarchiso.
-* File format for aitab.
-* Why the /isolinux and /libre/boot/syslinux directories?
-* Know issues
-* Building the most basic Parabola live media. (configs/baseline)
-* Building official Parabola live media. (configs/releng)
-
-
-
-*** 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)
-* 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)
-* 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".
-* 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%"
-* copytoram_size= Set the size of tmpfs. This space is used for
- 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%"
-* dm_snap_prefix= Set a prefix for device-mapper snapshot node names.
- Default: "arch"
-* 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)
-
-
-** hooks/archiso_pxe_common
-
-* 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)
-* copy_resolvconf= Copy /etc/resolv.conf from initramfs to live-enviroment.
- Set to "n" to skip them.
- Default: "y"
-
-
-** hooks/archiso_pxe_nbd
-
-* archiso_nbd_name= Set NBD export name used by the server.
- Default: archiso
-* archiso_nbd_srv= Set an IP address where NBD reside.
- If ${pxeserver} is used, PXE IP will be used.
- Default: (unset)
-
-
-** hooks/archiso_pxe_http
-
-* archiso_http_srv= Set an HTTP URL (must end with /) where ${archisobasedir}
- is found with all *.sfs files.
- In the IP/domain part if ${pxeserver} is used, use PXE IP.
- Default: (unset)
-* archiso_http_spc= Set the size of tmpfs where *.sfs files are downloaded.
- Default: "75%"
-
-
-** 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
-
-
-** hooks/archiso_loop_mnt
-
-* img_label= Set the filesystem label where archiso-image.iso.
- Default: (unset)
-* img_dev= Device where archiso-image.iso reside.
- Default: (unset) or "/dev/disk/by-label/${img_label}"
-* img_loop= Full path where archiso-image.iso is located on ${img_dev}
- Default: (unset)
-
-
-
-*** Transfer ISO image to target medium (configs/releng)
-
-ISO images names consist of: parabola-<YYYY>.<MM>.<DD>-<ARCH>.iso
-
-Where:
- <YYYY> Year
- <MM> Month
- <DD> Day
- <ARCH> i686 | x86_64 | dual(*)
-
-(*) "dual" includes both i686 and x86_64 architectures.
-
-
-** To -> CD / DVD / BD
-
-Note: All ISO images are booteable on a PC-BIOS via "El Torito" in no-emulation mode,
- All x86_64 ISO images are booteable on a PC-EFI via "El Torito" in no-emulation mode.
-
-Nomeclature:
- <B> scsibus number
- <T> target number
- <L> lun number
- (Note: see cdrecord -scanbus, for these numbers)
-
-
-1) Write it directly using your favorite recording program.
-# cdrecord dev=<B>,<T>,<L> -dao parabola-<YYYY>.<MM>.<DD>-<ARCH>.iso
-
-
-** To -> USB Flash Drive (USB-key) / Memory card (SD) /
- Hard-Disk Drive (HDD) / Solid-State Drive (SSD)
-
-Note: These steps are the general workflow, you can skip some of them,
- using another filesystem if your bootloader supports it,
- installing to another directory than "arch/" or using more than
- one partition. Just ensure that main boot params options
- (archisolabel= and archisobasedir=) are set correctly according to your setup.
-
-Nomeclature:
-<DEV-TARGET>: Device node of the drive where ISO contents should be copied
- (example: /dev/sdx)
-<DEV-TARGET-N>: Device node of the partition on <DEV-TARGET>
- (example: /dev/sdx1)
-<MNT-TARGET-N>: Mount point path where <DEV-TARGET-N> is mounted
- (example: /mnt/sdx/1)
-<ISO-SOURCE>: Path to the ISO file parabola-<YYYY>.<MM>.<DD>-<ARCH>.iso
- (example: ~/parabola-2012.07.22-x86_64.iso)
-<FS-LABEL>: Represents the filesystem label of the <ISO-SOURCE>
- (example: ARCH_201207 [for all ~/parabola-2012.07.*.iso])
-
-
-* PC-BIOS (MBR):
-
-Note: Using here a MBR partition mode as example, but GPT should also works
- if machine firmware is not broken.
- Just ensure that partition is set with attribute "2: legacy BIOS bootable"
- and use gptmbr.bin instead of mbr.bin for syslinux.
-
-1) Create one partition entry in MBR (of type "b" for FAT32 or "83" for EXTFS)
- and mark it as "active" (bootable).
-# fdisk <DEV-TARGET>
-
-2) Create a FAT32 or EXTFS filesystem on such partition and setup a label.
-# mkfs.vfat -F 32 -n <FS-LABEL> <DEV-TARGET-N>
-# mkfs.ext4 -L <FS-LABEL> <DEV-TARGET-N>
-
-3) Mount target filesystem.
-# mount <DEV-TARGET-N> <MNT-TARGET-N>
-
-4) Extract ISO image on target filesystem.
-# bsdtar -x --exclude=isolinux/ --exclude=EFI/ -f <ISO-SOURCE> -C <MNT-TARGET-N>
-
-5) Install syslinux bootloader on target filesystem.
-# extlinux -i <MNT-TARGET-N>/arch/boot/syslinux
-
-6) Unmount target filesystem.
-# umount <MNT-TARGET-N>
-
-7) Install syslinux MBR boot code on target drive.
-# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/mbr.bin of=<DEV-TARGET>
-
-
-* PC-BIOS (ISOHYBRID-MBR):
-
-Note: This method is the most easily, quick and dirty, but is the most limited
- if you want to use your target medium for other purposes.
-
-1) Dump ISO file to target medium.
-# dd if=<ISO-SOURCE> of=<DEV-TARGET>
-
-
-* PC-EFI (GPT) [x86_64 only]
-
-Note: Using here a GPT partition mode as example, but MBR should also works
- if machine firmware is not broken.
-
-1) Create one partition entry in GPT (of type "ef00")
-# gdisk <DEV-TARGET>
-
-2) Create a FAT32 filesystem on such partition and setup a label.
-# mkfs.vfat -F 32 -n <FS-LABEL> <DEV-TARGET-N>
-
-3) Mount target filesystem.
-# mount <DEV-TARGET-N> <MNT-TARGET-N>
-
-4) Extract ISO image on target filesystem.
-# bsdtar -x --exclude=isolinux/ --exclude=arch/boot/syslinux/ -f <ISO-SOURCE> -C <MNT-TARGET-N>
-
-5) Extract efiboot.img on EFI/ on target filesystem.
-# mcopy -s -i <MNT-TARGET-N>/EFI/archiso/efiboot.img ::/EFI <MNT-TARGET-N>/
-
-6) Remove uneeded efiboot.img
-# rm <MNT-TARGET-N>/EFI/archiso/efiboot.img
-
-7) Unmount target filesystem.
-# umount <MNT-TARGET-N>
-
-
-
-*** Alternative boot methods (configs/releng)
-
-** ISO in loopback mode.
-
-Note: Described method is for using with GRUB2.
- GRUB2 is installed on target media and parabola-<YYYY>.<MM>.<DD>-<ARCH>.iso
- is at path <TARGET-PATH> on disk <D> and partition <P>,
- where filesystem is labeled as <TARGET-FS-LABEL>.
-
-menuentry "Parabola (x86_64)" {
- set isofile="/<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-<ARCH>.iso"
- loopback loop (hd<D>,<P>)$isofile
- linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile
- initrd (loop)/arch/boot/x86_64/libreiso.img
-}
-
-menuentry "Parabola (i686)" {
- set isofile="/<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-<ARCH>.iso"
- loopback loop (hd<D>,<P>)$isofile
- linux (loop)/arch/boot/i686/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile
- initrd (loop)/arch/boot/i686/libreiso.img
-}
-
-
-** ISO in memdisk mode.
-
-Note: Described method is for using with SYSLINUX. Anyway MEMDISK from SYSLINUX can work
- with other bootloaders.
- SYSLINUX is installed on target media and parabola-<YYYY>.<MM>.<DD>-<ARCH>.iso
- is at path <TARGET-PATH>.
- On 32-bit systems, is needed to pass vmalloc=nnM to the kernel, where nn is the size
- of the ISO image plus 64 MiB (or 128 MiB).
-
-
-LABEL arch_x64
- LINUX memdisk
- INITRD /<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-<ARCH>.iso
- APPEND iso
-
-LABEL arch_x32
- LINUX memdisk
- INITRD /<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-<ARCH>.iso
- APPEND iso
-
-
-** Network booting (PXE).
-
-All ISOs are ready to act as PXE server, some manual steps are needed
-to setup the desired PXE boot mode.
-Alternatively it is possible to use an existing PXE server following the same logic.
-Note: Setup network first, adjust IP adresses, and respect all slashes "/".
-
-First stage is for loading kernel and initramfs via PXE, two methods described here:
-
-* DHCP + TFTP
-
-Note: All NIC firmwares should support this.
-
-# dnsmasq --port=0 \
- --enable-tftp \
- --tftp-root=/run/archiso/bootmnt \
- --dhcp-range=192.168.0.2,192.168.0.254,86400 \
- --dhcp-boot=/arch/boot/syslinux/gpxelinux.0 \
- --dhcp-option-force=209,boot/syslinux/archiso.cfg \
- --dhcp-option-force=210,/arch/
-
-* DHCP + HTTP
-
-Note: Not all NIC firmware supports HTTP and DNS (if domain name is used).
- At least this works with iPXE and gPXE.
-
-# dnsmasq --port=0 \
- --dhcp-range=192.168.0.2,192.168.0.254,86400 \
- --dhcp-boot=http://192.168.0.7/arch/boot/syslinux/gpxelinux.0 \
- --dhcp-option-force=209,boot/syslinux/archiso.cfg \
- --dhcp-option-force=210,http://192.168.0.7/arch/
-
-
-Once the kernel is started from PXE, SquashFS files and other misc files
-inside "arch" directory must be loaded (second stage). One of the following
-methods can be used to serve the rest of live-medium.
-
-* HTTP
-
-# darkhttpd /run/archiso/bootmnt
-
-
-* NFS
-
-# echo "/run/archiso/bootmnt 192.168.0.*(ro,no_subtree_check,no_root_squash)" >> /etc/exports
-# rc.d start rpcbind nfs-common nfs-server
-
-
-* NBD
-
-Note: Adjust ARCH_201207 as needed.
-
-# cat << EOF > /tmp/nbd-server.conf
-[generic]
-[archiso]
- readonly = true
- exportname = /dev/disk/by-label/ARCH_201207
-EOF
-# nbd-server -C /tmp/nbd-server.conf
-
-
-
-*** Transfer ISO image to target medium (configs/releng)
-
-ISO images names consist of: parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso
-
-Where:
- <YYYY> Year
- <MM> Month
- <DD> Day
- <TYPE> netinstall | core
- <ARCH> i686 | x86_64 | dual(*)
-
-(*) "dual" includes both i686 and x86_64 architectures.
-
-
-** To -> CD / DVD / BD
-
-Note: All ISO images are booteable on a PC-BIOS via "El Torito" in no-emulation mode,
- All x86_64 ISO images are booteable on a PC-EFI via "El Torito" in no-emulation mode.
-
-Nomeclature:
- <B> scsibus number
- <T> target number
- <L> lun number
- (Note: see cdrecord -scanbus, for these numbers)
-
-
-1) Write it directly using your favorite recording program.
-# cdrecord dev=<B>,<T>,<L> -dao parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso
-
-
-** To -> USB Flash Drive (USB-key) / Memory card (SD) /
- Hard-Disk Drive (HDD) / Solid-State Drive (SSD)
-
-Note: These steps are the general workflow, you can skip some of them,
- using another filesystem if your bootloader supports it,
- installing to another directory than "arch/" or using more than
- one partition. Just ensure that main boot params options
- (archisolabel= and archisobasedir=) are set correctly according to your setup.
-
-Nomeclature:
-<DEV-TARGET>: Device node of the drive where ISO contents should be copied
- (example: /dev/sdx)
-<DEV-TARGET-N>: Device node of the partition on <DEV-TARGET>
- (example: /dev/sdx1)
-<MNT-TARGET-N>: Mount point path where <DEV-TARGET-N> is mounted
- (example: /mnt/sdx/1)
-<ISO-SOURCE>: Path to the ISO file parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso
- (example: ~/parabola-2012.04.16-netinstall-x86_64.iso)
-<FS-LABEL>: Represents the filesystem label of the <ISO-SOURCE>
- (example: LIBRE_201204 [for all ~/parabola-2012.04.*.iso])
-
-
-* PC-BIOS (MBR):
-
-Note: Using here a MBR partition mode as example, but GPT should also works
- if machine firmware is not broken.
- Just ensure that partition is set with attribute "2: legacy BIOS bootable"
- and use gptmbr.bin instead of mbr.bin for syslinux.
-
-1) Create one partition entry in MBR (of type "b" for FAT32 or "83" for EXTFS)
- and mark it as "active" (bootable).
-# fdisk <DEV-TARGET>
-
-2) Create a FAT32 or EXTFS filesystem on such partition and setup a label.
-# mkfs.vfat -F 32 -n <FS-LABEL> <DEV-TARGET-N>
-# mkfs.ext4 -L <FS-LABEL> <DEV-TARGET-N>
-
-3) Mount target filesystem.
-# mount <DEV-TARGET-N> <MNT-TARGET-N>
-
-4) Extract ISO image on target filesystem.
-# bsdtar -x --exclude=isolinux/ --exclude=EFI/ -f <ISO-SOURCE> -C <MNT-TARGET-N>
-
-5) Install syslinux bootloader on target filesystem.
-# extlinux -i <MNT-TARGET-N>/arch/boot/syslinux
-
-6) Unmount target filesystem.
-# umount <MNT-TARGET-N>
-
-7) Install syslinux MBR boot code on target drive.
-# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/mbr.bin of=<DEV-TARGET>
-
-
-* PC-BIOS (ISOHYBRID-MBR):
-
-Note: This method is the most easily, quick and dirty, but is the most limited
- if you want to use your target medium for other purposes.
-
-1) Dump ISO file to target medium.
-# dd if=<ISO-SOURCE> of=<DEV-TARGET>
-
-
-* PC-EFI (GPT) [x86_64 only]
-
-Note: Using here a GPT partition mode as example, but MBR should also works
- if machine firmware is not broken.
-
-1) Create one partition entry in GPT (of type "ef00")
-# gdisk <DEV-TARGET>
-
-2) Create a FAT32 filesystem on such partition and setup a label.
-# mkfs.vfat -F 32 -n <FS-LABEL> <DEV-TARGET-N>
-
-3) Mount target filesystem.
-# mount <DEV-TARGET-N> <MNT-TARGET-N>
-
-4) Extract ISO image on target filesystem.
-# bsdtar -x --exclude=isolinux/ --exclude=arch/boot/syslinux/ -f <ISO-SOURCE> -C <MNT-TARGET-N>
-
-5) Extract efiboot.img on EFI/ on target filesystem.
-# mcopy -s -i <MNT-TARGET-N>/EFI/archiso/efiboot.img ::/EFI <MNT-TARGET-N>/
-
-6) Remove uneeded efiboot.img
-# rm <MNT-TARGET-N>/EFI/archiso/efiboot.img
-
-7) Unmount target filesystem.
-# umount <MNT-TARGET-N>
-
-
-
-*** Alternative boot methods (configs/releng)
-
-** ISO in loopback mode.
-
-Note: Described method is for using with GRUB2.
- GRUB2 is installed on target media and parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso
- is at path <TARGET-PATH> on disk <D> and partition <P>,
- where filesystem is labeled as <TARGET-FS-LABEL>.
-
-menuentry "Parabola GNU/Linux-libre (x86_64)" {
- set isofile="/<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso"
- loopback loop (hd<D>,<P>)$isofile
- linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile
- initrd (loop)/arch/boot/x86_64/libreiso.img
-}
-
-menuentry "Parabola GNU/Linux-libre (i686)" {
- set isofile="/<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso"
- loopback loop (hd<D>,<P>)$isofile
- linux (loop)/arch/boot/i686/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile
- initrd (loop)/arch/boot/i686/libreiso.img
-}
-
-
-** ISO in memdisk mode.
-
-Note: Described method is for using with SYSLINUX. Anyway MEMDISK from SYSLINUX can work
- with other bootloaders.
- SYSLINUX is installed on target media and parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso
- is at path <TARGET-PATH>.
- On 32-bit systems, is needed to pass vmalloc=nnM to the kernel, where nn is the size
- of the ISO image plus 64 MiB (or 128 MiB).
-
-
-LABEL parabola_x64
- LINUX memdisk
- INITRD /<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso
- APPEND iso
-
-LABEL parabola_x32
- LINUX memdisk
- INITRD /<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso
- APPEND iso
-
-
-** Network booting (PXE).
-
-All ISOs are ready to act as PXE server, some manual steps are needed
-to setup the desired PXE boot mode.
-Alternatively it is possible to use an existing PXE server following the same logic.
-Note: Setup network first, adjust IP adresses, and respect all slashes "/".
-
-First stage is for loading kernel and initramfs via PXE, two methods described here:
-
-* DHCP + TFTP
-
-Note: All NIC firmwares should support this.
-
-# dnsmasq --port=0 \
- --enable-tftp \
- --tftp-root=/run/archiso/bootmnt \
- --dhcp-range=192.168.0.2,192.168.0.254,86400 \
- --dhcp-boot=/arch/boot/syslinux/gpxelinux.0 \
- --dhcp-option-force=209,boot/syslinux/archiso.cfg \
- --dhcp-option-force=210,/arch/
-
-* DHCP + HTTP
-
-Note: Not all NIC firmware supports HTTP and DNS (if domain name is used).
- At least this works with iPXE and gPXE.
-
-# dnsmasq --port=0 \
- --dhcp-range=192.168.0.2,192.168.0.254,86400 \
- --dhcp-boot=http://192.168.0.7/arch/boot/syslinux/gpxelinux.0 \
- --dhcp-option-force=209,boot/syslinux/archiso.cfg \
- --dhcp-option-force=210,http://192.168.0.7/arch/
-
-
-Once the kernel is started from PXE, SquashFS files and other misc files
-inside "arch" directory must be loaded (second stage). One of the following
-methods can be used to serve the rest of live-medium.
-
-* HTTP
-
-# darkhttpd /run/archiso/bootmnt
-
-
-* NFS
-
-# echo "/run/archiso/bootmnt 192.168.0.*(ro,no_subtree_check,no_root_squash)" >> /etc/exports
-# rc.d start rpcbind nfs-common nfs-server
-
-
-* NBD
-
-Note: Adjust LIBRE_201204 as needed.
-
-# cat << EOF > /tmp/nbd-server.conf
-[generic]
-[archiso]
- readonly = true
- exportname = /dev/disk/by-label/LIBRE_201204
-EOF
-# nbd-server -C /tmp/nbd-server.conf
-
-
-
-*** 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
-/libre/boot/syslinux, like other boot loaders modules (EXTLINUX, SYSLINUX, etc).
-When make your custom boot-pendrive, you need to copy /libre directory to it.
-/isolinux/isolinux.cfg just holds /libre/boot/syslinux/syslinux.cfg
-
-
-*** Know issues
-
-** On shutdown there are two steps that [FAIL]:
- "Unmounting Swap-backed Filesystems" and "Unmounting Non-API Filesystems",
- These filesystem are in use at this stage by archiso, but...
- This is not a real issue since, all mounted filesystem, loopback devices
- and device mapper devices made by archiso will be "free" on "shutdown tmpfs"
- (A.K.A deinitramfs), build at initramfs by [archiso_shutdown] initcpio hook.
-
-
-*** Building the most basic Parabola live media. (configs/baseline)
-
-* Install needed packages.
- # pacman -S git make squashfs-tools libisoburn rsync --needed
-
-* Install archiso.
- # git clone git://projects.parabolagnulinux.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 Parabola live media. (configs/releng)
-
-* Install needed packages.
- # pacman -S git make squashfs-tools libisoburn dosfstools lynx patch --needed
-
-* Install archiso.
- # git clone git://projects.parabolagnulinux.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.
diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso
index 9445498..491ed2f 100644
--- a/archiso/initcpio/hooks/archiso
+++ b/archiso/initcpio/hooks/archiso
@@ -11,13 +11,14 @@ _mnt_fs() {
ro_dev=$(losetup --find --show --read-only "${img}")
echo ${ro_dev} >> /run/archiso/used_block_devices
ro_dev_size=$(blockdev --getsz ${ro_dev})
+ rw_dev_size=$((ro_dev_size*cowfile_size/100))
if [[ "${cow_persistent}" == "P" ]]; then
if [[ -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" ]]; then
msg ":: Found '/run/archiso/cowspace/${cow_directory}/${img_name}.cow', using as persistent."
else
msg ":: Creating '/run/archiso/cowspace/${cow_directory}/${img_name}.cow' as persistent."
- dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${ro_dev_size} &> /dev/null
+ dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${rw_dev_size} &> /dev/null
fi
else
if [[ -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" ]]; then
@@ -25,7 +26,7 @@ _mnt_fs() {
rm -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow"
fi
msg ":: Creating '/run/archiso/cowspace/${cow_directory}/${img_name}.cow' as non-persistent."
- dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${ro_dev_size} &> /dev/null
+ dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${rw_dev_size} &> /dev/null
fi
rw_dev=$(losetup --find --show "/run/archiso/cowspace/${cow_directory}/${img_name}.cow")
@@ -35,7 +36,6 @@ _mnt_fs() {
_mnt_dev "/dev/mapper/${dm_snap_name}" "${newroot}${mnt}" "-w"
echo $(readlink -f /dev/mapper/${dm_snap_name}) >> /run/archiso/used_block_devices
- echo "/dev/mapper/${dm_snap_name} ${mnt} auto defaults 0 0" >> ${newroot}/etc/fstab
}
# args: /path/to/image_file, mountpoint
@@ -102,6 +102,11 @@ run_hook() {
[[ -z "${archisobasedir}" ]] && archisobasedir="arch"
[[ -z "${dm_snap_prefix}" ]] && dm_snap_prefix="arch"
[[ -z "${archisodevice}" ]] && archisodevice="/dev/disk/by-label/${archisolabel}"
+ if [[ -z "${cowfile_size}" ]]; then
+ cowfile_size="100"
+ else
+ cowfile_size=${cowfile_size/%}
+ fi
if [[ -z "${aitab}" ]]; then
aitab="/run/archiso/bootmnt/${archisobasedir}/aitab"
diff --git a/configs/releng/build.sh b/configs/releng/build.sh
index 65dfbb2..c21d8fd 100755
--- a/configs/releng/build.sh
+++ b/configs/releng/build.sh
@@ -30,7 +30,7 @@ make_basefs() {
# Additional packages (root-image)
make_packages() {
- mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "$(grep -v ^# ${script_path}/packages.${arch})" install
+ mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "$(grep -h -v ^# ${script_path}/packages.{both,${arch}})" install
}
# Copy mkinitcpio archiso hooks (root-image)
@@ -65,13 +65,38 @@ make_boot() {
fi
}
-# Prepare EFI "El Torito" boot image (using Linux >= 3.3 EFI boot stub)
-make_boot_efi() {
+make_efi() {
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
if [[ ${arch} == "x86_64" ]]; then
+
+ mkdir -p ${work_dir}/iso/EFI/boot
+ cp ${work_dir}/root-image/usr/lib/gummiboot/gummibootx64.efi ${work_dir}/iso/EFI/boot/bootx64.efi
+
+ mkdir -p ${work_dir}/iso/loader/entries
+ cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/iso/loader/
+ cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/iso/loader/entries/
+ cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/iso/loader/entries/
+
+ sed "s|%ARCHISO_LABEL%|${iso_label}|g;
+ s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/efiboot/loader/entries/archiso-x86_64-usb.conf > ${work_dir}/iso/loader/entries/archiso-x86_64.conf
+
+ # EFI Shell 2.0 for UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UEFI_Shell )
+ wget -O ${work_dir}/iso/EFI/shellx64_v2.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi
+ # EFI Shell 1.0 for non UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Efi-shell )
+ wget -O ${work_dir}/iso/EFI/shellx64_v1.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi
+
+ fi
+ : > ${work_dir}/build.${FUNCNAME}
+ fi
+}
+
+make_efiboot() {
+ if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
+ if [[ ${arch} == "x86_64" ]]; then
+
mkdir -p ${work_dir}/iso/EFI/archiso
- dd of=${work_dir}/iso/EFI/archiso/efiboot.img bs=1 seek=20M count=0
- mkfs.vfat ${work_dir}/iso/EFI/archiso/efiboot.img
+ truncate -s 31M ${work_dir}/iso/EFI/archiso/efiboot.img
+ mkfs.vfat -n ARCHISO_EFI ${work_dir}/iso/EFI/archiso/efiboot.img
mkdir -p ${work_dir}/efiboot
mount ${work_dir}/iso/EFI/archiso/efiboot.img ${work_dir}/efiboot
@@ -80,29 +105,22 @@ make_boot_efi() {
cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/archiso/vmlinuz.efi
cp ${work_dir}/iso/${install_dir}/boot/x86_64/libreiso.img ${work_dir}/efiboot/EFI/archiso/libreiso.img
- # There are plans to support command line options via a config file (not yet in linux-3.3)
- #cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/boot/bootx64.efi
- #cp ${work_dir}/iso/${install_dir}/boot/x86_64/libreiso.img ${work_dir}/efiboot/EFI/boot/linux.img
- #echo "archisolabel=${iso_label} initrd=\EFI\boot\linux.img" | iconv -f ascii -t ucs2 > ${work_dir}/iso/EFI/boot/linux.conf
-
- # For now, provide an EFI-shell until 'linux.conf' hits mainline.
mkdir -p ${work_dir}/efiboot/EFI/boot
- # EFI Shell 2.0 for UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UEFI_Shell )
- #wget -O ${work_dir}/efiboot/EFI/boot/bootx64.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi
- # EFI Shell 1.0 for non UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Efi-shell )
- wget -O ${work_dir}/efiboot/EFI/boot/bootx64.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi
+ cp ${work_dir}/root-image/usr/lib/gummiboot/gummibootx64.efi ${work_dir}/efiboot/EFI/boot/bootx64.efi
- # Add an EFI shell script for automatic boot if ESC-key is not pressed within 5 seconds timeout.
- sed "s|%ARCHISO_LABEL%|${iso_label}|g;
- s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/efiboot/EFI/boot/startup_iso.nsh > ${work_dir}/efiboot/EFI/boot/startup.nsh
-
- mkdir -p ${work_dir}/iso/EFI/boot
- cp ${work_dir}/efiboot/EFI/boot/bootx64.efi ${work_dir}/iso/EFI/boot/bootx64.efi
+ mkdir -p ${work_dir}/efiboot/loader/entries
+ cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/efiboot/loader/
+ cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/efiboot/loader/entries/
+ cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/efiboot/loader/entries/
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
- s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/efiboot/EFI/boot/startup_usb.nsh > ${work_dir}/iso/EFI/boot/startup.nsh
+ s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/efiboot/loader/entries/archiso-x86_64-cd.conf > ${work_dir}/efiboot/loader/entries/archiso-x86_64.conf
+
+ cp ${work_dir}/iso/EFI/shellx64_v2.efi ${work_dir}/efiboot/EFI/
+ cp ${work_dir}/iso/EFI/shellx64_v1.efi ${work_dir}/efiboot/EFI/
umount ${work_dir}/efiboot
+
fi
: > ${work_dir}/build.${FUNCNAME}
fi
@@ -155,6 +173,8 @@ make_customize_root_image() {
lynx -dump -nolist 'https://wiki.parabolagnulinux.org/Installation_Guide?action=render' >> ${work_dir}/root-image/root/install.txt
patch ${work_dir}/root-image/usr/bin/pacman-key < ${script_path}/pacman-key-4.0.3_unattended-keyring-init.patch
sed -i 's/#\(en_US\.UTF-8\)/\1/' ${work_dir}/root-image/etc/locale.gen
+ sed 's#\(^ExecStart=-/sbin/agetty\)#\1 --autologin root#' \
+ ${work_dir}/root-image/usr/lib/systemd/system/getty@.service > ${work_dir}/root-image/etc/systemd/system/getty@.service
mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \
-r 'locale-gen' \
run
@@ -162,7 +182,10 @@ make_customize_root_image() {
-r 'usermod -s /bin/zsh root' \
run
mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \
- -r 'useradd -m -p "" -g users -G "audio,disk,optical,wheel" -s /bin/zsh arch' \
+ -r 'useradd -m -p "" -g users -G "adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel" -s /bin/zsh arch' \
+ run
+ mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \
+ -r 'systemctl -f enable pacman-init.service getty@.service dhcpcd.service || true' \
run
: > ${work_dir}/build.${FUNCNAME}
fi
@@ -271,7 +294,8 @@ make_common_single() {
make_packages
make_setup_mkinitcpio
make_boot
- make_boot_efi
+ make_efi
+ make_efiboot
make_syslinux
make_isolinux
make_customize_root_image
diff --git a/configs/releng/efiboot/EFI/boot/startup_iso.nsh b/configs/releng/efiboot/EFI/boot/startup_iso.nsh
deleted file mode 100644
index ac78735..0000000
--- a/configs/releng/efiboot/EFI/boot/startup_iso.nsh
+++ /dev/null
@@ -1,10 +0,0 @@
-@echo -off
-
-for %m run (0 20)
- if exist fs%m:\EFI\archiso\vmlinuz.efi then
- fs%m:
- cd fs%m:\EFI\archiso
- echo "Launching Parabola ISO Kernel fs%m:\EFI\archiso\vmlinuz.efi"
- vmlinuz.efi archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% initrd=\EFI\archiso\libreiso.img
- endif
-endfor
diff --git a/configs/releng/efiboot/EFI/boot/startup_usb.nsh b/configs/releng/efiboot/EFI/boot/startup_usb.nsh
deleted file mode 100644
index 2621cc4..0000000
--- a/configs/releng/efiboot/EFI/boot/startup_usb.nsh
+++ /dev/null
@@ -1,10 +0,0 @@
-@echo -off
-
-for %m run (0 20)
- if exist fs%m:\%INSTALL_DIR%\boot\x86_64\vmlinuz then
- fs%m:
- cd fs%m:\%INSTALL_DIR%\boot\x86_64
- echo "Launching Archiso Kernel fs%m:\%INSTALL_DIR%\boot\x86_64\vmlinuz"
- vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% initrd=\%INSTALL_DIR%\boot\x86_64\libreiso.img
- endif
-endfor
diff --git a/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf b/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf
new file mode 100644
index 0000000..9892c59
--- /dev/null
+++ b/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf
@@ -0,0 +1,4 @@
+title Arch Linux archiso x86_64 UEFI CD
+linux /EFI/archiso/vmlinuz.efi
+initrd /EFI/archiso/archiso.img
+options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
diff --git a/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf b/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf
new file mode 100644
index 0000000..f61c532
--- /dev/null
+++ b/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf
@@ -0,0 +1,4 @@
+title Arch Linux archiso x86_64 UEFI USB
+linux /%INSTALL_DIR%/boot/x86_64/vmlinuz
+initrd /%INSTALL_DIR%/boot/x86_64/archiso.img
+options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
diff --git a/configs/releng/efiboot/loader/entries/uefi-shell-v1-x86_64.conf b/configs/releng/efiboot/loader/entries/uefi-shell-v1-x86_64.conf
new file mode 100644
index 0000000..9597ff2
--- /dev/null
+++ b/configs/releng/efiboot/loader/entries/uefi-shell-v1-x86_64.conf
@@ -0,0 +1,2 @@
+title UEFI Shell x86_64 v1
+efi /EFI/shellx64_v1.efi
diff --git a/configs/releng/efiboot/loader/entries/uefi-shell-v2-x86_64.conf b/configs/releng/efiboot/loader/entries/uefi-shell-v2-x86_64.conf
new file mode 100644
index 0000000..0dde77a
--- /dev/null
+++ b/configs/releng/efiboot/loader/entries/uefi-shell-v2-x86_64.conf
@@ -0,0 +1,2 @@
+title UEFI Shell x86_64 v2
+efi /EFI/shellx64_v2.efi
diff --git a/configs/releng/efiboot/loader/loader.conf b/configs/releng/efiboot/loader/loader.conf
new file mode 100644
index 0000000..62c4a83
--- /dev/null
+++ b/configs/releng/efiboot/loader/loader.conf
@@ -0,0 +1,2 @@
+timeout 3
+default archiso-x86_64
diff --git a/configs/releng/mkinitcpio.conf b/configs/releng/mkinitcpio.conf
index 12a656d..03af40c 100644
--- a/configs/releng/mkinitcpio.conf
+++ b/configs/releng/mkinitcpio.conf
@@ -1,2 +1,2 @@
-HOOKS="base udev memdisk archiso_shutdown archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_kms pata scsi sata virtio usb fw pcmcia filesystems usbinput"
+HOOKS="base udev timestamp memdisk archiso_shutdown archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_kms pata scsi sata virtio usb fw pcmcia filesystems usbinput"
COMPRESSION="xz"
diff --git a/configs/releng/packages.both b/configs/releng/packages.both
new file mode 100644
index 0000000..4bab7de
--- /dev/null
+++ b/configs/releng/packages.both
@@ -0,0 +1,60 @@
+arch-install-scripts
+b43-fwcutter
+btrfs-progs
+crda
+darkhttpd
+ddrescue
+dhclient
+dialog
+dmraid
+dnsmasq
+dnsutils
+dosfstools
+elinks
+ethtool
+fsarchiver
+gnu-netcat
+gptfdisk
+grml-zsh-config
+grub-bios
+haveged
+hdparm
+ipw2100-fw
+ipw2200-fw
+irssi
+lftp
+lilo
+linux-atm
+mc
+mtools
+netcfg
+nfs-utils
+nilfs-utils
+nmap
+ntfs-3g
+ntfsprogs
+ntp
+openconnect
+openssh
+openvpn
+partclone
+parted
+partimage
+pptpclient
+rfkill
+rp-pppoe
+rsync
+smartmontools
+speedtouch
+sudo
+tcpdump
+testdisk
+usb_modeswitch
+vpnc
+wget
+wireless_tools
+wpa_actiond
+wvdial
+xl2tpd
+zd1211-firmware
+zsh
diff --git a/configs/releng/packages.i686 b/configs/releng/packages.i686
index dacc785..e69de29 100644
--- a/configs/releng/packages.i686
+++ b/configs/releng/packages.i686
@@ -1,50 +0,0 @@
-arch-install-scripts
-btrfs-progs
-crda
-darkhttpd
-ddrescue
-dhclient
-dialog
-dmraid
-dnsmasq
-dnsutils
-dosfstools
-efibootmgr
-elinks
-gnu-netcat
-gptfdisk
-grml-zsh-config
-grub-bios
-haveged
-hdparm
-irssi
-lftp
-lilo
-linux-atm
-mtools
-netcfg
-nfs-utils
-nilfs-utils
-nmap
-ntfs-3g
-ntfsprogs
-ntp
-openconnect
-openssh
-openvpn
-parted
-pptpclient
-rp-pppoe
-rsync
-smartmontools
-sudo
-tcpdump
-usb_modeswitch
-vpnc
-wget
-wireless_tools
-wpa_actiond
-zile
-wvdial
-xl2tpd
-zsh
diff --git a/configs/releng/packages.x86_64 b/configs/releng/packages.x86_64
index 277cf72..137c9d5 100644
--- a/configs/releng/packages.x86_64
+++ b/configs/releng/packages.x86_64
@@ -1,52 +1,3 @@
-arch-install-scripts
-btrfs-progs
-crda
-darkhttpd
-ddrescue
-dhclient
-dialog
-dmraid
-dnsmasq
-dnsutils
-dosfstools
-efibootmgr
-elinks
-gnu-netcat
-gptfdisk
-grml-zsh-config
-grub-bios
grub-efi-x86_64
-haveged
-hdparm
-irssi
-lftp
-lilo
-linux-atm
-mtools
-netcfg
-nfs-utils
-nilfs-utils
-nmap
-ntfs-3g
-ntfsprogs
-ntp
-openconnect
-openssh
-openvpn
-parted
-pptpclient
-refind-efi-x86_64
-rp-pppoe
-rsync
-smartmontools
-sudo
-tcpdump
-usb_modeswitch
-vpnc
-wget
-wireless_tools
-wpa_actiond
-zile
-wvdial
-xl2tpd
-zsh
+gummiboot-efi
+refind-efi
diff --git a/configs/releng/root-image/etc/archiso/functions b/configs/releng/root-image/etc/archiso/functions
deleted file mode 100644
index 9fffdcb..0000000
--- a/configs/releng/root-image/etc/archiso/functions
+++ /dev/null
@@ -1,20 +0,0 @@
-# vim: set ft=sh:
-
-# kernel_cmdline <param> <default>
-# Looks for a parameter on the kernel's boot-time command line.
-#
-# returns: 0 if param was found. Also prints its value if it was a K=V param.
-# 1 if it was not. Also prints value passed as <default>
-#
-kernel_cmdline ()
-{
- for param in $(/bin/cat /proc/cmdline); do
- case "${param}" in
- $1=*) echo "${param##*=}"; return 0 ;;
- $1) return 0 ;;
- *) continue ;;
- esac
- done
- [ -n "${2}" ] && echo "${2}"
- return 1
-}
diff --git a/configs/releng/root-image/etc/conf.d/dhcpcd b/configs/releng/root-image/etc/conf.d/dhcpcd
deleted file mode 100644
index 76b56ff..0000000
--- a/configs/releng/root-image/etc/conf.d/dhcpcd
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# Arguments to be passed to the DHCP client daemon
-#
-
-DHCPCD_ARGS="-qb"
-
diff --git a/configs/releng/root-image/etc/fstab b/configs/releng/root-image/etc/fstab
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/configs/releng/root-image/etc/fstab
diff --git a/configs/releng/root-image/etc/inittab b/configs/releng/root-image/etc/inittab
deleted file mode 100644
index e3fe2c8..0000000
--- a/configs/releng/root-image/etc/inittab
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# /etc/inittab
-#
-
-# Runlevels:
-# 0 Halt
-# 1(S) Single-user
-# 2 Not used
-# 3 Multi-user
-# 4 Not used
-# 5 X11
-# 6 Reboot
-
-## Only one of the following two lines can be uncommented!
-# Boot to console
-id:3:initdefault:
-# Boot to X11
-#id:5:initdefault:
-
-rc::sysinit:/etc/rc.sysinit
-rs:S1:wait:/etc/rc.single
-rm:2345:wait:/etc/rc.multi
-rh:06:wait:/etc/rc.shutdown
-su:S:wait:/sbin/sulogin -p
-
-# -8 options fixes umlauts problem on login
-c1:2345:respawn:/sbin/agetty -8 -s -a root 38400 tty1 linux
-c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
-c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
-c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
-c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
-c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux
-
-# Serial Virtual Console for KVM and others VMs
-#s0:2345:respawn:/sbin/agetty -8 -s 9600 ttyS0 linux
-
-# Hypervisor Virtual Console for Xen and KVM
-#h0:2345:respawn:/sbin/agetty -8 -s 38400 hvc0 linux
-
-ca::ctrlaltdel:/sbin/shutdown -t3 -r now
-
-# Example lines for starting a login manager
-x:5:respawn:/usr/bin/xdm -nodaemon
-#x:5:respawn:/usr/sbin/gdm -nodaemon
-#x:5:respawn:/usr/bin/kdm -nodaemon
-#x:5:respawn:/usr/bin/slim >/dev/null 2>&1
-
-# End of file
diff --git a/configs/releng/root-image/etc/rc.conf b/configs/releng/root-image/etc/rc.conf
deleted file mode 100644
index 679b804..0000000
--- a/configs/releng/root-image/etc/rc.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-. /etc/archiso/functions
-#
-# /etc/rc.conf - configuration file for initscripts
-#
-# Most of rc.conf has been replaced by various other configuration
-# files. See parabola(7) for details.
-#
-# For more details on rc.conf see rc.conf(5).
-#
-
-DAEMONS=(syslog-ng network haveged pacman-init)
-
-# Storage
-#
-# USEDMRAID="no"
-# USELVM="no"
-
-# Network
-#
-# interface=
-# address=
-# netmask=
-# gateway=
diff --git a/configs/releng/root-image/etc/rc.d/functions.d/automated_script b/configs/releng/root-image/etc/rc.d/functions.d/automated_script
deleted file mode 100644
index f3e9018..0000000
--- a/configs/releng/root-image/etc/rc.d/functions.d/automated_script
+++ /dev/null
@@ -1,23 +0,0 @@
-automated_script ()
-{
- script="$(kernel_cmdline script)"
- if [[ -n "${script}" ]]; then
- stat_busy "Configuring $script"
- if [[ "${script}" =~ ^http:// || "${script}" =~ ^ftp:// ]]; then
- wget "${script}" -q -O /tmp/startup_script >/dev/null
- rt=$?
- else
- cp "${script}" /tmp/startup_script
- rt=$?
- fi
- if [ ${rt} -eq 0 ]; then
- chmod +x /tmp/startup_script
- echo -e '\nif [ $(tty) = "/dev/tty1" ]; then\n /tmp/startup_script\nfi\n' >> /root/.zprofile
- stat_done
- else
- stat_fail
- fi
- fi
-}
-
-add_hook multi_end automated_script
diff --git a/configs/releng/root-image/etc/rc.d/functions.d/setup_special_console b/configs/releng/root-image/etc/rc.d/functions.d/setup_special_console
deleted file mode 100644
index 7badfe3..0000000
--- a/configs/releng/root-image/etc/rc.d/functions.d/setup_special_console
+++ /dev/null
@@ -1,25 +0,0 @@
-# If an alternate console was specified on the kernel command line,
-# start agetty on it too.
-setup_special_console()
-{
- local cmdline_console
- if cmdline_console=$(kernel_cmdline console); then
- stat_busy "Starting agetty on console: ${cmdline_console}"
- local port options baud rts
- port=${cmdline_console%%,*}
- options=${cmdline_console#${port}}
- options=${options#,}
- baud=${options%%[neo]*}
- [[ ${options} == *r ]] && rts="-h"
- if ! grep -q "^${port}" /etc/securetty; then
- echo ${port} >> /etc/securetty
- fi
- if ! grep -q "^z0:" /etc/inittab; then
- echo "z0:2345:respawn:/sbin/agetty -8 -s ${rts} ${baud:-9600} ${port} linux" >> /etc/inittab
- fi
- /sbin/telinit q
- stat_done
- fi
-}
-
-add_hook sysinit_end setup_special_console
diff --git a/configs/releng/root-image/etc/rc.d/pacman-init b/configs/releng/root-image/etc/rc.d/pacman-init
deleted file mode 100755
index 596fe30..0000000
--- a/configs/releng/root-image/etc/rc.d/pacman-init
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-case "$1" in
- start)
- stat_busy "Initializing pacman keyring"
- if { pacman-key --init && pacman-key --populate archlinux && pacman-key --populate parabola; } &>/dev/null; then
- add_daemon pacman-init
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
-
- stop)
- stat_busy "Removing pacman keyring"
- rm -rf /etc/pacman.d/gnupg
- rm_daemon pacman-init
- stat_done
- ;;
-
- restart)
- $0 stop
- $0 start
- ;;
-
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-
-exit 0
diff --git a/configs/releng/root-image/etc/systemd/system/dhcpcd.service b/configs/releng/root-image/etc/systemd/system/dhcpcd.service
new file mode 100644
index 0000000..dd030d5
--- /dev/null
+++ b/configs/releng/root-image/etc/systemd/system/dhcpcd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=dhcpcd on all interfaces
+Wants=network.target
+Before=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd.pid
+ExecStart=/sbin/dhcpcd -A -b -q
+ExecStop=/sbin/dhcpcd -k
+
+[Install]
+WantedBy=multi-user.target
diff --git a/configs/releng/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount b/configs/releng/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount
new file mode 100644
index 0000000..4eab551
--- /dev/null
+++ b/configs/releng/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount
@@ -0,0 +1,8 @@
+[Unit]
+Description=Temporary /etc/pacman.d/gnupg directory
+
+[Mount]
+What=tmpfs
+Where=/etc/pacman.d/gnupg
+Type=tmpfs
+Options=mode=0755
diff --git a/configs/releng/root-image/etc/systemd/system/pacman-init.service b/configs/releng/root-image/etc/systemd/system/pacman-init.service
new file mode 100644
index 0000000..23b8144
--- /dev/null
+++ b/configs/releng/root-image/etc/systemd/system/pacman-init.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Initializes Pacman keyring
+Wants=haveged.service
+After=haveged.service
+Requires=etc-pacman.d-gnupg.mount
+After=etc-pacman.d-gnupg.mount
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/pacman-key --init
+ExecStart=/usr/bin/pacman-key --populate archlinux
+
+[Install]
+WantedBy=multi-user.target
diff --git a/configs/releng/root-image/etc/timezone b/configs/releng/root-image/etc/timezone
deleted file mode 100644
index e2e7775..0000000
--- a/configs/releng/root-image/etc/timezone
+++ /dev/null
@@ -1 +0,0 @@
-UTC
diff --git a/configs/releng/root-image/etc/vconsole.conf b/configs/releng/root-image/etc/vconsole.conf
deleted file mode 100644
index c58bf7e..0000000
--- a/configs/releng/root-image/etc/vconsole.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-KEYMAP=us
-FONT=
diff --git a/configs/releng/root-image/root/.automated_script.sh b/configs/releng/root-image/root/.automated_script.sh
new file mode 100755
index 0000000..fb106da
--- /dev/null
+++ b/configs/releng/root-image/root/.automated_script.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+script_cmdline ()
+{
+ local param
+ for param in $(< /proc/cmdline); do
+ case "${param}" in
+ script=*) echo "${param##*=}" ; return 0 ;;
+ esac
+ done
+}
+
+automated_script ()
+{
+ local script rt
+ script="$(script_cmdline)"
+ if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then
+ if [[ "${script}" =~ ^http:// || "${script}" =~ ^ftp:// ]]; then
+ wget "${script}" --retry-connrefused -q -O /tmp/startup_script >/dev/null
+ rt=$?
+ else
+ cp "${script}" /tmp/startup_script
+ rt=$?
+ fi
+ if [[ ${rt} -eq 0 ]]; then
+ chmod +x /tmp/startup_script
+ /tmp/startup_script
+ fi
+ fi
+}
+
+if [[ $(tty) == "/dev/tty1" ]]; then
+ automated_script
+fi
diff --git a/configs/releng/root-image/root/.zlogin b/configs/releng/root-image/root/.zlogin
new file mode 100644
index 0000000..f598e43
--- /dev/null
+++ b/configs/releng/root-image/root/.zlogin
@@ -0,0 +1 @@
+~/.automated_script.sh
diff --git a/configs/releng/syslinux.dual/archiso_pxe_both_inc.cfg b/configs/releng/syslinux.dual/archiso_pxe_both_inc.cfg
index 324523e..1593303 100644
--- a/configs/releng/syslinux.dual/archiso_pxe_both_inc.cfg
+++ b/configs/releng/syslinux.dual/archiso_pxe_both_inc.cfg
@@ -1,4 +1,4 @@
INCLUDE boot/syslinux/archiso_head.cfg
-INCLUDE boot/syslinux/archiso_pxe32.cfg
INCLUDE boot/syslinux/archiso_pxe64.cfg
+INCLUDE boot/syslinux/archiso_pxe32.cfg
INCLUDE boot/syslinux/archiso_tail.cfg
diff --git a/configs/releng/syslinux.dual/archiso_sys_both_inc.cfg b/configs/releng/syslinux.dual/archiso_sys_both_inc.cfg
index 4ed6b39..e885c40 100644
--- a/configs/releng/syslinux.dual/archiso_sys_both_inc.cfg
+++ b/configs/releng/syslinux.dual/archiso_sys_both_inc.cfg
@@ -1,4 +1,4 @@
INCLUDE boot/syslinux/archiso_head.cfg
-INCLUDE boot/syslinux/archiso_sys32.cfg
INCLUDE boot/syslinux/archiso_sys64.cfg
+INCLUDE boot/syslinux/archiso_sys32.cfg
INCLUDE boot/syslinux/archiso_tail.cfg
diff --git a/docs/README.altbootmethods b/docs/README.altbootmethods
new file mode 100644
index 0000000..ebe1c6e
--- /dev/null
+++ b/docs/README.altbootmethods
@@ -0,0 +1,128 @@
+INDEX
+-----
+
+* Alternative boot methods (configs/releng)
+ * ISO in loopback mode
+ * ISO in memdisk mode
+ * Network booting (PXE) [first stage]
+ * DHCP + TFTP
+ * DHCP + HTTP
+ * HTTP/NFS/NBD [second stage]
+
+
+
+*** Alternative boot methods (configs/releng)
+
+ISO images names consist of: archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
+
+Where:
+ <YYYY> Year
+ <MM> Month
+ <DD> Day
+ <ARCH> i686 | x86_64 | dual(*)
+
+(*) "dual" includes both i686 and x86_64 architectures.
+
+
+** ISO in loopback mode.
+
+Note: Described method is for using with GRUB2.
+ GRUB2 is installed on target media and archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
+ is at path <TARGET-PATH> on disk <D> and partition <P>,
+ where filesystem is labeled as <TARGET-FS-LABEL>.
+
+menuentry "Arch Linux (x86_64)" {
+ set isofile="/<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso"
+ loopback loop (hd<D>,<P>)$isofile
+ linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile
+ initrd (loop)/arch/boot/x86_64/archiso.img
+}
+
+menuentry "Arch Linux (i686)" {
+ set isofile="/<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso"
+ loopback loop (hd<D>,<P>)$isofile
+ linux (loop)/arch/boot/i686/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile
+ initrd (loop)/arch/boot/i686/archiso.img
+}
+
+
+** ISO in memdisk mode.
+
+Note: Described method is for using with SYSLINUX. Anyway MEMDISK from SYSLINUX can work
+ with other bootloaders.
+ SYSLINUX is installed on target media and archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
+ is at path <TARGET-PATH>.
+ On 32-bit systems, is needed to pass vmalloc=nnM to the kernel, where nn is the size
+ of the ISO image plus 64 MiB (or 128 MiB).
+
+
+LABEL arch_x64
+ LINUX memdisk
+ INITRD /<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
+ APPEND iso
+
+LABEL arch_x32
+ LINUX memdisk
+ INITRD /<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
+ APPEND iso
+
+
+** Network booting (PXE).
+
+All ISOs are ready to act as PXE server, some manual steps are needed
+to setup the desired PXE boot mode.
+Alternatively it is possible to use an existing PXE server following the same logic.
+Note: Setup network first, adjust IP adresses, and respect all slashes "/".
+
+First stage is for loading kernel and initramfs via PXE, two methods described here:
+
+* DHCP + TFTP
+
+Note: All NIC firmwares should support this.
+
+# dnsmasq --port=0 \
+ --enable-tftp \
+ --tftp-root=/run/archiso/bootmnt \
+ --dhcp-range=192.168.0.2,192.168.0.254,86400 \
+ --dhcp-boot=/arch/boot/syslinux/gpxelinux.0 \
+ --dhcp-option-force=209,boot/syslinux/archiso.cfg \
+ --dhcp-option-force=210,/arch/
+
+* DHCP + HTTP
+
+Note: Not all NIC firmware supports HTTP and DNS (if domain name is used).
+ At least this works with iPXE and gPXE.
+
+# dnsmasq --port=0 \
+ --dhcp-range=192.168.0.2,192.168.0.254,86400 \
+ --dhcp-boot=http://192.168.0.7/arch/boot/syslinux/gpxelinux.0 \
+ --dhcp-option-force=209,boot/syslinux/archiso.cfg \
+ --dhcp-option-force=210,http://192.168.0.7/arch/
+
+
+Once the kernel is started from PXE, SquashFS files and other misc files
+inside "arch" directory must be loaded (second stage). One of the following
+methods can be used to serve the rest of live-medium.
+
+* HTTP
+
+# darkhttpd /run/archiso/bootmnt
+
+
+* NFS
+
+# echo "/run/archiso/bootmnt 192.168.0.*(ro,no_subtree_check,no_root_squash)" >> /etc/exports
+# rc.d start rpcbind nfs-common nfs-server
+
+
+* NBD
+
+Note: Adjust ARCH_201207 as needed.
+
+# cat << EOF > /tmp/nbd-server.conf
+[generic]
+[archiso]
+ readonly = true
+ exportname = /dev/disk/by-label/ARCH_201207
+EOF
+# nbd-server -C /tmp/nbd-server.conf
diff --git a/docs/README.bootparams b/docs/README.bootparams
new file mode 100644
index 0000000..13e1ead
--- /dev/null
+++ b/docs/README.bootparams
@@ -0,0 +1,127 @@
+INDEX
+-----
+
+* Boot parameters (initramfs stage)
+ * hooks/archiso
+ * hooks/archiso_pxe_common
+ * hooks/archiso_pxe_nbd
+ * hooks/archiso_pxe_http
+ * hooks/archiso_pxe_nfs
+ * hooks/archiso_loop_mnt
+
+
+
+*** 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)
+* 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)
+* 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".
+* 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%"
+* cowfile_size= Set the size for all files to be used as COW (dm-snapshot),
+ in percentage of the ro-device.fs file. This is mostly useful
+ when cow_device= is used and filesystem does not support
+ sparse files (ie VFAT).
+ Default: "100%"
+* copytoram_size= Set the size of tmpfs. This space is used for
+ 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%"
+* dm_snap_prefix= Set a prefix for device-mapper snapshot node names.
+ Default: "arch"
+* 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)
+
+
+** hooks/archiso_pxe_common
+
+* 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)
+* copy_resolvconf= Copy /etc/resolv.conf from initramfs to live-enviroment.
+ Set to "n" to skip them.
+ Default: "y"
+
+
+** hooks/archiso_pxe_nbd
+
+* archiso_nbd_name= Set NBD export name used by the server.
+ Default: archiso
+* archiso_nbd_srv= Set an IP address where NBD reside.
+ If ${pxeserver} is used, PXE IP will be used.
+ Default: (unset)
+
+
+** hooks/archiso_pxe_http
+
+* archiso_http_srv= Set an HTTP URL (must end with /) where ${archisobasedir}
+ is found with all *.sfs files.
+ In the IP/domain part if ${pxeserver} is used, use PXE IP.
+ Default: (unset)
+* archiso_http_spc= Set the size of tmpfs where *.sfs files are downloaded.
+ Default: "75%"
+
+
+** 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
+
+
+** hooks/archiso_loop_mnt
+
+* img_label= Set the filesystem label where archiso-image.iso.
+ Default: (unset)
+* img_dev= Device where archiso-image.iso reside.
+ Default: (unset) or "/dev/disk/by-label/${img_label}"
+* img_loop= Full path where archiso-image.iso is located on ${img_dev}
+ Default: (unset)
diff --git a/docs/README.build b/docs/README.build
new file mode 100644
index 0000000..2a3d709
--- /dev/null
+++ b/docs/README.build
@@ -0,0 +1,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.
diff --git a/docs/README.knowissues b/docs/README.knowissues
new file mode 100644
index 0000000..24bfa41
--- /dev/null
+++ b/docs/README.knowissues
@@ -0,0 +1,16 @@
+*** Know issues
+
+** (1) On shutdown lots of messages from systemd like:
+
+ "Could not unmount /run/archiso/<ABC>: Device or resource busy"
+ "Could not delete loopback /dev/loop<N>: Device or resource busy"
+ This is not a real issue since, all mounted filesystem, loopback devices
+ and device mapper devices made by archiso will be "free" on "shutdown tmpfs"
+ (A.K.A deinitramfs), build at initramfs by [archiso_shutdown] initcpio hook.
+ Proper shutdown is mostly important when persistent is used.
+
+** (2) syslinux 4.05 bug with relative directories on FAT:
+
+ "Could not find kernel image: boot/syslinux/whichsys.c32"
+ This should be fixed in 4.06. For now, workaround with:
+ sed -i "s|../../|/arch|" /<MNT-TARGET-N>/arch/boot/syslinux/syslinux.cfg
diff --git a/docs/README.transfer b/docs/README.transfer
new file mode 100644
index 0000000..e9654b8
--- /dev/null
+++ b/docs/README.transfer
@@ -0,0 +1,122 @@
+INDEX
+-----
+
+* Transfer ISO file to target medium (configs/releng)
+ * To -> CD / DVD / BD
+ * To -> USB-key / SD / HDD / SSD
+ * PC-BIOS (MBR)
+ * PC-BIOS (ISOHYBRID-MBR)
+ * PC-EFI (GPT) [x86_64 only]
+
+
+
+*** Transfer ISO image to target medium (configs/releng)
+
+ISO images names consist of: archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
+
+Where:
+ <YYYY> Year
+ <MM> Month
+ <DD> Day
+ <ARCH> i686 | x86_64 | dual(*)
+
+(*) "dual" includes both i686 and x86_64 architectures.
+
+
+** To -> CD / DVD / BD
+
+Note: All ISO images are booteable on a PC-BIOS via "El Torito" in no-emulation mode,
+ All x86_64 ISO images are booteable on a PC-EFI via "El Torito" in no-emulation mode.
+
+Nomeclature:
+ <B> scsibus number
+ <T> target number
+ <L> lun number
+ (Note: see cdrecord -scanbus, for these numbers)
+
+
+1) Write it directly using your favorite recording program.
+# cdrecord dev=<B>,<T>,<L> -dao archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
+
+
+** To -> USB Flash Drive (USB-key) / Memory card (SD) /
+ Hard-Disk Drive (HDD) / Solid-State Drive (SSD)
+
+Note: These steps are the general workflow, you can skip some of them,
+ using another filesystem if your bootloader supports it,
+ installing to another directory than "arch/" or using more than
+ one partition. Just ensure that main boot params options
+ (archisolabel= and archisobasedir=) are set correctly according to your setup.
+
+Nomeclature:
+<DEV-TARGET>: Device node of the drive where ISO contents should be copied
+ (example: /dev/sdx)
+<DEV-TARGET-N>: Device node of the partition on <DEV-TARGET>
+ (example: /dev/sdx1)
+<MNT-TARGET-N>: Mount point path where <DEV-TARGET-N> is mounted
+ (example: /mnt/sdx/1)
+<ISO-SOURCE>: Path to the ISO file archlinux-<YYYY>.<MM>.<DD>-<ARCH>.iso
+ (example: ~/archlinux-2012.07.22-x86_64.iso)
+<FS-LABEL>: Represents the filesystem label of the <ISO-SOURCE>
+ (example: ARCH_201207 [for all ~/archlinux-2012.07.*.iso])
+
+
+* PC-BIOS (MBR):
+
+Note: Using here a MBR partition mode as example, but GPT should also works
+ if machine firmware is not broken.
+ Just ensure that partition is set with attribute "2: legacy BIOS bootable"
+ and use gptmbr.bin instead of mbr.bin for syslinux.
+
+1) Create one partition entry in MBR (of type "b" for FAT32 or "83" for EXTFS)
+ and mark it as "active" (bootable).
+# fdisk <DEV-TARGET>
+
+2) Create a FAT32 or EXTFS filesystem on such partition and setup a label.
+# mkfs.vfat -F 32 -n <FS-LABEL> <DEV-TARGET-N>
+# mkfs.ext4 -L <FS-LABEL> <DEV-TARGET-N>
+
+3) Mount target filesystem.
+# mount <DEV-TARGET-N> <MNT-TARGET-N>
+
+4) Extract ISO image on target filesystem.
+# bsdtar -x --exclude=isolinux/ --exclude=EFI/ --exclude=loader/ -f <ISO-SOURCE> -C <MNT-TARGET-N>
+
+5) Install syslinux bootloader on target filesystem. (See know issue (2) if using FAT)
+# extlinux -i <MNT-TARGET-N>/arch/boot/syslinux
+
+6) Unmount target filesystem.
+# umount <MNT-TARGET-N>
+
+7) Install syslinux MBR boot code on target drive.
+# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/mbr.bin of=<DEV-TARGET>
+
+
+* PC-BIOS (ISOHYBRID-MBR):
+
+Note: This method is the most easily, quick and dirty, but is the most limited
+ if you want to use your target medium for other purposes.
+
+1) Dump ISO file to target medium.
+# dd if=<ISO-SOURCE> of=<DEV-TARGET>
+
+
+* PC-EFI (GPT) [x86_64 only]
+
+Note: Using here a GPT partition mode as example, but MBR should also works
+ if machine firmware is not broken.
+
+1) Create one partition entry in GPT (of type "ef00")
+# gdisk <DEV-TARGET>
+
+2) Create a FAT32 filesystem on such partition and setup a label.
+# mkfs.vfat -F 32 -n <FS-LABEL> <DEV-TARGET-N>
+
+3) Mount target filesystem.
+# mount <DEV-TARGET-N> <MNT-TARGET-N>
+
+4) Extract ISO image on target filesystem.
+# bsdtar -x --exclude=isolinux/ --exclude=EFI/archiso/ --exclude=arch/boot/syslinux/ -f <ISO-SOURCE> -C <MNT-TARGET-N>
+
+5) Unmount target filesystem.
+# umount <MNT-TARGET-N>