There are times when we need to burn CDs/DVDs from the command line. In my case, I wanted to update the BIOS of a Dell laptop but Windows was not installed and the entire disk was occupied by FreeBSD, so installing Windows was impossible. There is a project called WinPE that consists of a Windows LiveCD. My first idea was to burn a USB and boot from it, but the PC was too old and did not support it. Therefore, the only option left was to burn a DVD-RW from the command line since the installed FreeBSD acts as a server and has no graphical interface.
The first step is to find the DVD drive:
cdrecord -scanbus
1,0,0 100) 'HL-DT-ST' 'DVD+-RW GS20N ' 'A106' Removable CD-ROM
Proceed with the burning process by indicating the unit ID and the ISO image:
cdrecord dev=1,0,0 /home/kr0m/WinPE10_8_Sergei_Strelec_x86_x64_2021.07.21_English.iso
As you can see, it is that simple to burn a CD/DVD in FreeBSD.