Ukulungiswa Kwesistimu: Ungayenza kanjani i-chroot

Izikhathi eziningi, ikakhulukazi lapho siphithizela, sizithole sisenkingeni yokungakwazi ukufinyelela ohlelweni ukuyilungisa, kepha isixazululo silula: sebenzisa umyalo impumu kusuka kunoma iyiphi i-LiveCD / RepairCD.

Ezindaweni eziningi (izinkundla, amabhulogi ...) lo myalo kuyashiwo ngawo futhi kunikezwa "ikhophi / unamathisela" ikhodi, kepha inhloso yami ngalokhu okuthunyelwe ukuchaza lezo zinyathelo kancane, ukuze ulisebenzise kahle leli thuluzi, ngolwazi kwesizathu.

Isingeniso

Umyalo impumu Kwaziwa njenge-CHangeROOT, okungukuthi, umyalo okuvumela ukuthi ushintshe impande yohlelo osebenza kulo. Ngamanye amagama: uma uvela ku-LiveCD futhi ufuna konke okusebenzayo kukhonsoli ukuthi kube nomthelela ohlelweni olufakiwe, kufanele uqale usebenzise impumu.

Inkinga ukuthi akwanele ukusebenzisa impumu Kanjalo, ngaphambi kokuthi kufanele sikhuphule kahle ukwahlukana okuthile.

INDLELA

Okokuqala sidinga ukuqala ukuphela, kusuka kolunye uhlelo olufakiwe (kolunye ukwahlukanisa / idiski) noma kusuka ku-LiveCD. OKUBALULEKILE: ukwakhiwa kwe-LiveCD kufanele kufane nokwesistimu ezolungiswa (ama-32 noma ama-64 bits).
Uma sesisesigungwini sizoqala ngokukhomba ukwahlukana kwethu:
fdisk -l

  • Ngalo myalo sizobhala wonke ama-partitions / amadiski ethu. Kumele sikhombe ukuthi iyiphi ingxenye eqondiwe, lapho uhlelo lwethu lokulungisa lufakwe khona, kusukela manje kuqhubeke sizoyibiza uhlelo oluphukile.

Ngalesi sibonelo sizobheka ukuthi uhlelo lwethu oluphukile luku- / dev / sda1 .

Siyaqhubeka nokuhlanganisa uhlelo. Okokuqala sizokwakha ifolda lapho sizosebenza khona futhi ngokuhamba kwesikhathi sifaka ukwahlukanisa lapho uhlelo lwethu oluphukile lutholakala kuleyo folda
mkdir /mnt/my_linux
mount /dev/sda1 /mnt/my_linux

Uma unayo ifolda / ekhaya o / var noma enye into kwenye ukwahlukanisa, kufanele ukuyifaka / s ngale ndlela elandelayo:
mount /dev/sda2 /mnt/my_linux/var

  • QAPHELA: Ngithathe njengesibonelo ukwahlukanisa kwe / / dev / sda2 kufolda ye / var, ake ngamunye alungise ikhodi ezinhlakeni zayo.

Ngokuvamile lokhu kuzokwanela uma umane nje udinga ukuhlela amafayela ngesandla, kepha uma sifuna ukwenza imiyalo ethile elungisa isistimu, sidinga ukufaka amafolda athile wesistimu: / dev, / pro/ sys.
mount -t proc proc /mnt/my_linux/proc
mount -t sysfs sys /mnt/my_linux/sys
mount -o bind /dev /mnt/my_linux/dev

  • Ngokukhethwa kukho -t siyasho khuphuka uhlobo lwe- "systemystem" esifuna ukulifaka. Kuyadingeka ukuyicacisa ngenxa yemvelo ekhethekile yamafolda / pro y / sys.
  • Ngokukhethwa kukho -o sicacisa izinketho ze khuphuka. Inketho bopha isebenza "ukuxhumanisa". Ku-UNIX wonke amadivayisi wehadiwe ayatholakala ngefolda / dev, yingakho kufanele sikhuphule owethu wamanje / dev kufolda lapho uhlelo lwethu oluphukile lukhona manje. Njengoba le folda isivele ifakiwe, kuyadingeka kuphela ukutshela khuphuka lapho ibekwe khona ekuqaleni.

Kwenziwa ngale ndlela ukuze impumu bakwazi ukufinyelela kulawa mafolda njengokungathi uhlelo olwephukile, yize kumele ukuthi luvela ohlelweni lwamanje (isb: iseshini ye-LiveCD) ngoba ahlobene nesimo sohlelo, izinqubo kanye nehadiwe.

Manje yisikhathi sokusebenzisa impumu:
chroot /mnt/my_linux/ /bin/bash

  • Umyalo udluliswa njengezimpikiswano indlela yempande entsha «/» (okuyiyona yethu / mnt / my_linux) kanye nekhonsoli ofuna ukuyisebenzisa (kulokhu sikhethe i-bash eyaziwayo, etholakala ku- / bin / bash). Uma singacacisi ikhonsoli, sizozitholela ngaphambi kotolika womyalo othile wasendulo (ayigcwalisi lapho ucindezela ithebhu, njll).

Manje sesingasebenzisa ikhonsoli ngokungathi siqale iseshini yezimpande kusistimu yethu ephukile (hlela amafayela, hlola imibhalo, faka / khipha amaphakheji ... ISEXWAYISO! Ukuze ushintsho olwenziwe luqale ukusebenza, kufanele wehlise isistimu yefayela ngemuva kokuphuma impumuBheka isibonelo esingezansi.

Imininingwane eminingi ku https://wiki.archlinux.org/index.php/Change_Root (ngaphezu kokufunda okunconyiwe).

Isibonelo sokusetshenziswa: buyisela i-GRUB2

Enye yezinto ezisetshenziswa kakhulu ze- impumu Kunjengethuluzi lokulungisa i-GRUB. Njengoba uma i-grub iphuka, akunakwenzeka ukuqala uhlelo lwethu ukuyilungisa.

ISAZISO: lesi sifundo esifushane siyisibonelo nje, sisebenza ekusatshalalisweni okuhlukahlukene okususelwe ku-Debian, Ubuntu naku-OpenSUSE phakathi kwabanye. Noma kunjalo, hlola amadokhumenti wokusabalalisa kwakho, ngoba kokuningi umyalo awutholakali buyekeza-grub.
# QAPHELA: le miyalo isebenza kanye ngaphakathi kwe-chroot.update-grub
grub-install /dev/sda

  • cunt buyekeza-grub Sibuyekeza imenyu yokufaka ye-GRUB2, ngaleyo ndlela sengeze noma yikuphi okokufaka okungekho. Kamuva sifaka kabusha i-GRUB kudiski yethu, ngoba yonakele.

Kulokhu ngithathile / dev / sda Njenge-albhamu lapho sinohlelo lwethu, lokhu kufanele kujwayele icala lakho.

I-GRUB yethu kufanele isivele isilungisiwe, ngakho-ke kufanele siphume impumuyehlisa isistimu yefayela (OKUBALULEKILE) bese uqala kabusha ukuze izinguquko zisebenze. Uma sikhohlwa ukwehlisa uhlelo lwefayela, kungenzeka ukuthi ukuqala kabusha amafayela ngeke kwehle kahle ngakho-ke ezinye izinguquko ngeke zisebenze.
# sishiye impandeexit
# yehlisa uhlelo lwefayela bese uqala kabushaumount /mnt/my_linux/dev
umount /mnt/my_linux/sys
umount /mnt/my_linux/proc
umount /mnt/my_linux
reboot

Futhi yilokho kuphela. Ngiyethemba uyayijabulela nokuthi iyakusiza. Ukubingelela!


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

Amazwana ayi-24, 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.   Leper_Ivan kusho

    Ngingakusebenzisa lokhu .. Ngesinye isikhathi kufanele ngikusebenzise.

  2.   Mario kusho

    Ngabe ukhona kini osebenzise iChakra Benz? Uma kunjalo, ungangitshela uma
    ingabe kulula kumsebenzisi ojwayelekile? Ngisebenzisa i-SolydK elula kakhulu kepha
    Ngiyaqonda ukuthi iChakra iyi-KDE emsulwa futhi iyangithakazelisa.

    1.    woqer kusho

      Yebo, i-chakra yinhle kakhulu futhi ilula kakhulu noma kancane, into ukuthi ukufaka / ukukhipha amaphakheji kufanele ukwenze nekhonsoli, ngoba zisasebenza kumphathi wephakheji wokuqhafaza. Zama ngoba kufanelekile. Isebenzisa i-pacman package manager, ezuzwe njenge-Archlinux, kepha qaphela, ayabelani ngezinqolobane nge-arch futhi ayihambisani nazo. Uma ufuna ukufunda kabanzi nge-pacman, bheka i-wiki ye-arch https://wiki.archlinux.org/index.php/Pacman_%28Espa%C3%B1ol%29

      1.    izyokp kusho

        I-Oktopi isivele izinzile futhi isebenza kahle kakhulu kumsebenzisi ojwayelekile, ngalokho awudingi i-terminal ukusebenzisa i-pacman.

  3.   yezimg kusho

    Ngiyethemba ukuthi lokhu okuthunyelwe kuzovakashelwa ngabaningi, bese beqala amakhanda abo befaka noma yini lapho nge-chroot ungalungisa uhlelo cishe njalo, i-chroot ikuvumela ukuba ube namathuba amaningi, phakathi kwabo ukufaka iGentoo xD hahaha

  4.   alunado kusho

    kuhle, ngiyabonga ... Angikaze ngiyinike ibhola ngoba amanye ama-cd aphilayo okulungiswa kubonakala kimi ukuthi ayiphakamisa ngokuzenzakalela, kepha manje sekucacile, ngiyabonga futhi.

  5.   Lolo kusho

    Ukuyiqedela, kungakuhle ukuchaza ukuthi ungafaka kanjani ukwahlukaniswa kwe-LVM, ukwahlukanisa okubethelwe nezinhlelo ze-RAID.

    1.    woqer kusho

      mmm angizange ngithinte i-LVM ne-RAID isikhathi eside, kepha ungangazisa kancane ukuqedela lokhu… ngiyabonga ngethiphu!

      1.    Lolo kusho

        Yebo iqiniso ukuthi ngingasebenzisa okuhle.

        Kungabongwa kakhulu.

        1.    woqer kusho

          bheka le wiki, ipholile impela http://wiki.bandaancha.st/RAID_y_LVM_en_Linux

  6.   Imodemu kusho

    Ukube nje lesi sihloko besikhona emasontweni ambalwa kamuva, kuvela ukuthi benginenkinga ngohlelo lwami futhi ngifunda futhi ngifunda futhi kuyo yonke indawo ngithola i-chroot ne-blablabla kepha ayisebenzelanga mina ngokususelwa kuleso sincomo se-live esifana nohlelo lwakho , kubaluleke kakhulu ngoba ngisebenzisa i-x64, okunye ukufaka ukwahlukaniswa kwesistimu, ngoba kimi lapho ngangifaka i-chroot futhi ngifaka, ngangiphonsa umyalo futhi wawungawuboni nje umyalo.

    Lesi sihloko sizoya kumafayela ami "ukuhlanganiswa kolwazi"

  7.   Ikhukhi kusho

    I-Arch LiveCD (enaleli thuluzi) konke okudingekayo ukulungisa isistimu yakho lapho uyiphula.

    1.    RAW-Okuyisisekelo kusho

      Impela! .. ..kuyikho konke okudingekayo .. ngisho nokusiza umuntu nge-W $ yakhe onqume ukuthi angaqali ..

      Ngihlala ngiphethe i-pgrive ye-1gb ne-Arch bukhoma ... futhi i-chroot iyikho konke okudingekayo ukuze ngaphansi kwanoma iyiphi inkinga, kumzuzu ongu-10 ube nakho konke okuhlelekile ngaphandle kokwethuka .. 😉

    2.    izyokp kusho

      Kufanele wazi ukuthi ungakwenza kanjani.

    3.    pablo kusho

      Sawubona, qaphela ukuthi nginenkinga ngama-centos, kungithumela ukwethuka kernel njll. Futhi angikwazi ukuyixazulula, nginewebhusayithi yami ne-database yami lapho.angazi ukuthi yini enye okufanele ngiyenze.

  8.   jony127 kusho

    Okuthunyelwe okuhle, ngangizwile ukuthi abanye badlula kodwa bengingazi ukuthi isetshenziswe kanjani, impela bengingakaze ngiyidinge yingakho bengingafundanga okuthile ngokukhethekile. Manje ngokuthunyelwe kwakho kuchazwe ngokucacile, ngiyazi ukuthi ngingakusebenzisa kanjani uma kwenzeka.

    Ngiyabonga kakhulu futhi ngendlela, phila isikhathi eside uLed Zeppelin hehe.

  9.   kamala kusho

    ngiyabonga, ekugcineni ngiphume kwiphupho elibi lokusindisa

    empeleni ngilandele zonke izinyathelo ngaphandle kwe-umount / mnt / my_linux, ngoba ingitshele ukuthi imatasa, futhi ngiya-fuser -km, kepha hhayi lokho, futhi ngiyabhampa ...

    Ngiyethemba akubalulekile….

    ngiyabona futhi…
    ukubingelela

  10.   Jose Antonio kusho

    Yize le ndatshana isivele ineminyaka embalwa, ngifuna ukubonga umbhali ngokuphana kwakhe ngokwabelana ngakho kuyindatshana enhle ngoba kule mpelasonto kusindise impilo yami. Ngokuzithandela ngilayishe isiphakeli sifaka iphakheji futhi lapho ngiyiqala kabusha ayizange ilayishe. Ngemuva kwezinsuku ezintathu zokuzama ukukulungisa nokufunda izindatshana ezahlukahlukene, ngikwazile ukufika ngenhlanhla futhi ekugcineni ngakwazi ukufaka kabusha i-grub nokulungisa iseva.

    Ngiyabonga kakhulu!

    1.    woqer kusho

      Ngiyajabula ukuthi kukusizile. Siyabonga ngamazwana!

  11.   Helio kusho

    Sawubona, ngiyazi ukuthi lokhu okuthunyelwe eminyakeni edlule, lokhu kubonga okuhle ngokwabelana ngakho. Futhi benginokungabaza, kimi kulimaze uhlelo kanye nabashayeli benethiwekhi, ngakho-ke ngilandele izinyathelo kepha ayingivumeli ukulanda amaphakheji, ingabe ikhona indlela yokuxhumanisa inethiwekhi ebukhoma ne-terminal

    1.    woqer kusho

      Angiyiqondi kahle inkinga yakho… Uma ungena ngemvume nge-LiveCD, inhlamvu elayishayo yiyona evela ku-LiveCD, ngakho-ke kufanele ukwazi ukumisa kahle ukuxhumana kwe-inthanethi. Lapho nje ukuxhumeka sekwenziwe, zama ukwenza i-chroot ukubona ukuthi uyaqhubeka nokuyigcina, uma kungenjalo, kungadingeka ukuthi uyilungiselele futhi, kepha i-kernel eyonakele akufanele ithinte iseshini ye-chroot.
      Uma ungacacisi okuningi, ngiyakutshela ...

  12.   dacha kusho

    Iposi Elihle… esinye sezihloko ezimbalwa eziwusizo ezitholakala ku-Intanethi.
    Ngiyabonga kakhulu ngomnikelo.

  13.   zopeck kusho

    Sawubona, okokufundisa okuhle kakhulu! Kuchazwe kahle, kithina singabantu nje!

    Nginombuzo:
    Ngenkathi usho ukuthi uma kwenzeka udinga ukufaka amaphakheji, yenza izibuyekezo zesistimu noma omunye umsebenzi okhethekile, futhi udinga ukufaka amafolda we / dev / proc kanye / sys, bekungangicaceli uma ngabe la mafolda akuhlelo lwe-Live iqale imishini ukuthi ilungiswe, noma uma isehlukaneni lempande elifakwe kuqala.

    Ngiyabonga.

  14.   Orlando kusho

    NGIBONGA KAKHULU!!!!