Sie sind auf Seite 1von 22

≡ ME NU

nixCraft
Linux and Unix tutorials for new and seasoned sysadmin.

Linux Formatting a CDRW / DVD Media ( blank media )


Commands
by V IV E K GITE on JULY 10, 2007 las t updat ed MA Y 29, 2008
in CE NTOS , DE B IA N / UB UNTU, FILE S Y S TE M, LINUX, TROUB LE S HOOTING, UB UNTU LINUX

Q. How do I blank / format my CDRW / DVD media under Linux using a


shell prompt?

A. You can use wodim (cdrecord) to record data or audio Compact Discs
on an Orange Book CD-Recorder or to write DVD media on a DVD-
Recorder

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Task: Find out device name
Find find out your CDRW drive name by entering following command:

$ cdrecord -scanbus

or

$ wodim -scanbus

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Output:

scsibus1:
1,0,0 100) 'TSSTcorp' 'CD/DVDW SH-S182D' 'SB04' Removable CD-ROM
1,1,0 101) *
1,2,0 102) *
1,3,0 103) *
1,4,0 104) *
1,5,0 105) *
1,6,0 106) *
1,7,0 107) *

Note that 1,0,0 is the device name you need to use.

Task: Formatting a cd rw on Linux


Insert CD and enter following command to format CDRW (note for formatting DVD use
dvd+rw-format command, see below):

$ cdrecord blank=fast dev=1,0,0

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
OR

$ sudo cdrecord blank=fast dev=1,0,0

Above command will blank a CD-RW and exit or blank a CD-RW before writing. The blanking
type is fast, but it may be one of the following:

all : Blank the entire disk. This may take a long time.
fast: Minimally blank the disk. This results in erasing the PMA, the TOC and the pregap.
track Blank a track.
unreserve Unreserve a reserved track.
trtail Blank the tail of a track.
unclose Unclose last session.
session Blank the last session.

Task: Formatting a dvd rw on Linux


Use dvd+rw-format command to formats dvd disk in the specified dvd drive such as /dev/dvd:

$ dvd+rw-format -force /dev/dvd

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
OR

$ sudo dvd+rw-format -force /dev/dvd

Task: Using GUI tool – k3b


k3b is a CD/DVD burning tool. It can format CD/DVD RW. First install k3b:

$ sudo apt-get install k3b

Start k3b from menus or just type

$ k3b &

Now click on Tools menu > Erase CDRW to format CDRW


OR
Now click on Tools menu > Format DVD to format DVD

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
See also:
Howto: Linux write bur data to DVD or DVD/RW

Updated for accuracy!

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Twitter Facebook Google+ Download PDF version Found an error/typo on this page?

More like this:


Howto: Linux command line utilities for removing blank lines from text…
How to Create Bootable Linux CD
Linux burn ISO images to Cds and CD-RWs howto
Linux: How Do I Burn ISO Images To CD-Rs and CD-RWs with cdrecord?
Linux / UNIX: Find Volume Information From CDs and ISO Images
Howto: Linux formatting floppy and zip disk and create filesystem
Formatting usb pen in Linux
Ubuntu Linux format USB pen drive
HowTo Format Date For Display or Use In a Shell Script
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
sed Tip: Delete All Blank White Spaces

{ 13 comments… add one }

gm November 28, 2008, 3:16 am

Thanks for the guide

RE P LY LINK

Sarah January 24, 2009, 10:22 pm

Thanks, this was helpful.

RE P LY LINK

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Reiska February 19, 2009, 12:32 pm

Thanks for the tip!

RE P LY LINK

varun February 26, 2009, 8:40 am

thanks but could u tell, which filesystem it uses to format dvd??

RE P LY LINK

spiralofhope July 16, 2009, 7:55 am

Thanks, this was useful because I made a coaster when I was forced to reboot my system
during a write. graveman wasn’t dealing with the leftover CDRW well, but the blanking worked
as-expected at the commandline. Then I could write my ISO as usual.

No more obnoxious nonfunctional disks now.. yay!

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
RE P LY LINK

RonCam August 11, 2009, 1:14 pm

02.26.09 at 8:40 am
thanks but could u tell, which filesystem it uses to format dvd??

Yes, a second request for an answer to varun’s question!

Specifically, please tell us the Command Line syntax to select which UDF version will be used,
plus the syntax to make sure the -RW disc is formatted as MRW (Mount Rainier) compatible.

RE P LY LINK

RonCam August 11, 2009, 1:28 pm

Ouch, I see no button to edit the previous post, so:

