mkisofs creates ISO 9660 file system images, typically for generating CD and DVD images.
First, let’s install mkisofs:
sudo apt install mkisofs
Create a mount point:
mkdir /mnt/usb_drive
sudo mount /dev/sdb1 /mnt/usb_drive
sudo mkisofs -o myisofile.iso -R -J -input-charset utf-8 /mnt/usb_drive/
returns:
Total translation table size: 0 Total rockridge attributes bytes: 3852 Total directory bytes: 123456 Path table size(bytes): 141 Max brk space used 26000 1312794 extents written (999 MB)
NOTE:
isoinfo -d -i myisofile.iso
returns:
CD-ROM is in ISO 9660 format System id: LINUX Volume id: CDROM ... Volume set size is: 1 Volume set sequence number is: 1 Logical block size is: 2048 Volume size is: 123456 Joliet with UCS level 3 found Rock Ridge signatures version 1 found
NOTE: The resulting output confirms that the myisofile.iso file is in the ISO 9660 format.