Next Previous Contents

3. "Ean streceis ton eayto soy pros ton kapno, den 8a stamathsw na to diaskedazw oso 8a kaigesai."

(O Aytokratoras Nerwnas gia to kacimo twn klassikwn toy CDs [AD64]. To eixe parejhghsei entelws).

Synh8ws h eggrafh enos CD katw apo Linux ginetai se 2 bhmata:

Einai epishs dynato na syndyasete ta 2 bhmata mesw diaswlhnwshs (pipe) alla sas apo8arrunoyme apo to na to dokimasete giati den einai ajiopisto. Deite parakatw.

3.1 Ka8oriste se pia genikh syskeyh scsi (scsi device) einai proskollhmenos o eggrafeas

[Shmeiwste : to trexon sxhma onomatologias twn syskeywn scsi devices sto Linux einai polu mplegmeno xwris logo kai oxi kai arketa ajiopisto. To gegonos pws to perigrafw se megalh leptomereia, den 8a prepei na eklhf8ei la8os san apodoxh aytou toy sxhmatos. Oi an8rwpoi me ATAPI cd-writer mporoun na dokimasoyn thn "cdrecord -scanbus" gia na entopisoyn thn swsth syskeyh kai na paraleicoyn to ypoloipo aytou toy tmhmatos.]

Afou akoloy8hsete ola ta bhmata toy deuteroy kefalaioy to susthma sas 8a prepei na einai ikano na antimetwpizei th diadikasia ths eggrafhs twn CDs. Ayto to tmhma mporei na xrhsimopoih8ei ws apodeijh pws ola doyleuoyn kata pws prepei.

Dwste thn entolh dmesg. 8a prepei na anaferei ta mhnumata toy pyrhna toy Linux, symperilambanomenwn kai ekeinwn poy typw8hkan kata thn ekkinhsh (periorismos: mono ta teleytaia l200) kai na periexei kapoies plhrofories gia to CD-Writer poy einai syndedemeno sto diaylo SCSI.

Aplo paradeigma:

  Vendor: YAMAHA  Model: CDR100       Rev: 1.11
  Type:   WORM                        ANSI SCSI revision: 02
Detected scsi CD-ROM sr1 at scsi0, channel 0, id 3, lun 0

H mhxanh ayth exei 4 syskeyes SCSI syndedemenes panw ths (den mporeite na to deite kai etsi sas to lew egw), me taytothtes (SCSI-id) apo 0 ews 3. O eggrafeas einai h 4h fysika parousa syskeyh SCSI kai gi' ayto einai syndedemenh sto /dev/sgd (h tetarth genikh syskeyh SCSI,opoy h metrhsh arxizei apo to gramma a). Se ayth thn periptwsh, h entolh:

cdwrite  --eject  --device /dev/sgd

anoigei ton ypodoxea (tray) kai einai enas elegxos gia to an ola exoyn egkatasta8ei swsta. Ena pio sun8eto paradeigma:

scsi0 : AdvanSys SCSI 1.5: ISA (240 CDB)
scsi1 : Adaptec 1542
scsi : 2 hosts.

  Vendor: HP      Model: C4324/C4325  Rev: 1.20
  Type:   CD-ROM                      ANSI SCSI revision: 02
Detected scsi CD-ROM sr0 at scsi0, channel 0, id 2, lun 0

  Vendor: IBM     Model: DPES-31080   Rev: S31Q
  Type:   Direct-Access               ANSI SCSI revision: 02
Detected scsi disk sda at scsi1, channel 0, id 0, lun 0

scsi : detected 1 SCSI cdrom 1 SCSI disk total.
SCSI device sda: hdwr sector= 512 bytes.

Se ayto to paradeigma dyo elegktes SCSI filojenoun apo 1 syskeyh SCSI o ka8enas. Ti spatalh ((mia poy mporoun na filojenoun mexri kai 7 syskeyes o ka8enas). Den einai h dikia moy egkatastash, opote stamathste na rwtate an exw toso polla lefta. ... Telos pantwn, sthn periptwsh aytou toy amelhteoy aytou paradeigmatos, h egkatastash ayth einai mia xara. :-)

