Ключевые слова:dvd, iso_image, freebsd, (найти похожие документы)
From: Gaqzi <gaqzi at linux dot se>
Newsgroups: http://ezUnix.org
Date: Mon, 23 Feb 2004 14:31:37 +0000 (UTC)
Subject: Запись DVD под FreeBSD [eng]
Оригинал: http://ezunix.org/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=79&page=1
Multimedia: DVD Burning with FreeBSD.
* Introduction.
As you all probably know it's pretty cheap with DVD burners these
days. With the capacity of the medium I came to the conclusion
that I would benefit from having the ability to backup my data
with a DVD burner instead of a CD burner, so I went out and bought
one.
With my new Nec DVD -/+ burner I started the trip to be able to
burn in my favourite OS.
As I soon found out I couldn't simply burn through burncd when it
came to DVD's as I did with ordinary CDR's.
* The HowTo.
Some looking around I noticed that I would have to go through the
ATAPI/CAM driver to be able to burn my DVDs. In our nice handbook
it's written that we need to have these in our kernels to be able
to use ATAPI/CAM.
device atapicam
device scbus
device cd
device pass
and
device ata
device atapicd
which the last two for the most part is in the kernel
configuration file.
When this have been added we'll compile the kernel, install it and
reboot. (If you don't know how to recompile your kernel it's
documented in chapter nine in the handbook.)
Now when the compilation is over and we're back in let's look if
the cd device have been found.
$ dmesg | grep cd
acd0: DVD-R <_NEC DVD_RW ND-1300A> at ata0-slave PIO4
cd0 at ata0 bus 0 target 1 lun 0
cd0: <_NEC DVD_RW ND-1300A 1.06> Removable CD-ROM SCSI-0 device
cd0: 16.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
Nice, nice, it found my NEC burner. :)
Now when we know all up to this seem to work let's install
dvd+rw-tools.
Though don't let the name fool you, it burns the dash (-) format
aswell. (Which I have due to economical reasons ;) )
It's located in /usr/ports/sysutils/dvd+rw-tools/ so lets go there
and compile/install it.
# cd /usr/ports/sysutils/dvd+rw-tools/ && make install clean distclean
<magic dance of compilation..>
So, now when this is done let's compile cdrtools where the burning
program we're going to use later on is.
# cd /usr/ports/sysutils/cdrtools/ && make install
<magic dance of compilation..>
Now when all programs we need are compiled and installed lets
begin the creation of an ISO filesystem and file to burn later on.
"growisofs was originally designed as a frontend to mkisofs to facilitate
appending of data to ISO9660 volumes residing on random-access media such as
DVD+RW, DVD-RAM, plain files, hard disk partitions."
With other words, the interesting stuff mkisofs take care of.
For a vanilla ISO9660 we do this: (Remember that you can only save
files with 8.3 chars file length, eight chars for the file name
and three for the filetype).
# mkisofs -o cd.iso cd_dir
For an ISO9660 DVD with Joliet we do this: (Supports up to 31
chars in filename, most likely will only work on Windows).
# mkisofs -o cd.iso -J cd_dir
For an ISO9660 DVD with Joliet and Rock Ridge extension: (As I've
understood this -J (Joliet) makes the DVD able to use filenames
with up to 31 chars length, -r (Rock Ridge) do it for the *NIX
systems. -l do so the disc actually use 31 character filenames).
# mkisofs -o cd.iso -J -r -l cd_dir
mkisofs have alot of other options that are documented in it's
man-page, mkisofs(8) Though here are some which are worth
mentioning,
-V <volume-label>
-v verbose mode
-R Rock Ridge but it saves the file system owner of a file.
Now when we have an ISO file to burn lets begin with the burning.
(Burn baby!) <bt> We're burning through growisofs, -dvd-compat
mode, which means that the DVD writes with maximal compatability
mode for DVD-ROM/-VIDEO for -R/+R it means that it closes the DVD
after burning,
-Z to direct the program to which device we're burning through and
=<path to image file>.
The device we're going to burn through is the one we got from
dmesg earlier, cd0 for instance. -speed=<speed to burn in> a
pretty nice option if your burner and DVD's handles more than 1x
in burning speed.
# growisofs -dvd-compat -speed=4 -Z /dev/cd0=image.iso
Ofcourse you dont have to create an ISO file/image to be able to
burn, we could just have passed the directory and other options to
growisofs, as you probably remember growisofs is a frontend to
mkisofs.
# growisofs -Z /dev/cd0 -r -J -speed=4 /folder/to/
Executing 'builtin_dd if=image.iso of=/dev/pass0 obs=32k seek=0'
16154624/3688857600 ( 0.4%) @3.4x, remaining 22:44
26902528/3688857600 ( 0.7%) @2.3x, remaining 20:25
...
Now if all went well we've gotten a new DVD disc with content.
Everything worked well for me the first time and I hope everything
went as well for you. :)
Sources:
http://aegee-valletta.org/handbook/creating-cds.htmlhttp://fy.chalmers.se/~appro/linux/DVD+RW/
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/creating-cds.html
MAN pages for:
growisofs (1)
mkisofs (8)