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 (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] * Build requirements * Image types generated by mkarchiso. * File format for aitab. * Why the /isolinux and /arch/boot/syslinux directories? * Know issues * Building the most basic Arch Linux live media. (configs/baseline) * Building official Arch Linux 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=::: 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= Default: (set via PXELINUX) ** 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) *** 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" *** Transfer ISO image to target medium (configs/releng) ISO images names consist of: archlinux-..
--.iso Where: Year Month
Day netinstall | core 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: scsibus number target number lun number (Note: see cdrecord -scanbus, for these numbers) 1) Write it directly using your favorite recording program. # cdrecord dev=,, -dao archlinux-..
--.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: : Device node of the drive where ISO contents should be copied (example: /dev/sdx) : Device node of the partition on (example: /dev/sdx1) : Mount point path where is mounted (example: /mnt/sdx/1) : Path to the ISO file archlinux-..
--.iso (example: ~/archlinux-2012.04.16-netinstall-x86_64.iso) : Represents the filesystem label of the (example: ARCH_201204 [for all ~/archlinux-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 2) Create a FAT32 or EXTFS filesystem on such partition and setup a label. # mkfs.vfat -F 32 -n # mkfs.ext4 -L 3) Mount target filesystem. # mount 4) Extract ISO image on target filesystem. # bsdtar -x --exclude=isolinux/ --exclude=EFI/ -f -C 5) Install syslinux bootloader on target filesystem. # extlinux -i /arch/boot/syslinux 6) Unmount target filesystem. # umount 7) Install syslinux MBR boot code on target drive. # dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/mbr.bin of= * 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= of= * 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 2) Create a FAT32 filesystem on such partition and setup a label. # mkfs.vfat -F 32 -n 3) Mount target filesystem. # mount 4) Extract ISO image on target filesystem. # bsdtar -x --exclude=isolinux/ --exclude=arch/boot/syslinux/ -f -C 5) Extract efiboot.img on EFI/ on target filesystem. # mcopy -s -i /EFI/archiso/efiboot.img ::/EFI / 6) Remove uneeded efiboot.img # rm /EFI/archiso/efiboot.img 7) Unmount target filesystem. # umount *** Build requirements ** For mkarchiso script needs these packages (build host): + squashfs-tools for mksquashfs + libisoburn for xorriso + rsync for rsync ** For configs/releng build.sh needs theses packages (build host): + dosfstools for mkfs.vfat ** 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. # Image name without extension (.fs .fs.sfs .sfs). Mount point. Architecture { i686 | x86_64 | any }. SquashFS compression type { gzip | lzo | xz }. 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. 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 *** 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 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/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 rsync dosfstools --needed * Install archiso. # git clone git://projects.archlinux.org/archiso.git # make -C archiso/archiso install * Build them! # /usr/share/archiso/configs/releng/build.sh build all all Note: See build.sh -h for more options.