CD/DVD/BD writing

Kernel
Configure the kernel to support the filesystems necessary for reading and writing ISO disks.

Emerge
Follow the CDROM page for hardware driver kernel configuration, along with including UDF write support.

Install the or  packages, for writing CD/DVD/BD media:

Or:

For UDF writing, ensure included the above mentioned UDF kernel drivers and the following package:

Best practice is to use read write (RW/RE) media for testing writing ISO9660/UDF filesystem images. If a command fails to work, or the hardware or media fails, you can try again.

Usage
Usage for the ISO9660/UDF filesystem.

Determine the size of media
First, find the maximum size the media can contain.

Or 24438784*2KB = 48877568 KB for 50GB BD-R DL (Blu-ray dual layer) media.

Or you can use the following with disabling defect management:

Create and populate filesystem
Create either a ISO9660 or a UDF filesystem. Microsoft Windows uses lvid for optical media title:

Mount the filesystem:

Populate filesystem:

Verify proper permissions are preserved:

CD-RW media
CD-RW media requires the packet device driver and starting the service and the following line within fstab:

DVD/Blu-ray (RW/RE) media
DVD-RW, DVD+RW, and Blu-ray Recordable Erasable (BD-RE) media can be easily written by simply mounting the media and writing to the media as a normal filesystem, as these devices and media allow random writing, versus CD-RW only allowing sequential writing.

UDF
For writing, modifying, removing files from UDF filesystem mounted DVD and Bluray media, users only need to use the common cp and rm tools. (This is tested using my LG WH16NS60 bluray drive with DVD+RW media, after formating the disc using Microsoft Windows 10.)

Linux kernel requirements, compile without pktcdvd or blacklist the module for avoiding conflicts, include the usual SCSI related drivers for your optical drive and enable the UDF fileystem driver. Verify and/or recompile, reboot as needed.

Insert a blank DVD/BD rewritable disc:

(FIXME: The option "--media-type" might not be required, and possibly auto detected.)

Mount the filesystem:

From here, the user should have the ability of reading/writing/modifying the UDF filesystem mounted disc.

Verify your write operations:

If needed, monitor /var/log/messages for mounting/write operations.

If drive operations are excessively slow or delayed, use "dvd+rw-format -lead-out" for improving disc compatibility. Read dvd+rw-format author/maintainer's website notes. Also if possible, specifying the booktype via dvd+rw-booktype may help but is untested here as of writing this.

BD defect management
By default uses defect management which requires 256MB extra space and uses reduced write speeds. This may be disabled via:

And use the following after writing to ensure files are properly written:

UDF
Atypically, you can write with the following as long as you are within the limits of your DVD/BD media's size limitations:

If you have used the above truncate with 25GB/50GB, specifying the top limits of BD media, you will need to disable Defect Management requiring 256MB extra space: