Ukwenza ngokwezifiso i-RepairDisk: Umgwaqo oya e-LFS

Ziningi izikhathi lapho kuye kwadingeka silungise isistimu evela ku-LiveCD, futhi kwesinye isikhathi enkambisweni sizithole singenalo ithuluzi futhi lapho sifuna ukulifaka, i-LiveCD OS isitshela ukuthi isiphelelwe isikhala nogalikhi namanzi (ukubamba ubambe).

Le nkinga ifike kimi ngempela ngenxa yokungena kwi-LFS (I-LinuxFromScratch), okuyisiqondisi (HHAYI ukusatshalaliswa uqobo) ukufaka i-Linux yangokwezifiso. Iphuzu lalokhu "kusatshalaliswa" ukuthi kunoma iyiphi i-LiveCD, nangamathuluzi afanele, ulanda ikhodi ye-kernel namanye amathuluzi ukwakha uhlelo lwakho (uhlanganisa yonke into kancane). Uma ufuna ukulandela umhlahlandlela wesinyathelo ngesinyathelo, udinga amathuluzi amaningi nama-compilers, futhi ayikho i-liveCD enakho konke, ngakho-ke kufanele wenze ngokwezifiso eyodwa.

Asikwenze. Sizosebenzisa i- I-SystemRescueCD, Ehlinzeka ngemvelo esekwe ngokuphelele ye-Gentoo.

Esibonelweni sethu (ukufaka iLinux kusuka ekuqaleni kulandela incwadi yeLinux From Scratch) siphuthelwa yizinhlelo zeBison neMakeinfo, ngakho-ke sizokwakha isithombe esisha se-ISO sale disk kodwa ngamathuluzi amasha.

ISAZISO: I-Gentoo ukusatshalaliswa okuhlanganayo in situ wonke amaphakheji azofakwa, ngakho-ke inqubo yokwengeza nokuvuselela izinhlelo ihamba kancane.

Yize kusetshenziswa umphathi wephakeji (njengokutholwa kwe-Debian's apt-get), esikhundleni sokulanda amaphakheji, ikhodi yomthombo iyalandwa ukuyihlanganisa emshinini wakho.

Ngenqubo uzodinga ukwahlukaniswa kwe-Linux (i-ext4 ngokwesibonelo) okungenani okungu-1.5G mahhala, noma ngabe kunconywa okuningi. Uma ungafuni ukuphambana nokwahlukana kwakho, sebenzisa umshini obonakalayo. Vele kuyalulekwa ukuthi ukwahlukanisa kube nama-gigabyte amaningi kusukela ngesikhathi sokuhlanganiswa, ukufakwa, ukuvumelanisa kwamakhosombe ... isikhala sesikhashana siyadingeka; Ngeluleka ukusebenzisa ukwahlukaniswa kokushintshaniswa kwe-8G + 2G (nge-4G + 1G kufanele kube kwenele, kepha ngakho-ke siyaqinisekisa, uma i-RAM / swap ingekho inqubo izohamba kancane).

Uma ucabanga ukuthi udale umshini obonakalayo one-10G disk, uqala ngawo ngokuwutshela ukuthi uqalise ku-SystemRescueCd esanda kulandwa. Uma sesingaphakathi sihlukanisa nge-fdisk (uma usuqale iseshini yokuqhafaza ungayenza nge-gparted, kepha inhloso yalokhu okuthunyelwe ukufundisa ukusetshenziswa kwamathuluzi ayisisekelo). i-fdisk ngumyalo osebenzisanayo:

  • ngenketho "n" sakha ukwahlukanisa okusha
  • ngenketho "t" sishintsha uhlobo lwefayela elizohamba ekwahlukanisweni
  • ngenketho «w» sibhalela idiski
  • ngenketho «q» sishiya ngaphandle kokubhala ushintsho

Uma sisebenzisa inketho "n" izosinika izinketho eziningi, ngaso sonke isikhathi sizosebenzisa okuzenzakalelayo, ngaphandle kwalapho kusethwa umkhakha wokugcina engxenyeni yokuqala, okuzofanele siyibhale "+ 8G", okukhombisa uhlelo ukuthi sifuna ukwahlukanisa kwethu kuhlale i-8GB.

Lapho sakha ukwahlukanisa kwesibili sizosebenzisa izinketho ezizenzakalelayo ngoba sonke isikhala sizohlala. Futhi, ukutshela i-fdisk ukuthi ukwahlukaniswa kwesibili kuzoba uhlobo lokushintshana, sebenzisa inketho "t" (i-hexcode yokushintshana ingu-82). I-interface ibukeka kanjena:

% fdisk / dev / sda Command (m ngosizo):

Uma konke sekwenziwe, sisebenzisa inketho "w" ukubhala ushintsho kudiski bese siyaphuma.
Manje yisikhathi sokufometha ukwahlukaniswa. Sizoqala ngokushintshana ukuze sikwazi ukukusebenzisa ngokushesha:

% mkswap / dev / sda2% swapon / dev / sda2

Sivele sinokuhlukaniswa okuhlukanisiwe, futhi ngomyalo iswishi sesiqalile ukuyisebenzisa. Manje sifometha ukwahlukanisa kokuqala ku-ext4:

% mkfs.ext4 /dev/sda1

Singaqala ukulandela izinyathelo ezichazwe ku- http://www.sysresccd.org/Sysresccd-manual-en_How_to_personalize_SystemRescueCd, lapha ngibahumusha / ngibachaza ngesichasiselo esingajwayelekile.

Sifaka ukwahlukanisa endaweni yaso (i-LiveCD isivele ifike yalungiswa ngefolda / mnt / inkambiso lapho ukwahlukanisa esizokwenza khona izinguquko ezifanele kufanele kufakwe khona). Futhi ngemuva kokufaka kuzodingeka sikhiphe amafayela kudiski, lokhu kutholakala ngombhalo osuvele ulungisiwe. Isikripthi sizothatha isikhashana (ngoba silahla amakhulu wememori yama-megabytes), uma ufuna ukubheka ukuthi iyasebenza ngempela yini, iya kwesinye isiginali (nge-Alt + F4 ngokwesibonelo) bese wenza df -h.

% mount / dev / sda2 / mnt / custom% / usr / sbin / sysresccd-custom extract

Uma manje uzulazulela ngaphakathi / mnt / custom / customcd, uzobona amafolda amaningi. Ku- / mnt / custom / customcd / files isistimu yefayela yezimpande iyatholakala. Manje yisikhathi sokususa uhlelo olusha oluzayo. Lapha ngizofaka imiyalo, ukuthola eminye imininingwane nge-chroot ongayibona lesi sifundo ngisibhale ngenyanga edlule

% mount -o bind / proc / mnt / custom / customcd / files / proc% mount -o bind / dev / mnt / custom / customcd / files / dev% mount -o bind / sys / mnt / custom / customcd / files / sys% chroot / mnt / custom / customcd / files / bin / bash # gcc-config $ (gcc-config -c)

Sesivele sisohlelweni olunezimpande, okuzoba uhlelo lwe-LiveCD uma sesiluqalile. Sizofaka amaphakheji alahlekile (i-bison ne-texinfo) sisebenzisa umyalo aqhamuke (ophatha iphasela le- portage kusuka ku-gentoo).

Okokuqala sivumelanisa isihlahla se-portage (okulingana ne- Thola ukubuyekeza)
# emerge-webrsync QAPHELA: sisebenzisa lo myalo esikhundleni se- "phuma-vumelanisa" ngoba uyashesha, ngoba ilanda iphakethe le-tar kuwebhu. Lesi sinyathelo siyadingeka, ngoba uma ungaqhamuki sizovele sivele sivumelane –ukuvumelanisa, kusinciphise.

Ngemuva kokuvumelanisa isihlahla se-portage singaqhubeka ukufaka amaphakheji:

# phuma sys-devel / bison # phuma sys-devel / texinfo
inyathi kuzothatha isikhashana ukuhlanganisa, bekezela

Sishiya i-chroot:# exit

Sehlisa "/ proc" ukuze amaphakheji amasha afakiwe agcinwe kuma-squashfs. Siphinde sehlise u - "/ dev" no "/ sys" ukuze singakhohlwa ngokuhamba kwesikhathi
% umount /mnt/custom/customcd/files/proc
% umount /mnt/custom/customcd/files/dev
% umount /mnt/custom/customcd/files/sys

Njengoba sesivele sinohlelo olusha lwefayela le-squash esilungiselelwe, silakha ngomyalo olandelayo
% /usr/sbin/sysresccd-custom squashfs
Uma sifuna ukufaka ifayela esithombeni se-ISO kepha sifuna ukuthi libe ngaphandle kwama-squashfs, kufanele silibeke kufolda «/ mnt / custom / customcd / isoroot»

% cp -a my-files /mnt/custom/customcd/isoroot

Kuleli qophelo, umhlahlandlela osemthethweni ukutshela ukuthi ungasetha imephu yokhiye ukuqala nge-keyboard ezenzakalelayo (ngokwesibonelo ama- "es" wamakhibhodi we-Spanish). Kepha ukwenza izivivinyo eziningana, iskripthi abangisebenzisela sona asisebenzi futhi kube nomphumela wephutha lapho kulayishwa i-kernel, ngakho-ke ngizokweqa lesi sinyathelo.

Isikhathi esikhazimulayo sesifikile, manje sesingakwazi ukukhiqiza isithombe esisha se-ISO ngohlelo lwethu olwenziwe ngokwezifiso!
% /usr/sbin/sysresccd-custom isogen my_srcd
I- "My_srcd" igama esilinika ivolumu, ungayibiza nganoma yini oyifunayo. Isithombe sigcinwa ku- «/ mnt / custom / customcd / isofile», ngokungeziwe kufayela le-.md5 nalo lenziwa 🙂

Uma usebenza kudiski ebonakalayo, isinyathelo esibalulekile sisale: khipha isithombe se-ISO sohlelo olubonakalayo. Kunezindlela eziningi zokukwenza, ngizochaza elula (ku-VirtualBox) ukugwema ukufaka "izengezo zezivakashi" noma yini efana naleyo.
Sizosebenzisa iklayenti ukuthola ifayili ngomhubhe we-ssh. Ukuze senze lokhu, kufanele siqale silungiselele uhlelo lwezivakashi nge-password eyimpande. Iseva ye-ssh iqala ngokuzenzekelayo, sisayiqala kabusha uma kungenzeka.
% passwd
% /etc/init.d/sshd restart

Kufanele silungiselele ukuthunyelwa kwembobo komshini obonakalayo. Ku-VirtualBox kwenziwa kanjena:

  1. Ufinyelela ukucushwa komshini obonakalayo
  2. Esigabeni senethiwekhi usuvele ulungiselele i-adaptha ku-NAT
  3. Bheka inketho yokudlulisa itheku
  4. Ungeza umthetho omusha, ngamapharamitha kuphela "i-host port" ne- "guest port"
  5. umphathi = 3022 nesihambeli = 22

Ngalokhu siphumelele ukuthi i-port 3022 ye-PC yethu ingama-22 womshini obonakalayo. Siqala iklayenti leFayilezilla:

  1. Kwipharamitha yeseva sibhala: sftp: // localhost
  2. Kwipharamitha yegama lomsebenzisi sibhala: root
  3. Kupharamitha yephasiwedi sibeka leyo esiyisebenzisayo ku- «passwd»
  4. Kwipharamitha yetheku sibhala: 3022
  5. Chofoza ku- «Ukuxhumeka okusheshayo»

Uma konke kuhambe kahle kwesobunxele singakwazi ukuzulazula kwi-PC yethu nangakwesokudla kumshini obonakalayo. Kwanele ukufinyelela (kumshini obonakalayo) ifolda «/ mnt / custom / customcd / isofile» bese uhudulela isithombe se-ISO endaweni esiyifunayo ku-PC yethu.

!! Halala !! Uma konke kuhambe kahle, isithombe sakho se-ISO silungile ngeSystemRescueCD eyenziwe ngezifiso futhi ukulungele ukuqala nge-CD, i-USB ...


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Amazwana ayi-3, shiya okwakho

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe. Ezidingekayo ibhalwe nge *

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.

  1.   Leo kusho

    Yeka umhlahlandlela omuhle, oyinkimbinkimbi kodwa owusizo
    Umnikelo omuhle.

  2.   Leper_Ivan kusho

    Bese kuthi ngesikhashana esithe xaxa, futhi ngaphandle kokungaphatheki kahle okungako emehlweni, ngizoyifunda kahle. Kubonakala kuwusizo kakhulu futhi kuyathakazelisa.

  3.   UCarlos Sanchez kusho

    Sawubona woqer, okuthunyelwe okuhle kakhulu!

    Ngibe ne-LFS iminyaka ethile futhi ngakha iso lami elingakusiza, linakho konke okudingayo ukukuhlanganisa njengoba kuyi-LFS. Ngiyethemba ilusizo kuwe

    http://vegnux.org.ve/files/isos/neonatox-06.2rc6.linux-i686-xfce4.iso