Sto parapanw paradeigma to CD-Writer exei taytothta SCSI 2 alla einai sysxetismeno me thn prwth genikh syskeyh SCSI /dev/sga giati den einai h prwth fysika parousa syskeyh SCSI poy to Linux entopise. Elpizw pws ayto deixnei ka8ara pws h taytothta SCSI mias syskeyhs, den exei na kanei me thn antistoixh genikh syskeyh.

Dyo erwthseis menoyn: ti symbainei an antistoixisete la8os syskeyh; An de deijei oute thn epilogh "--<MANUFACTURER>" oute gracei dedomena se aythn, synh8ws ena typwnetai proeidopoihtiko mhnyma kai den symbainei kai tipota kako::

bash> cdwrite  --eject  --device /dev/sgb
Unknown CD-Writer; if this model is compatible with any
supported type, please use the appropriate command line
flag.

Manufacturer:  IBM
Model:         DPES-31080
Revision:      S31Q

Se aythn thn periptwsh h syskeyh /dev/sbg einai enas sklhros diskos SCSI (ths IBM).

An gracete dedomena se la8os syskeyh, grafete panw apo to arxiko periexomeno ths kai pi8anws blaptete anepanor8wta to susthma sas. Na prosexete, se mena to atuxhma exei symbei.

3.2 Mazecte to logismiko

Synh8ws pairnei perissotero apo to anamenomeno. 8ymh8eite pws arxeia poy sas leipoyn den mporoun na proste8oun afou graftei to CD. :-)

Epishs, krathste pws kapoio pososto toy eleu8eroy xwroy toy CD xrhsimopoieitai gia na fylajei tis plhrofories toy systhmatos arxeiwn iso9660 (synh8ws liga MB).

3.3 Apo8hkeysh twn dedomenwn sto CD.

O oros iso9660 anaferetai sto format me to opoio ta dedomena organwnontai sto CD. Gia na eimai pio akribhs: Einai to susthma arxeiwn toy CD.

Fysika, h emfanish twn arxeiwn poy apo8hkeuontai se ayto to format omogenopoieitai apo ton pyrhna toy Linux opws kai gia ka8e allo susthma arxeiwn, epishs. Etsi, an prosarthsete ena CD sto dentro twn directory, den 8a mporeite na jexwrisete ta arxeia toy apo alla arxeia ... ektos toy gegonotos pws den einai eggracima... akoma kai gia ton root. :-)

(O mhxanismos poy xrhsimopoieitai gia na omogenopoihsei thn emfanish twn arxeiwn kaleitai eikoniko susthma arxeiwn (virtual filesystem), kai en syntomia VFS.)

Ta xarakthristika toy systhmatos arxeiwn iso9660 den einai toso plousia se sugkrish me ayta toy systhmatos arxeiwn extended-2 poy kanonika xrhsimopoieitai apo to Linux. Apo thn allh, to CD einai eggracimo mono mia fora kai etsi merika xarakthristika den exoyn nohma etsi ki alliws. Oi periorismoi toy systhmatos arxeiwn iso9660 einai:

3.4 Dhmioyrghste ena susthma arxeiwn iso9660

Prin mporesei na xrhsimopoih8ei opoiodhpote meso apo8hkeyshs (p.x. malakos diskos (floppy disk), sklhros diskos (harddisk) h CD), prepei na apokthsei ena susthma arxeiwn (se glwssa DOS : na ginei format). Ayto to susthma arxeiwn einai ypeu8yno gia thn organwsh kai enswmatwsh twn arxeiwn, poy prepei na apo8hkey8oun sto meso.

Loipon, ena eggracimo CD einai eggracimo mono mia fora, kai etsi an grafame ena adeio susthma arxeiwn se ayto, den 8a ginotan format - alla 8a paremene entelws adeio gia panta. :-)

