To format a CDRW or DVD media (blank media) on a Linux system, you can use the cdrecord
command.
Before formatting the media, you need to make sure that the CD/DVD burner is properly configured and the necessary drivers are installed. You can check the status of your CD/DVD burner by running the following command:
cdrecord -scanbus
This will list all the CD/DVD burners detected on your system.
To format the media, you can use the following command:
cdrecord -v blank=fast
This will quickly format the media, overwriting any existing data on the disc.
Alternatively, you can use the growisofs
command to format the media. For example, to format a DVD+R media, you can use the following command:
growisofs -Z /dev/cdrom=blank.iso
This will create a blank ISO image on the media, effectively formatting it.
Note: The exact device name (e.g., /dev/cdrom) may vary depending on your system configuration. You can use the dmesg
command to check the device name of your CD/DVD burner.