I think the answer may be different for CD-RWs and DVD±RWs. Please give the syntax for the
above requests, for both kinds of disc? Thanks!
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
RE P LY LINK

nixCraft August 11, 2009, 5:25 pm

@varun / RonCam,

cdrecord – Format cd-rw


dvd+rw-format – Format dvd-rw
mkisofs – Create an hybrid ISO9660/JOLIET/HFS filesystem with optional Rock Ridge
attributes. The -dvd-video option passed to mkisofs to generate DVD-Video compliant UDF
file system. The -UDF option passed to mkisofs include UDF support in the generated
filesystem image.

To create a vanilla ISO-9660 filesystem image in the file cd.iso, where the directory /path/to/dir
will become the root directory if the CD, call:

mkisofs -o /tmp/cd.iso /path/to/dir

To write DVD, use growisofs:

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
growisofs -Z /dev/dvd=/tmp/cd.iso

To create a CD with Rock Ridge extensions of the source directory cd_dir:

mkisofs -o cd.iso -R cd_dir

To create a HFS hybrid CD with the Joliet and Rock Ridge extensions of the source directory
cd_dir:

mkisofs -o cd.iso -R -J -hfs cd_dir

To create a HFS hybrid CD from the source directory cd_dir that contains Netatalk Apple/Unix
files:

mkisofs -o cd.iso --netatalk cd_dir

HTH.

RE P LY LINK

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
RonCam August 12, 2009, 2:31 pm

Thanks to Vivek Gite for the informative reply on how to apply the attributes to CDs and DVDs.
I have learned something here!

:-) It will be most appreciated if you could now do the same, for Mount Rainier formatting.

Here’s hoping the somewhat unusual syntax for embedding references works — the preview
function is absent!!

RE P LY LINK

Pierre September 6, 2011, 8:54 am

Thanks, very helpful…

RE P LY LINK

Paul Sheridan October 11, 2013, 4:14 am

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
This article is still very helpful – just used K3b for the first time today for a quick format, and
impressed. :)

RE P LY LINK

Samuel Peters October 27, 2013, 6:18 am

Thanks! You saved me a lot of time trying to find formatting software on an online store!

RE P LY LINK

Reedych June 20, 2015, 1:41 pm

thanks!

RE P LY LINK

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Leave a Comment

Name

Email

Comment

Submit

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Tagged with: cdrecord, cdrecord command, dvd+rw-format command, format cd/dvd linux, format cdrw linux,
format dvd rw linux, formatting a media using linux, how linux formats cd, k3b, kde, linux force dvd format, linux
format cd

Next FAQ: Patch and Update Redhat Enterprise Linux / CentOS 5 server
Previous FAQ: Linux Rescan HP Smart Array For New Disks

Adve rtise He re

To search, type and hit enter

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
This is an ad ↓
Bitbucket is the Git solution Learn More
for professional teams.
Collaborate on code in the
cloud or on your servers.

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Adve rtise He re

F EA TURED A RTICLES :

30 Cool Open Source Software I Discovered in 2013

30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X

Top 30 Nmap Command Examples For Sys/Network Admins

25 PHP Security Best Practices For Sys Admins

20 Linux System Monitoring Tools Every SysAdmin Should Know

20 Linux Server Hardening Security Tips

Linux: 20 Iptables Examples For New SysAdmins

Top 20 OpenSSH Server Best Security Practices

Top 20 Nginx WebServer Best Security Practices

20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors

15 Greatest Open Source Terminal Applications Of 2012

My 10 UNIX Command Line Mistakes


open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Top 10 Open Source Web-Based Project Management Software

Top 5 Email Client For Linux, Mac OS X, and Windows Users

The Novice Guide To Buying A Linux Laptop

Linux burn ISO


images to Cds and
CD-RWs howto

Download Opensuse
Linux 11 CD / DVD
ISO Images

dstat: Monitoring
Linux Systems
Performance – B...

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Linux lsscsi: See List
Of All SCSI / SATA
Hard ...

Download CentOS 6
CD / DVD ISO

Linux Copy all the


files including
subdirectori...

Top 5 Linux DVD RIP


Software

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Linux Command:
Show Mounted Hard

D ON’ T M ISS A NY L INUX TIPS

Get nixCraft in your inbox. It's free:

Your email address

Subscribe

F OLLOW US

nixCraft

Follow +1

+ 246,568

nixCraft
Like Page 106K likes

Be the first of your friends to like this

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Follow @nixcraft

©2000-2016 nixCraft. All rights reserved. Privacy - Terms of Service - Questions or Comments

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com

Das könnte Ihnen auch gefallen