Etsi, ayto poy xreiazomaste einai ena ergaleio poy dhmioyrgei to susthma arxeiwn oso antigrafei ta arxeia sto CD. Ayto to ergaleio legetai mkisofs. Mia xrhsh toy gia logoys epideijhs moiazei me thn parakatw:

mkisofs  -r   -o cd_image   private_collection/
              `---------'   `-----------------'
                   |               |
     grace thn ejodo sto    xrhsimopoihse san eisodo to directory

H epilogh '-r' 8etei ta dikaiwmata olwn twn arxeiwn sto CD wste na einai anagnwsima apo oloys kai energopoiei tis epektaseis Rock Ridge. Ayto einai poy synh8ws 8eloyme kai synistoume thn xrhsh ayths ths epiloghs mexri poy pragmatika na jerete ti kanete (ypodeijh: xwris thn '-r' to shmeio prosarthshs (mount-point) pairnei dikaiwmata idiwtikhs_sylloghs (private_collection)!).

An trexete pyrhna Linux prin ton 2.0.31, 8a prepei na pros8esete thn epilogh '-K' gia na jeperasete ena la8os toy kwdika toy systhmatos arxeiwn. 8a xreiasteite thn dior8wmenh ekdosh toy mkisofs. Ayth h epilogh einai isodunamh me thn epilogh '-P' toy cdwrite. Deite parakalw th selida boh8eias toy mkisofs gia leptomereies. Oi xrhstes mias pio prosfaths ekdoshs toy Linux den xreiazetai na anhsyxoun gia tipota apo ta parapanw.

To mkisofs 8a prospa8hsei na antistoixisei ola ta onomata arxeiwn sto 8.3-format poy xrhsimopoieitai apo to DOS gia na ejasfalisei thn megaluterh dynath symbatothta. Se periptwsh sugkroyshs onomatologias ((diaforetika arxeia exoyn to idio 8.3-name), xrhsimopoiountai ari8moi sta onomata arxeiwn kai plhrofories sxetika me to onoma typwnetai sto STDERR (synh8ws sthn o8onh).

MHN PANIKOBALLESTE:

Katw apo Linux de 8a deite pote ayta ta 8.3 onomata arxeiwn, epeidh to Linux kanei xrhsh twn epektasewn Rock Ridge poy periexoyn thn arxikh plhroforia twn arxeiwn (dikaiwmata, onoma arxeiwn, klp.).

Twra mporei na anarwtieste giati h ejodos toy mkisofs de stelnetai apey8eias sth syskeyh eggrafhs. Ayto ginetai gia duo logoys:

Epeidh o xronismos toy CD-writer einai ena krisimo shmeio, den to trofodotoume apey8eias apo to mkisofs (8ymh8eite pws to Linux den einai ena leitoyrgiko susthma pragmatikou xronoy (real-time operating system) kai oi diergasies mporei na xronizontai asxhma). Anti8eta, synistatai na apo8hkeuete thn ejodo toy mkisofs se ena jexwristo arxeio sto sklhro disko. Ayto to arxeio einai mia 1:1 eikona toy CD kai sthn oysia 8a graftei sto CD me to ergaleio cdwrite se deutero bhma.

H 1:1 eikona apo8hkeuetai se ena terastio arxeio kai etsi xreiazeste allo toso eleu8ero xwro sto disko me ayton poy to logismiko pros antigrafh hdh xrhsimopoiei. Ayto einai ena meionekthma.

8a mporousate na dhmioyrghsete mia epipleon katatmhsh (partition) gia ayto kai na gracete thn eikona se ekeinh thn katatmhsh anti se ena arxeio. Yhfizw kata mias tetoias strathgikhs giati an gracete se la8os katatmhsh (ejaitias enos typografikou la8oys), mporei na xasete entelws to Linux susthma sas. Epipleon, einai megaluterh spatalh xwroy, giati to CD-image einai proswrina dedomena poy mporoun na diagrafoun meta thn eggrafh toy CD.

3.5 Elegjte to CD-image

To Linux exei thn dynatothta na prosarta arxeia san na htan katatmhseis diskwn. Ayto to xarakthristiko einai xrhsimo gia na elegjete thn or8othta ths domhs toy katalogoy ths eikonas toy CD (CD-image). Gia na prosarthsete to arxeio cd_image poy dhmioyrgh8hke parapanw ston katalogo /cdrom, dwste thn entolh

mount -t iso9660 -o ro,loop=/dev/loop0 cd_image /cdrom

Twra mporeite na epi8ewrhsete ta arxeia sto /cdrom - emfanizontai akribws opws an 8a htan panw se ena pragmatiko CD. Gia na apodesmeusete to CD-image, apla peite umount /cdrom. Proeidopoihsh: An den xrhsimopoihsate thn epilogh '-K' sto mkisofs tote to teleytaia arxeio sto /cdrom mporei na mhn einai plhrws anagnwsimo.

Shmeiwsh:

Merikes arxaies ekdoseis toy mount den einai ikanes na antimetwpisoyn tis loopback-devices. An exete mia tetoia palia ekdosh toy mount einai mia ypodeijh gia na anaba8misete to Linux susthma sas.

Polloi an8rwpoi hdh proteinan na baloyn plhrofories gia to pws na parete tis neoteres efarmoges mount se ayto to mini-HOWTO. Panta arnoumai. An h dianomh Linux sas erxetai me ena arxaio mount: anaferete to san problhma (bug). An h dianomh Linux sas den einai eukola anaba8misimh : anaferete to san problhma (bug).

An enswmatwsw oles tis plhrofories poy apaitountai gia na jeperastoun ta problhmata (bugs) twn kakosxediasmenwn dianomwn Linux, ayto to mini-HOWTO 8a htan kata polu megalutero kai dyskolotero na diabastei.

3.6 Sxolia gia ta kena diskakia CD-Recordable

To germaniko periodiko gia ypologistes "c't" exei mia lista ypodeijewn poy aforoun sta kena CDs sto teuxos toy Noembrioy 1996:

3.7 Eggrafh toy CD-image se ena CD

Den exoyn meinei kai polla na ginoyn. Prin sas deijoyme thn teleytaia entolh, afhste me na sas proeidopoihsw pws ta CD-writers 8eloyn na trofodotountai me mia sta8erh roh dedomenwn epeidh exoyn mikrous buffers dedomenwn. Etsi, h diadikasia ths eggrafhs ths eikonas toy CD sto CD den prepei na diakopei, se tetoia periptwsh to apotelesma 8a einai ena diabrwmeno (xalasmeno) CD.

Gia na eisaste sigoyros pws tipota den 8a diakocei thn diadikasia, petajte ejw oloys toys xrhstes toy systhmatos kai bgalte to kalwdio toy ethernet ... Diabaste to Bastard operator fromhell gia na ma8ete ton swsto tropo, gia na kanete kati tetoio. ;-)

An eisaste pneymatika etoimoi, foreste mia asprh rompa, pollaplasiaste thn taytothta SCSI-id toy CD-writer me ton ari8mo ana8ewrhshs toy SCSI, anacte osa pio polla keria ginetai, apaggeilete duo strofes apo to ASR-FAQ kai telika gracte:

cdwrite  --device /dev/sgd  cd_image
or
cdrecord -v speed=2 dev=4,0 cd_image

analoga me to pio logismiko 8elete na xrhsimopoihsete. Fysika 8a antikatasthsete th syskeyh SCSI toy paradeigmatos me thn syskeyh poy o eggrafeas sas einai syndedemenos. Parakalw shmeiwste pws kanenas eggrafeas den mporei na epana8esei to laser toy kai na synexisei apo ekeino to shmeio toy CD, an enoxlh8ei. Gi' ayto, ka8e isxyrh donhsh h kai sok 8a katastrecei pantelws to CD poy grafete.

3.8 An kati paei straba...

... na 8ymaste pws panta mporeite na xrhsimopoieite ta xalasmena CDs san soyber. :-)


Next Previous Contents