Remastering the Install ISO

From ArchWiki
Revision as of 14:11, 4 October 2014 by Scdbackup (talk | contribs) (Updated link target for burning)
Jump to navigation Jump to search

Remastering the official Arch Linux install ISO image is not necessary for most applications. However, it may be desirable in some cases.

  • Basic hardware is not supported by the core install. (rare)
  • Installation on a non-internet capable machine.
  • Deployment of Arch Linux on many similar machines, requiring the same installation procedure.

As these ISOs are bootable, they can also be used for system rescue, testing, project demos, and more.


It is often preferable to rebuild the installation ISO with Archiso, instead of remastering an existing ISO.


To remaster the Arch Linux ISO, you will need a copy of the original ISO image. Download it from the download page

Now, create a new directory to mount the ISO:

# mkdir /mnt/archiso

Mount the ISO to this directory (due to the nature of ISOs, the result is read-only):

# mount -t iso9660 -o loop /path/to/archISO /mnt/archiso

Copy the contents to another directory, where they can be edited:

$ cp -a /mnt/archiso ~/customiso


Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Edit the contents of ~/customiso as needed. Some helpful hints:

  • The kernels (IDE and scsi) that are booted by the cd are found at isolinux/vmlinuz and isolinux/vmlinuz_scsi. When using a custom kernel, preferably use the configuration from existing kernels and edit them accordingly. This can be done with scripts/extract-ikconfig from any kernel source tree.
  • Kernel sources, as well as default Arch kernel configs, which are used if a user chooses to build a kernel at install time are located at arch/
  • The given filesystem in the installation environment is at airootfs.sfs. To edit this, copy it to another location:
$ cp airootfs.sfs ~

Extract the sqfs image from the file (squashfs-tools is needed for this)

$ unsquashfs airootfs.sfs

This will generate a new folder called squashfs-root with a file called airootfs.img in it. This file contains a ext2 filesystem. Mount this filesystem to make changes to it.

# mkdir /mnt/rootfs
# mount ~/squashfs-root/airootfs.img /mnt/rootfs

You can do a chroot into this folder to be able to install new software in the image using pacman.

$ arch-chroot /mnt/rootfs
Note: If the arch-chroot script is not available in your system (e.g, when remastering arch-based distros), mount the api file systems and copy over your DNS details. See Chroot#Using_plain_chroot.

When done, exit from the chroot, unmount the rootfs and create the new squashfs image:

# exit
# umount /mnt/rootfs
$ mksquashfs squashfs-root airootfs.sfs

You will probably have to delete the old airootfs.sfs, as otherwise mksquashfs will try to append and give all kinds of problems. You'll now have a new airootfs.sfs, which you can copy back to your ISO, replacing the old one:

$ cp airootfs.sfs customiso/airootfs.sfs

Create a new ISO

Create a new ISO image with genisoimage, which is part of cdrkit.

$ genisoimage -l -r -J -V "ARCH_201209" -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/ -o ~/arch-custom.iso ~/customiso
Note: The ISO label must remain the same as the original label (in this case ARCH_201209) for the image to boot successfully.

The resulting ISO image will boot only from CD, DVD or BD. For booting from USB stick or hard disk, it needs the isohybrid feature. This can be achieved by postprocessing the ISO by program isohybrid included in syslinux. Officially, the version of installed SYSLINUX has to be the same as the version of /isolinux/isolinux.bin in the ISO. It is not known whether really incompatible version combinations exist.

An alternative to genisoimage plus isohybrid can be derived from the xorriso run of mkarchiso.

$ iso_label="ARCH_201209"
$ xorriso -as mkisofs \
       -iso-level 3 \  
       -full-iso9660-filenames \
       -volid "${iso_label}" \
       -eltorito-boot isolinux/isolinux.bin \
       -eltorito-catalog isolinux/ \
       -no-emul-boot -boot-load-size 4 -boot-info-table \
       -isohybrid-mbr ~/customiso/isolinux/isohdpfx.bin \
       -output arch-custom.iso \ 

Option -isohybrid-mbr needs an MBR template file. Most probably there is already such a file /isolinux/isohdpfx.bin in the original ISO, which matches the SYSLINUX version used in the ISO. Only if this file is missing in the copied ISO content, it has to be cut out of the original ISO image file, before above xorriso run is performed:

$ dd if=/path/to/archISO bs=512 count=1 of=~/customiso/isolinux/isohdpfx.bin

If the original ISO supports bootability via EFI, this can be activated in the new ISO by inserting the following options between the lines "-isohybrid-mbr ..." and "-output ...":

       -eltorito-alt-boot \
       -e EFI/archiso/efiboot.img \
       -no-emul-boot -isohybrid-gpt-basdat \

The file /EFI/archiso/efiboot.img is a FAT filesystem image file. If it is missing in the original ISO, then there was no EFI support in that ISO.

The newly created ISO image arch-custom.iso is found in the home directory. You can write the ISO image to a USB stick as explained in USB Installation Media. Alternatively you can burn the ISO image on a CD, DVD, or BD with your preferred software. On Arch, that is covered in the article about burning an ISO image.


larch aims to provide a more desktop-based approach, and it does not require an Arch Linux host system.

  • As of version 2.6.39, the vanilla kernel no longer supports aufs, making a custom kernel a necessity.
  • There is an AUFS version of the arch kernel in AUR - linux-aufs_friendly, and larch maintains an i686 build, you need not compile anything unless you want 64 bit.


It is a very simple live CD creator. It uses just a Makefile to build live CD images, and uses pacman to install base and additional packages to the live CD. You can choose your packages and build them into a live CD. Moreover, it uses GRUB to boot the live CD in order to add more flexibility. This means that it is much easier to make a live USB stick without formating it. For that, you just need to install GRUB into your USB pen drive and copy the files in the ISO to your root directory in the pen drive. It relies on an Arch Linux host system and pacman.



It supports aufs among other things, making it an option for live CDs.


Note: As of version 2.6.39, the vanilla kernel no longer supports aufs, making a custom kernel a necessity.

See also