ISO
- Add 
.tar.zstpackages on the install iso (rad should install to custom root, a la pacstrap) - Add 
limine, (mtools?) andpartedto install iso - Add 
dosfstools,efibootmgrandgptfdiskto install iso - Do not add microcode or firmware to live iso?
 - Modify 
/etc/issueand add date and username and pass: https://www.linuxfromscratch.org/blfs/view/svn/postlfs/logon.html makewhatis /usr/share/manto update man-pages- Prefer 
cattodd 
- sleep is essential to avoid race conditions; unfortunately 
rootdelayandrootwaitare not available in live environments - Mounting a device 
/dev/sdais typeiso9660 - Mounting a partition 
/dev/sda3is typehfsplus - If detected as 
/dev/sr0it is typeiso9660 - if detected as hard drive (usb) it is type 
hfsplus xorrisorequires-hfsplus -apm-block-size 2048to work on a bootable USB (Hybrid setup) (default ongrub-mkrescue)- Avoid rEFInd (fork of rEFIt from macOS)
 - Avoid EFI editors like efibootmgr, bcfg and kesboot (mess motherboard’s NVRAM and EFI)
 EFI/BOOTshould be under/and not under/boot(xorriso)- Recommended size of 
/bootand ESP: https://www.rodsbooks.com/efi-bootloaders/principles.html vfatvsfat32vsfatfor ESP partition: https://uefi.org/specifications- Volume ID should be in capital letters according to ISO 9660 (
GLAUCUS) (ECMA-119 demands ASCII characters out ofA-Z0-9_) - Suse removed bios support from iso
 - Do not further compress the 
isowithzstdif thefsis already compressed by EROFS or SquashFS - After mounting overlay all previous mounts need to be moved using 
mount --moveto identical mountpoints inside the overlay, otherwiseswitch_rootwill error out withfailed to unlinkanddirectory not empty - ISOs should be hybrid; can be written directly to CD/DVD/BD media OR to USB sticks
 - Distributions with good ISOs include Arch and eweOS
 - Distributions with not so great ISOs include Chimera and Void
 - Do not forget to generate the 
initramfsbefore generating theiso - Do not forget to have 
dashinstalled before generating theinitramfs - Let the kernel use the defaults for its command-line parameters (e.g. 
loglevelandro/rw) fakerootcan be used instead ofsudofor generating images, managing mounts andmake installs forDESTDIRs that require root
Software
Section titled “Software”cdrtools(includesmkisofs)libburnia(includeslibisoburn,xorrisoandcdrskin)mkisofs(part ofcdrtools, people switched toxorriso, license?)xorrecord(emulation ofcdrecordbyxorriso)xorrisofs(emulation ofmkisofsbyxorriso)
Excluded
Section titled “Excluded”cdrdao(GUI)cdrecord(deprecated version ofcdrtools)cdrkit(deprecated fork ofcdrtools, Mr. Schilling says it sucks, filled with bugs and license concerns)cdw(GUI)dvd+rw-tools(deprecated, akagrowisofs, does not deal with CDs)genisofsgenisoimage(deprecated, fork ofmkisofs, fromcdrkit)wodim(deprecated, fork ofcdrecord, fromcdrkit)
ISO 9660 Extensions (relax limitations)
Section titled “ISO 9660 Extensions (relax limitations)”- Apple ISO 9660 Extensions (file characteristics specific to the classic Mac OS and macOS, such as resource forks, file backup date and more)
 - El Torito (enables CDs to be bootable)
 - Joliet (Unicode, allowing non-Latin scripts to be used)
 - Rock Ridge (Unix-style permissions and longer names)
 
Booster
Section titled “Booster”- Does not support live environments
 e1000provides internet access inside QEMU, and has been added to the default booster configuration- After install, booster should be rerun to generate a native non-universal build
 
- Do not use 
--disable-shim-lockto disableshim_lockas it would render the iso not bootable when Secure Boot is enabled - Arch images do not support Secure Boot; disable Secure Boot to boot the install medium, and if desired, it can be set up after install
 - you can’t use more than 300k files on an ISO, which is why we have to disable 
hfspluswhen creating ISO:-hfsplus off(This does not work with xorriso in grub-mkrescue) -renables Rock Ridge and changes file ownership to0; usingsudowithout-rdoes not change file ownershipgrub-mkrescuerunsxorriso:
xorriso \  -as mkisofs \  -graft-points \  --modification-date=2024053120334500 \  -b boot/grub/i386-pc/eltorito.img \  -no-emul-boot \  -boot-load-size 4 \  -boot-info-table \  --grub2 \  -boot-info \  --grub2-mbr /usr/lib/grub/i386-pc/boot_hybrid.img \  -hfsplus -apm-block-size 2048 \  -hfsplus-file-creator-type chrp tbxj /System/Library/CoreServices/.disk_label \  -hfs-bless-by i /System/Library/CoreServices/boot.efi \  --efi-boot efi.img \  -efi-boot-part \  --efi-boot-image \  --protective-msdos-label \  -o glaucus.iso \  -r /tmp/grub.yu5TLx \  --sort-weight 0 / \  --sort-weight 1 \  /boot iso $APPENDED_OPTIONS- Previous 
grub-mkrescuecommand to generate glaucus iso 
# `-boot-info-table` can only be used when an argument is passed with `-b`# `-R` is enabled by default by `xorrisofs`# `-pad` is enabled by default by `xorrisofs`# `-cache-inodes` is a relic from `genisoimage`, ignored by `xorriso`# `-hfsplus off` does not work with `grub-mkrescue`# `-no-hfs` does not work with `grub-mkrescue`# `-d`, `-omit-period` violates iso9660# `-N`, `-omit-version-number` violates iso9660# `-max-iso9660-filenames` violates iso9660# `-relaxed-filenames` violates iso9660# `-allow-lowercase` violates iso9660
grub-mkrescue \  --compress=no \  --fonts="" \  --locales="" \  --themes="" \  -v \  --core-compress=none \  -o glaucus.iso \  --product-name glaucus \  --product-version glaucus \  $1 \  -A glaucus \  -iso-level 3 \  -J \  -joliet-long \  -l \  -pad \  -publisher glaucus \  -p glaucus \  -R \  -r \  -V GLAUCUS \  -vv- The number before last in the table structure is an outdated backup method and should not be used (kept 0)
 - The last number in the table is the File System Check Order: (second digit).  
0means that fsck will not check the filesystem. Numbers higher than this represent the check order. The root filesystem should be set to1and other partitions set to2. - Consider the following fstab for EROFS/overlayfs:
 
/iso/fs /media/fs-ro erofs   defaults,loop                                                                        0 0overlay /            overlay defaults,lowerdir=/media/fs-ro,upperdir=/media/fs-rw/upper,workdir=/media/fs-rw/work 0 0OverlayFS (rw)
Section titled “OverlayFS (rw)”- lower should be ro
 - upper and work should be rw in a tmpfs space like 
/runand not in something like/media(cdrom can be kept in/mediathough) switch_rootis responsible for movingproc,devandsysto the new root
Alpine
Section titled “Alpine”- Uses 
grubforefiandisolinuxforbios - SquashFS inside 
bootcalledmodloopis mounted on/.modloopusing/dev/loop0 tmpfsmounted on/forrw- Installs packages in 
apksdirectory 
systemd-bootforefiandisolinuxforbios
- no rootfs; either the initramfs is being used directly or packages are being extracted at boot time?
 - requires at least 2 GB of RAM to boot to extract all the packages
 - ram on / type tmpfs
 - base install packages in pkgs
 
perladds 83M to the iso if provided
References
Section titled “References”- Mr. Jörg Schilling (GOAT of cd tools, died 2021)
 - https://codeberg.org/emmett1/mkinitrd
 - https://en.m.wikipedia.org/wiki/Comparison_of_disc_image_software
 - https://fedoraproject.org/wiki/LiveOS_image
 - https://gitea.artixlinux.org/artix/iso-profiles
 - https://github.com/archlinux/archiso
 - https://github.com/chimera-linux/chimera-live
 - https://github.com/coreos/bootengine
 - https://github.com/dslm4515/mlfs-linux-live
 - https://github.com/eudaldgr/kiss-live/blob/master/kiss-live
 - https://github.com/eudaldgr/kiss-live/blob/master/kiss-live#L197
 - https://github.com/garybgenett/gary-os
 - https://github.com/hanh-linux/gen-initramfs/wiki/Explanation-of-how-initramfs-mounts-the-ISO
 - https://github.com/KeithDHedger/LFSBootCD
 - https://github.com/kiss-community/kiss-live
 - https://github.com/laurent85v/archuseriso
 - https://github.com/MX-Linux/build-iso-mx
 - https://github.com/oasislinux/oasis/issues/11
 - https://github.com/Tomas-M/linux-live
 - https://github.com/venomlinux/mkinitramfs
 - https://github.com/void-linux/void-mklive/blob/master/mklive.sh
 - https://hacktivis.me/articles/bootstrap-initrd
 - https://landley.net/writing/rootfs-programming.html
 - https://linux-live.org/
 - https://notabug.org/arsv/minibase-artix
 - https://roscopeco.com/2013/08/12/creating-a-bootable-hard-disk-image-with-grub2/
 - https://superuser.com/questions/130955/how-to-install-grub-into-an-img-file
 - https://unix.stackexchange.com/questions/224277/is-it-better-to-use-cat-dd-pv-or-another-procedure-to-copy-a-cd-dvd/224314#224314
 - https://unix.stackexchange.com/questions/364262/freeing-initramfs-ram-after-switching-root-when-using-overlayfs
 - https://wiki.archlinux.org/title/Optical_disc_drive
 - https://wiki.archlinux.org/title/USB_flash_installation_medium
 - https://www.linuxfromscratch.org/hints/downloads/files/boot-cd_easy.txt
 - https://www.linux.org.ru/forum/linux-install/10720020
 - https://www.linuxquestions.org/questions/linux-from-scratch-13/create-an-iso-from-lfs-build-4175703319/
 - https://www.phenix.bnl.gov/~purschke/RescueCD/
 - https://www.vidarholen.net/contents/blog/?p=479