Skip to content
myousaf64Public

About

Custom OS image builds - Custom Debian-based bootable ISO from scratch

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom OS image builds

Scripts that build a custom bootable Debian ISO from scratch.

Technical details

42 Abu Dhabi project: 42debian.

A project to create a custom Debian-based ISO from scratch, including a chroot environment, compressed filesystem, and bootable disk image.

Overview

This guide outlines the process to build a custom Debian-based live CD. The key steps are:

  1. Create a chroot environment and install required packages.
  2. Compress the chroot filesystem into a single file.
  3. Configure a disk image with the bootloader (isolinux), kernel, and compressed filesystem.
  4. Generate and test the bootable ISO.

Warning

Ensure you bind /dev to the chroot (not just devpts). Otherwise, grub-probe will fail, preventing installation completion. Replace /path/to/chroot/dev with your actual chroot path.

Prerequisites

Install the necessary tools to start the process:

sudo apt-get install syslinux squashfs-tools genisoimage

Then, run the prerequisite setup script:

chmod +x prerequisites.sh && sudo ./prerequisites.sh

Note

After the script completes, unbind the /dev mount from the chroot to avoid issues:

sudo umount /path/to/chroot/dev

Creating the ISO

Set up the chroot environment: Install your desired packages within the chroot. Compress the filesystem: Use squashfs-tools to create a compressed filesystem image. Configure the disk image: Set up the bootloader (isolinux), kernel, and include the compressed filesystem. Generate the ISO: Use genisoimage to create the final bootable ISO. Test the ISO: Burn the ISO to a CD or test it in a virtual machine.

Resources:

How to Create a Custom Debian-Based ISO - Guide using xorriso, unsquashfs, and fakeroot for ISO configuration. Ubuntu LiveCD Customization - Persistent data setup. AskUbuntu: Create a LiveCD Distribution ISO - Community-driven guide. GitHub: mvallim/live-custom-ubuntu-from-scratch - Example project for Ubuntu-based live CD. GitHub: mvallim - Contributor profile. GitHub: kgilmer - Additional contributor profile. How to Create a Custom Ubuntu Live from Scratch - Detailed Ubuntu-based guide. Debian Installer Build - Official Debian documentation. Linux From Scratch - Comprehensive resource for building custom Linux systems. Reddit: How to Make Your Own Linux Distro - Community discussion. Reddit: doc_willis - Contributor profile. Google Search: Make a Custom Linux Distro - Additional references. Resources:

https://help.ubuntu.com/community/LiveCDCustomizationFromScratch#Persistent_Data https://askubuntu.com/questions/1259144/create-a-livecd-distrobution-iso-from-scratch https://github.com/mvallim/live-custom-ubuntu-from-scratch https://github.com/mvallim?tab=overview&from=2023-12-01&to=2023-12-31 https://github.com/kgilmer https://itnext.io/how-to-create-a-custom-ubuntu-live-from-scratch-dd3b3f213f81 https://wiki.debian.org/DebianInstaller/Build https://www.reddit.com/user/doc_willis/ https://www.linuxfromscratch.org/ https://www.reddit.com/r/linuxquestions/comments/11ww1rz/how_to_make_my_own_linux_distro/ https://www.google.com/search?q=make+a+custom+linux+distro&oq=make+a+custom+linux+distro&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCDYwNzZqMGo0qAIAsAIA&sourceid=chrome&ie=UTF-8

About

Custom OS image builds - Custom Debian-based bootable ISO from scratch

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages