Next Previous Contents

4. Kanontas compile ston pyrhna

4.1 Ka8arisma kai ejartwmena arxeia

Otan teleiwsei h doyleia toy script ry8misewn, sas leei epishs na make dep ( = dhmioyrgeiste tis ejarthseis) kai (pi8ana) clean ( = ka8ariste). Epomenws, dwste make dep. Ayto 8a epibebaiwsei pws ola ta ejartwmena arxeia, opws px ta include, briskontai sth 8esh toys. Ayth h doyleia den pairnei polu xrono, ektos an o H/Y sas einai arketa argos. Gia palioteres ekdoseis toy pyrhna, otan teleiwsete prepei na dwsete kai make clean. Ayto sbhnei ola ta object arxeia kai merika alla pragmata, poy oi palioteres ekdoseis afhnoyn pisw toys. Se opoiadhpote periptwsh, mhn jexnate ayto to bhma prin prospa8hsete na kanete compile enan pyrhna.

4.2 Diarkeia toy compile

Meta to depend kai to clean, twra mporeite na dwsete make bzImage, h make bzdisk. (Ayto einai to meros ths ergasias poy pairnei ton perissotero xrono.) To make bzImage kanei compile ton pyrhna, kai afhnei ena arxeio sto directory arch/i386/boot, me to onoma (metaju allwn) bzImage. Aytos einai o neos pyrhnas, se sympiesmenh morfh. To make bzdisk kanei ta idia pragmata, alla epishs grafei to kainourgio bzImage se mia disketa, thn opoia ypo8etw pws exete topo8ethsei sth monada "A:". To bzdisk einai arketa eykoloxeiristo, gia dokimes newn pyrhnwn. An ta kanei 8alassa (h apla den doylecei swsta), apla bgalte th disketa kai epanekkinhste me ton palio pyrhna sas. Mporei epishs n' apotelesei enan eukolo tropo na bootarete, an apo la8os sbhsete ton palio sas pyrhna (h kanete kati ej isoy fobero). Mporeite epishs na to xrhsimopoihsete gia nees egkatastaseis, otan apla metaferete ta periexomena enos sklhrou s' enan allon. ("Ol' ayta kai perissotera akomh! Posa 8a plhrwnate TWRA gi' ayta;")

Oloi oi (akomh kai me orismenh paradoxh) prosfatoi pyrhnes einai sympiesmenoi, ek ou kai to bz mprosta sta onomata. Enas sympiesmenos pyrhnas aytomata aposympiezetai, otan ekteleitai.

Se palioteroys pyrhnes, den yparxei epilogh na ftiajete bzImage. To onoma htan apla zImage. Pros to paron, h epilogh gia asympiesto pyrhna ejakoloy8ei na yparxei, wstoso, me to mege8os poy exoyn oi neoi pyrhnes, einai sxedon ypoxrewtiko na ton ftiajete sympiesmeno.

4.3 Alla arxeia tupoy "make"

To make mrproper kanei pio ektetameno clean, to opoio merikes fores einai aparaithto. Mporei na 8elete na to kanete meta apo ka8e mpalwma (patch). To make mrproper 8a sbhsei kai to arxeio twn ry8misewn sas, ara isws prepei na kanete ena backup antigrafo toy (.config), an deite pws kati tetoio sas einai xrhsimo.

To make oldconfig 8a prospa8hsei na ry8misei ton pyrhna apo ena palio arxeio ry8misewn. 8a diatrejei th diadikasia make config. An den exete janakanei compile kapoion pyrhna, h den exete kapoio palio arxeio ry8misewn, tote pi8anotata den prepei na kanete kati tetoio, ka8ws pi8anotata 8a 8elhsete n' allajete thn default ru8mish.

Diabaste thn enothta gia ta modules, gia perigrafh toy make modules.

4.4 Egkatastash toy pyrhna

Afou apokthsete enan neo pyrhna, poy fainetai na doyleuei opws sas aresei, einai wra na ton egkatasthsete. Oi perissoteroi xrhstes xrhsimopoioun to LILO (Linux Loader) gia th doyleia ayth. To make bzlilo 8a egkatasthsei ton pyrhna, 8a trejei to LILO, 8a sas etoimasei na bootarete, ALLA MONON ean to lilo exei ry8mistei ston H/Y sas me ton akoloy8o tropo : o pyrhnas einai o /vmlinuz, to lilo brisketai sto /sbin, kai to arxeio ry8misewn toy lilo (/etc/lilo.conf) symfwnei me ola ayta.

Diaforetika, prepei na xrhsimopoihsete to LILO katey8eian. Einai sxetika eukolo programma na to egkatasthsete kai na doylecete m' ayto, alla exei mia tash na mperdeuei toys an8rwpoys me to arxeio ry8misewn toy. Koitajte ayto to arxeio ry8misewn (/etc/lilo/config gia palioteres ekdoseis toy Linux, /etc/lilo.conf stis nees ekdoseis), kai deite pws einai grammeno. Prepei na moiazei kapws etsi :

    image = /vmlinuz
    label = Linux
    root = /dev/hda1
    ...

H parametros image = deixnei ton egkatesthmeno pyrhna, kai oi perissoteroi xrhstes grafoyn /vmlinuz. H label ( = etiketa) xrhsimopoieitai apo to lilo gia na katalabei me poion pyrhna h me poio LS 8a bootarei, kai to root einai to antistoixo toy directory / gia to sygkekrimeno LS. Parte ena backup toy paliou sas pyrhna kai antigracte sto swsto meros to bzImage poy molis ftiajate. (Prepei na dwsete cp bzImage /vmlinuz, an xrhsimopoieite ton /vmlinuz). Meta, janatrejte to lilo. Se newteres ekdoseis apla dinete lilo, alla se palioteres prepei na kanete /etc/lilo/install (egkatastash), h akomh kai /etc/lilo/lilo -C /etc/lilo/config (ru8mish).

An 8elete na ma8ete perissotera gia tis ry8miseis toy LILO, h den exete to LILO, breite thn pio prosfath ekdosh toy apo ton agaphmeno sas ftp server, kai akoloy8eiste tis odhgies ths.

Gia na bootarete apo ton sklhro disko m' enan apo toys palious pyrhnes sas (pragma poy einai enas tropos na diasw8eite, an ta kanete 8alassa me ton neo pyrhna), antigracte sto telos toy arxeioy tis grammes katw apo (kai mazi me) to image = xxx poy briskontai sto arxeio ry8misewn toy LILO, kai allajte to image = xxx se image = yyy, opoy yyy einai to plhres onoma path toy arxeioy, sto opoio kanate backup ton palio sas pyrhna. Meta, allajte thn label = zzz se label = linux-backup kai janatrejte to lilo. Mporei na xreiastei na balete mia grammh sto arxeio ry8misewn, poy na leei delay=x, opoy x einai mia timh se dekata toy deyteroleptoy, poy leei sto LILO poso na perimenei prin to bootarisma, wste na mporeite na to diakocete (px patwntas to plhktro shift), kai na dwsete thn label (etiketa) toy backup arxeioy (se periptwsh poy symboun dysaresta pragmata).


Next Previous Contents