ISO Creation and Testing
ISO Creation and Testing
In this milestone, we invoke xorriso to generate the bootable hybrid ISO image and launch it inside a QEMU virtualized test harness.
Step 1: Generating the Hybrid ISO Image
Execute xorriso from the workspace root:
$ cd "$BYOL_ROOT"
$ xorriso -as mkisofs \
-iso-level 3 \
-full-iso9660-filenames \
-volid "BYOL_LIVE" \
-appid "BYOL Linux Live OS" \
-publisher "K19G" \
-eltorito-boot boot/grub/bios.img \
-eltorito-catalog boot/grub/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
--grub2-boot-info \
-eltorito-alt-boot \
-e EFI/boot/efiboot.img \
-no-emul-boot \
-isohybrid-gpt-basdat \
-output "$BYOL_ROOT/byol-1.0-x86_64.iso" \
iso-staging/Check the size and file metadata:
$ ls -lh "$BYOL_ROOT/byol-1.0-x86_64.iso"
-rw-r--r-- 1 builder builder 84M Oct 29 12:00 byol-1.0-x86_64.isoIn under 100 megabytes, you have assembled an entire self-contained, bootable operating system!
Step 2: Testing under QEMU (BIOS Mode)
Launch the ISO in a virtual machine using QEMU with KVM acceleration:
$ qemu-system-x86_64 \
-enable-kvm \
-m 2G \
-smp 2 \
-cdrom "$BYOL_ROOT/byol-1.0-x86_64.iso" \
-boot d \
-serial stdioYou should see: 1. The GRUB boot menu appear. 2. The kernel decompress and initialize memory. 3. The initramfs locate the BYOL_LIVE media. 4. OverlayFS mount in RAM. 5. switch_root execute cleanly into /sbin/init. 6. The login prompt appear: text ========================================== Welcome to BYOL Linux 1.0 (Rolling) ========================================== byol-box login: root # uname -a Linux byol-box 6.10.2-byol-capstone #1 SMP PREEMPT x86_64 Linux
Step 3: Testing under UEFI Mode with OVMF
To verify UEFI boot compliance, test with Tianocore OVMF firmware:
$ qemu-system-x86_64 \
-enable-kvm \
-m 2G \
-bios /usr/share/ovmf/OVMF.fd \
-cdrom "$BYOL_ROOT/byol-1.0-x86_64.iso" \
-boot dConfirm that the system boots directly via the EFI System Partition without warnings.