Protestirujte eto. Ispol'zujte opciyu -dummy dlya vypolneniya holostogo zapuska cdrecord. Delajte vse, chto hotite delat' i posmotrite, vyzhivet li process zapisi.
Esli vy puskaete cdrecord pryamo iz mkisofs, togda intensivnye diskovye processy, takie kak
obnovlenie locale-bazy dannyh ponizhayut maksimal'nuyu skorost' obrabotki i mogut povredit' CD.
Vy luchshe prover'te takie processy v cron
, at
ili anacron
, na to vremya v
kotoroe VY sozdaete CD-ROM.
Fragmentaciya - obychno nastol'ko nizkaya, chto ne otrazhaetsya. Odnako, Vy mozhete prosto sozdat' patalogicheskie sluchai fragmentacii, kotorye ponizhayut proizvoditel'nost' vashego diska do 100kb/s. Ne delajte tak. :-)
Da, fajly na diske fragmentirovalis' na diske v techenie dvuh let. Fajlovaya sistema bystraya i polnaya. Vsegda ostvlyajte 10 ili 20 procentov svobodnogo prostranstva, i vy dolzhny podhodit' s uvazheniem k zapisi CD-R.
Esli vy neuverenny, rassmotrite soobshcheniya, pri zagruzke, procent ot fragmentacii soobshchaetsya pri proverke fajlovyh sistem. Vy mozhete proverit' etu velichinu opasnoj komandoj
bash> e2fsck -n /dev/sda5 # '-n' obyazatel'no
[stuff deleted - ignore any errors]
/dev/sda5: 73/12288 files (12.3% non-contiguous)
V etom primere fragmentaciya, kazhetsya, ochen' vysokaya - no tol'ko 73 ochen' malen'kih fajla na etoj
fajlovoj sisteme (ispol'zuemye v /tmp
) tak chto velichina - NE signal trevogi.
Sushchestvuet eksperimental'naya utilita nazyvaemaya e2defrag dlya defragmentacii extended-2 fajlovoj sistemy. Tekushchaya versiya poka eshche ne rabotaet nadezhno, dazhe dlya lichnogo ispol'zovaniya. Esli Vy dejstvitel'no hotite defragmentirovat' Vashu fajlovuyu sistemu, sozdajte rezervnuyu kopiyu (luchshe dve kopii), popraktikujtes' vosstanavlivat' dannye, zatem sozdajte novuyu fajlovuyu sistemu (s unichtozheniem staroj) i vosstanovite dannye s kopii. V neskol'kih slovah, eto na dannyj moment naibolee bezopasnyj sposob.
Da. Edinstvennaya fajlovaya sistema, kotoraya ne nadezhna i ne dostatochno bystra dlya zapisi - setevaya fajlovaya sistema (NFS).
YA sam ispol'zuyu UMSDOS, chtoby sovmestno ispol'zovat' diskovoe prostranstvo mezhdu Linux i DOS/Win na PC (486/66), special'no dlya zapisi CD.
Da. Vy mozhete pomeshchat' lyubuyu fajlovuyu sistemu na CD. No drugie operacionnye sistemy ne smogut rabotat' s etim CD.
Privoditsya recept:
dd if=/dev/zero of="empty_file" bs=1024k count=650
bash> /sbin/mke2fs empty_file
empty_file is not a block special device.
Proceed anyway? (y,n) y
mount -t ext2 -o loop=/dev/loop1 empty_file /mnt
cdwrite
ili cdrecord
dlya empty_file (kotoryj bol'she ne pustoj)
kak budto eto obraz iso9660.Esli Vy hotite sdelat' zapis' v /etc/fstab
dlya takogo CD, otklyuchite ego proverku, naprimer:
/dev/cdrom /cdrom ext2 defaults,ro 0 0
Pervyj 0 podrazumevaet "ne vklyuchat' v dampy", vtoroj (vazhnyj) podrazumevaet "ne proveryat' oshibki pri zapuske" (fsck ne v sostoyanii proveryat' CD na oshibki).
Dlya etogo est' neskol'ko programmnyh paketov. Odin iz novejshih, "cdparanoya", mozhet byt' zagruzhen s:
http://www.mit.edu/afs/sipb/user/xiphmont/cdparanoia/index.html
Ili Vy mozhete poprobovat' kombinaciyu "cdda2wav" i "sox", dostupnye na sunsite, i ego zerkalah:
ftp://sunsite.unc.edu/pub/Linux/apps/sound/cdrom/cdda2wav0.71.src.tar.gzftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/sox-11gamma-cb3.tar.gz
cdda2wav
pozvolit Vam poluchat' ukazannyj interval (ili celyj trek) s vashego
zvukovogo CD i preobrazovat' ego v a . wav-fajl. sox
preobrazovyvaet wav-fajly obratno v cdda-format
(Audio-CD), t.o. oni mogut byt' zapisany na CD-R, ispol'zuya cdrecord
. Vam ne obyazatel'no nuzhen "sox",
esli Vy ispol'zuete poslednyuyu versiyu cdrecord, potomu chto v nego vstroena podderzhka dlya
.au i .wav fajlov.
Fajl drivers/scsi/scsi.c
soderzhit informaciyu
/*
* Ispol'zovanie: echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi
* S " 0 1 2 3 " zamenennym na vash "Id Lun glavnogo kanala".
* Rassmatrivajte eto svojstvo kak BETA.
* PREDOSTEREZHENIE: |to ne dlya hotplugging periferii. Tak kak
* SCSI ne byl razrabotan dlya etogo, Vy mozhete povredit' vashu
* apparaturu!
* Odnako eto dopuskaetsya vklyuchat' dlya
* uzhe podsoedinennogo ustrojstva. |to, vozmozhno, ne
* garantiruet, chto ustrojstvo ne iskazit prodolzhayushchuyusya peredachu dannyh.
*/
V originale:
/*
* Usage: echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi
* with "0 1 2 3" replaced by your "Host Channel Id Lun".
* Consider this feature BETA.
* CAUTION: This is not for hotplugging your peripherals. As
* SCSI was not designed for this you could damage your
* hardware !
* However perhaps it is legal to switch on an
* already connected device. It is perhaps not
* guaranteed this device doesn't corrupt an ongoing data transfer.
*/
Pozhalujsta zamet'te, chto eto ispol'zuetsya, esli vy dobavlyaete SCSI-ustrojstva v konec cepi. Vstavka novyh SCSI ustrojstv v sushchestvuyushchuyu cep' narushaet imenovanie ustrojstv (katalog /dev) i mozhet polnost'yu razrushit' soderzhimoe vashego zhestkogo diska.
Da. No Vy dolzhny znat', chto lyubye oshibki pri chtenii originala (iz-za pyli ili carapin) privedut k defektnoj kopii.
Pervyj sluchaj: u Vas CD-writer i otdel'nyj privod CD-ROM. Vydavaya komandu
cdrecord -v dev=0,6,0 speed=2 -isosize /dev/scd0
Vy chitaete potok dannyh iz privoda CD-ROM, prisoedinennogo kak /dev/scd0
i zapisyvaete ego
neposredstvenno na CD-R.
Vtoroj sluchaj: u Vas net otdel'nogo privoda CD-ROM. V etom sluchae Vy dolzhny ispol'zovat' ustrojstvo zapisi, chtoby schitat' CD-ROM:
dd if=/dev/scd0 of=cdimage
Esli Vy ispol'zuete poslednyuyu versiyu cdrecord, togda ispol'zujte instrument pod nazvaniem "readcd"
(sushchestvuyushchij v misc/). Obe komandy ekvivalentny po dejstviyu mkisofs
,
tak chto Vy dolzhny prodolzhat' kak opisano v glave 3.
Pozhalujsta obratite vnimanie, chto etot metod ne primenim dlya zvukovyh CD! Vy dolzhny ispol'zovat' cdrdao ili cdda2wav
dlya audio CD.
Da. Novye yadra (2.0.36 i do 2.2) imeyut vstroennuyu podderzhku joliet formata. Zapomnite, chto Vy dolzhny ispol'zovat' obe opcii v vashem /etc/fstab: klyuchevoe slovo iso9660 i joliet, dlya bol'shih podrobnostej sm. http://www-plateau.cs.berkeley.edu/people/chaffee/joliet.html.
Tochno tak, kak Vy delaete s obychnymi privodami CD-ROM. Nikakih hitrostej. Obratite vnimanie, chto Vy dolzhny ispol'zovat' scd-ustrojstva (SCSI CD-ROM) chtoby montirovat' CD dlya chteniya, analogichno esli u Vas ATAPI CD-ROM (pomnite vy konfigurirovali vashi ATAPI-ustrojstva kak SCSI). Primernaya zapis' v /etc/fstab:
/dev/scd0 /cdrom iso9660 ro,user,noauto 0 0
Ispol'zujte bzip2
vmesto lyubogo kompressora, podobnogo gzip
ili pkzip
.
|to sohranit do 30% diskovogo prostranstva dlya bol'shih (>100kb) fajlov. Vy mozhete zagruzit' ego s:
http://www.muraroa.demon.co.uk/
Vmesto zapisi istinnogo audio CD, Vy mozhete skonvertirovat' vashi wav-fajly v mp3-audio fajly i pomestit' ih na ISO-9660 fajlovuyu sistemu kak obychnye fajly. Obychno MPEG III daet kompressiyu 1:10. Konechno, bol'shinstvo CD proigryvatelej ne sposobny chitat' fajly... eto nedostatok. S drugoj storony, pochemu ne igrat' muzyku na sleduyushchej vecherinke s zhestkogo diska? 18Gbajt hvatit na 3000-4000 naimenovanij. :-)
Programmnyj MPEG III kodirovshchik dostupen po
http://www.stud.ifi.uio.no/~larsi/other/8hz-mp3-cheng.tar.gz
MPEG III proigryvatel' dostupen po
http://homepages.uni-tuebingen.de/student/michael.hipp/mpg123/
Dlya zapisi golosa, vy mozhete poprobovat' umen'shit' razmer ispol'zuya shorten
ili "GSM lossy speech compression":
ftp://svr-ftp.eng.cam.ac.uk/pub/comp.speech/http://kbs.cs.tu-berlin.de/~jutta/toast.html
U Vas dolzhen byt' 1.44Mb zagruzochnaya disketa. Sozdajte tochnyj obraz diskety podav komandu:
dd if=/dev/fd0 of=boot.img bs=18k
Pomestite etot obraz v kataloge soderzhashchem kollekciyu Vashih fajlov (ili v podkataloge ee, kak Vam nravitsya). Skazhite mkisofs o etom fale ispol'zuya opciyu '-b' i eshche ispol'zujte '-c'. Dlya podrobnostej chitajte fajl README.eltorino v distributive mkisofs.
Interesnoe primenenie zagruzochnyh CD - virusobezopasnye DOS ili Windows sistemy. Oni sekonomyat Vam den'gi na zhestkom diske, (esli u Vas est' set' i Vy ispol'zuete samba dlya pomeshcheniya pol'zovatel'skih falov na fajl-servere). Odnako, eto chisto teoreticheski, t.k. nikto eshche mne ne soobshchal dejstvuyushchij recept.
Sushchestvuet overlay-filesystem imeyushchayasya dlya Linux, kotoraya montiruetsya na CD-ROM i perehvatyvaet vse operacii zapisi. Novye ili modificirovannye fajly pomeshchayutsya v drugom meste, no dlya pol'zovatelya CD-ROM vyglyadit modificirovannym. Dlya bol'shej informacii sm. http://home.att.net/~artnaseef/ovlfs/ovlfs.html.
Esli etogo Vam ne dostatochno: podozhdite podderzhki UDF-fajlovoj sistemy pod Linux ili pomogite ee razrabotke (sm. http://trylinux.com/projects/udf/).
Da. Odnako, testirovano poka tol'ko s dvumya ustrojstvami. Vam nuzhna odna iz poslednih versij yadra (2.2.10) ili patch yadra dlya bol'shego bufera SCSI-generic drajvera ( ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha; rabotaet do 2.2.5).
Nemeckij komp'yuternyj zhurnal "c't" izdal spisok podskazok otnositel'no chistyh CD v noyabre 1996:
Tol'ko glava 2 specifichna dlya Linux. Vy mozhete primenit' glavu 3 i 4 dazhe esli u Vas zapushchena operacionnaya sistema ne Linux semejstva. Pozhalujsta smotrite README.NetBSD, README.aix, README.hpux, README.next, README.solaris, README.sunos, README.vms or README.xxxBSD iz cdrecord-distributiva.
U Vas est' dva varianta. Libo Vy ispol'zuete vstroennyj konfiguracionnyj fajl dlya cdrecord, libo ispol'zuete shell-obolochku, kak pokazano nizhe. |tot shell-skript chitaet konfiguracionnyj fajl, kotoryj soderzhit opcii i parametry dlya cdrecord stroka za strokoj. Imena takie-zhe kak v komandnoj stroke, no bez nachal'nogo -. Kommentarii razresheny. Naprimer:
# be verbose
v
# set the speed of the writer
speed=2
# the device-coordinates in the form BUS,ID,LUN
dev=0,6,0
Konfiguracionnye fajly dlya obolochki prinadlezhat /etc/cdrecord i dolzhny ukazyvat'sya v komandnoj stroke. Primer: Esli Vy hotite ispol'zovat' konfiguraciyu /etc/cdrecord/mywriter.cfg, to Vy mozhete vydat' komandu "cdrecord.sh mywriter.cfg -audio track1...". Vse poslemywriter.cfg peredaetsya cdrecord
#! /bin/bash
CFGDIR="/etc/cdrecord"
CFG="$1"
shift
ARGS_LEFT="$@"
if [ ! -f "$CFGDIR/$CFG" ]
then
echo "Configuration file $CFGDIR/$CFG not found. Exiting."
exit 1
fi
while read LINE
do
case $LINE in
\#*|"") continue;;
esac
old_IFS="$IFS"
IFS="$IFS="
set -- $LINE
IFS="$old_IFS"
O_NAME="$1"
O_VALUE=""
while shift
do
case $1 in
"") continue;;
esac
O_VALUE="$1"
done
if [ -z "$O_VALUE" ]
then
O_CDRECORD="$O_CDRECORD -$O_NAME "
continue
fi
O_CDRECORD="$O_CDRECORD $O_NAME=$O_VALUE "
done < "$CFGDIR/$CFG"
set -x #DEBUG
exec cdrecord $O_CDRECORD $ARGS_LEFT
echo "Execution of cdrecord failed."
Gde-to za pervymi 32k na CD, blok s informaciej o pomeshchennom CD. Vy mozhete izvlech' informaciyu sleduyushchim skriptom:
#! /bin/bash
RD=/dev/cdrom
for i in 32768,7 32776,32 32808,32 32958,128 33086,128 33214,128 \
33342,128 33470,32 33581,16 33598,16 33615,16 33632,16
do
old_IFS="$IFS"
IFS=","
set -- $i
IFS="$old_IFS"
OFFSET=$1
LENGTH=$2
echo "*`dd if=$RD bs=1 skip=$OFFSET count=$LENGTH 2> /dev/null`#"
done
Kogda perezapisyvaetsya CD-RW nositel', ukazyvaetsya parametr blank=fast dlya cdrecord. |to vse. Sm. man-stranicu cdrecord dlya podrobnostej o etom parametre.
Prezhde vsego, obraz mul'ti-sessionnogo CD dolzhen byt' otformatirovan ispol'zuya ISO9660-fajlovuyu sistemu s RockRidge-rasshireniem. I Vy dolzhny ispol'zovat' cdrecord opciyu -multi poka hotite dobavlyat' sleduyushchie sessii. T.e. po krajnej mere dlya pervoj sessii, Vy dolzhny ispol'zovat' -multi.
Obrazy vtoroj i posleduyushchih sessij nemnogo slozhnee v sozdanii. mkisofs dolzhen znat' gde nachinaetsya svobodnoe prostranstvo na CD-R diske. |ta informaciya mozhet byt' poluchena ispol'zuya cdrecord opciyu -msinfo (sm. primer nizhe)
shell> NEXT_TRACK=`cdrecord -msinfo dev=0,6,0`
shell> echo $NEXT_TRACK
shell> mkisofs -R -o cd_image2 -C $NEXT_TRACK -M /dev/scd5
private_collection/ \
Dlya bol'shej informacii, pozhalujsta chitajte fajl README.multi, kotoryj rasprostranyaetsya s cdrecord.
Vsegda pomnite, chto Vy mozhete ispol'zovat' isporchennye CD-ROMy kak podstavki. :-)
Pozhalujsta prover'te snachala, chto ustrojstvo zapisi rabotaet s postavlyaemym programmnym obespecheniem (=pod drugoj operacionnoj sistemoj). A imenno:
Esli "ne rabotaet" dazhe pod drugimi operacionnymi sistemami - u Vas apparatnyj konflikt ili defektnye apparatnye sredstva. Esli rabotaet i Vy ispol'zovali loadlin dlya zagruzki Linux, togda eto mozhet byt' problema. Loadlin delaet "myagkuyu" zagruzku s inicializirovannoj apparaturoj, chto mozhet sbit' s tolku yadro Linux.
Pod Linux, nekotorye versii S-biblioteki nesovmestimy, t.o. prilozheniya sobrannye s odnoj versiej ne budut rabotat' s drugoj. Naprimer oshibki raboty predkompilirovanyh binarnikov sleduyushchie:
[root@Blue /dev]# cdrecord -eject dev=0,6,0
cdrecord: No such file or directory. No read access for 'dev=0,6,0'.
Probujte ispol'zovat' Linux. Ustanovka i konfiguraciya SCSI-DRAJVEROV dlya DOS - ad. Linux takzhe slozhen? Ha!
Naibolee veroyatno oshibki vyzvany
Pri razlichnyh obstoyatel'stvah SCSI ustrojstva otsoedinyayutsya i povtorno soedinyayutsya (elektricheski) ot SCSI shiny. Esli eto svojstvo ne dostupno (prover'te kontroller i parametry yadra), u nekotoryh ustrojstv zapisi voznikayut problemy pri vyzhiganiya ili fiksacii CD-R.
Osobenno v NCR 53c7,8xx SCSI drajvere eto svojstvo vyklyucheno po umolchaniyu, tak chto Vy prover'te ego snachala:
NCR53c7,8xx SCSI support [N/y/m/?] y
always negotiate synchronous transfers [N/y/?] (NEW) n
allow FAST-SCSI [10MHz] [N/y/?] (NEW) y
allow DISCONNECT [N/y/?] (NEW) y
Mnogochislennye blagodarnosti chitatelyam etogo HOWTO, kto aktivno vliyal na ego soderzhimoe.
pomogal uluchshil predstavlenie novogo yadra
Kak zapisat' audio-cd pryamo s mp3
podskazal o vyklyuchennom dis-/reconnect po umolchaniyu v ncr drajvere
horoshie argumenty, chtoby vybrosit' cdwrite iz etogo HOWTO
otmetil problemu v 4.9.
otmetil potrebnost' nedavnej versii montirovaniya, chtoby ispol'zovat' petlevoe ustrojstvo
podelilsya podskazkoj otnositel'no zapisi zvukovogo CD
ukazal na zaplatu yadra, dlya chteniya Joliet CD
informaciya i opyt otnositel'no zapisi zvukovogo CD
URL mkhybrid instrumenta
pomog v razrabotke recepta 1:1 kopii.
informaciya o IDE CD-R i novyh versiyah yadra
otmetil problemu s pre-inicializaciej writer-ov pri zagruzke s loadlin
informaciya otnositel'no cdrecord
dal informaciyu otnositel'no cdwrite- spiska rassylki
proveryal zapis' ext2 na CD-ROM (sm. 4.4)
podal ideyu kak pomestit' ne-iso9660 fajlovye sistemy v CD
predlozhil ispol'zovat' defektnye CD kak podstavki dlya napitkov
YA hochu poblagodarit' sleduyushchih lyudej za soobshcheniya o oshibkah pravopisaniya: Bartosz Maruszewski <B.Maruszewski@zsmeie.torun.pl>, Ian Stirling <ian@opus131.com>, Brian H. Toby.
Konec Linux CD-Writing mini-HOWTO (Vy mozhete prekratit' chitat' tut.)