Rocky 9.x Generating ISO from Directories and Subdirectories
From Notes_Wiki
Home > Rocky Linux or CentOS > Rocky Linux 9.x > System Administration > File system management > Rocky 9.x Generating ISO from Directories and Subdirectories
How to Create an ISO File from a Directory
Step 1: Install genisoimage (if not installed)
On Ubuntu/Debian
sudo apt update sudo apt install genisoimage
On RHEL/CentOS/Rocky Linux
sudo yum install genisoimage
Step 2: Prepare Directories (Including Subdirectories) You Want to Convert to ISO
mkdir iso_source_data cp -r /path/to/your/files/* /iso_source_data
Step 3: Convert Directory into ISO File
genisoimage -o Output.iso -V LABEL -r -J /full/path/to/iso_source_data
Options Explained:
-o Output.iso
: Specifies the output ISO file name-V LABEL
: Sets the volume label of the ISO-r
: Keeps Rock Ridge extensions for Unix compatibility (safe to include even if you're primarily using it on Windows)-J
: Enables Joliet extensions for Windows compatibility, allowing long filenames and Unicodeiso_source_data
: Directory which we want to convert to ISO format
Step 4: Check What's Inside the ISO
Option 1: List Files in the ISO (No Mounting Needed)
isoinfo -i Output.iso -l
Option 2: Mount the ISO to Look Inside
mkdir /mnt/iso sudo mount -o loop Output.iso /mnt/iso ls /mnt/iso
Step 5: Now Move or Use the ISO File
- Burn it to a CD/DVD using tools like Brasero, K3b, or cdrecord
- Use it in a virtual machine (e.g., VirtualBox, VMware, Proxmox)
- Upload it to cloud services for deployment or storage
Home > Rocky Linux or CentOS > Rocky Linux 9.x > System Administration > File system management > Rocky 9.x Generating ISO from Directories and Subdirectories