Iso building: Difference between revisions

From Mintarc Forge
Line 54: Line 54:
*hdt.c32 Hardware Detection Tool (lists CPU, RAM, PCI devices).
*hdt.c32 Hardware Detection Tool (lists CPU, RAM, PCI devices).
*pci.ids Database of PCI hardware identifiers used by hdt.c32.
*pci.ids Database of PCI hardware identifiers used by hdt.c32.
Boot Process Flow
#BIOS Loads isolinux.bin: The El Torito boot sector points to isolinux.bin, which initializes the bootloader[^3^][^7^].
#Read isolinux.cfg: Defines boot entries (e.g., "Live Session" or "Install") and kernel parameters[^2^][^6^].
#Load Modules:
##vesamenu.c32 renders graphical menus[^7^].
##hdt.c32 provides hardware diagnostics[^7^].
#Launch Kernel:Specified by KERNEL directives in isolinux.cfg (e.g., /boot/vmlinuz)[^3^][^6^].

Revision as of 13:04, 9 April 2025

ISO Building

When you get ready to compile the ISO ensure you pay attention to these things

Install and confifgure the rootfs

You need to prep the rootfs so that you can compile it this means you wan to configure it and install software that you will use in the ISO.

sudo mount --bind /dev /paths to your/chroot_folder/dev 
sudo mount --bind /proc /paths to your/chroot_folder/proc 
sudo mount --bind /sys /paths to your/chroot_folder/sys 
sudo mount -t devpts devpts /paths to your/chroot_folder/dev/pts

When building an ISO from a chroot folder, you need to bind certain system directories (/dev, /proc, /sys, and /dev/pts) to the chroot environment before installing software. This is because these directories provide essential system-level interfaces that allow the chroot environment to function as if it were a complete operating system. Here's why each mount is necessary:

  1. /dev: This directory contains device files that represent hardware devices (e.g., disks, terminals). Binding /dev ensures that the chroot environment has access to these device files, which are often required during package installation or configuration processes.
  2. /proc: The /proc directory is a virtual filesystem that provides information about system processes and hardware. Many installation scripts and tools rely on data from /proc for system configuration.
  3. /sys: Similar to /proc, /sys is a virtual filesystem that provides information about the kernel and hardware devices. Binding /sys allows software inside the chroot to interact with the kernel as needed.
  4. /dev/pts: This is required for pseudo-terminal devices (used by terminal emulators). Without binding this directory, terminal-based tools may fail to work properly inside the chroot environment.

These bindings ensure that the chroot environment behaves like a regular system, allowing software installations and configurations to proceed smoothly. Once these directories are mounted, you can install packages or make other modifications within the chroot environment as part of your ISO-building process

Once those mounts are in place then go into the rootfs and install al the software you need and make all the configurations you prefer.

Setting up ISOLinux boot loader

ISOLINUX is a specialized bootloader from the Syslinux suite designed for booting Linux systems from ISO 9660 filesystems (CDs/DVDs) and El Torito-compliant media.

  • ISO 9660/El Torito Support: Boots directly from CDs/DVDs without requiring floppy emulation in "no emulation" mode, ensuring compatibility with modern BIOS/UEFI systems.
  • Hybrid ISO Capability:Generates ISOs that can be written to both CDs and USB drives (via embedded MBR), simplifying cross-media booting.
  • Lightweight Design: Minimalist footprint, ideal for live CDs and installation media (e.g., Ubuntu/Debian installers).
  • Customizable Boot Menus: Configurable via isolinux.cfg with options for text/graphical menus, kernel parameters, and multi-boot entries.

The reason we use this is because of legacy hardware, it is not meant for UEFI booting, we include it in Peppermint a as a bootloader primarily for BIOS-based booting of optical media (CDs/DVDs) and legacy compatibility

Files used for our configs are

Core Bootloader Files:

  • isolinux.bin Bootloader binary for BIOS systems. Required for El Torito bootable CDs.
  • isolinux.cfg Configuration file defining boot menu entries, kernel paths, and parameters.
  • boot.cat Boot catalog file generated by mkisofs to list bootable images.

Menu System Files

  • vesamenu.c32 Graphical menu module for VESA-compatible splash screens.
  • menu.cfg Menu configuration (often included by isolinux.cfg for modularity).
  • stdmenu.cfg Standard menu template (optional).
  • recovery.cfg Menu entries for recovery/rescue modes.
  • live.cfg Configuration for live session boot options.
  • utilities.cfg Tools menu (e.g., memory tests, hardware diagnostics).

Compatibility Modules:

  • libcom32.c32 Core library for COM32 modules (required for advanced features).
  • libmenu.c32 Menu-handling library.
  • libutil.c32 Utility functions (e.g., file parsing).
  • ldlinux.c32 Loader for SYSLINUX extensions.

Hardware Utilities:

  • hdt.c32 Hardware Detection Tool (lists CPU, RAM, PCI devices).
  • pci.ids Database of PCI hardware identifiers used by hdt.c32.

Boot Process Flow

  1. BIOS Loads isolinux.bin: The El Torito boot sector points to isolinux.bin, which initializes the bootloader[^3^][^7^].
  2. Read isolinux.cfg: Defines boot entries (e.g., "Live Session" or "Install") and kernel parameters[^2^][^6^].
  3. Load Modules:
    1. vesamenu.c32 renders graphical menus[^7^].
    2. hdt.c32 provides hardware diagnostics[^7^].
  4. Launch Kernel:Specified by KERNEL directives in isolinux.cfg (e.g., /boot/vmlinuz)[^3^][^6^].