View previous topic :: View next topic |
Author |
Message |
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Thu Nov 24, 2016 3:54 pm Post subject: [Risolto] Problema chroot |
|
|
Ciao ragazzi, ormai non so dove sbattere la testa, vi allego i miei tentativi di accedere a gentoo da arch tramite chroot http://pastebin.com/P2b66hRe
Ho provato in vari tentativi, ho seguito la wiki di gentoo, ma all'ingresso in chroot se do env-update mi da l'errore che si vede nel pastebin. Posso procedere ed anche usare emerge, ma se faccio una modifica ad un file che prevede etc-update, questo comando restituisce lo stesso errore. Sapete come posso fare?
Last edited by zar Marco on Tue Dec 06, 2016 5:13 am; edited 1 time in total |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30915 Location: here
|
Posted: Thu Nov 24, 2016 4:12 pm Post subject: |
|
|
Prova a vedere qua (sinceramente io sono sempre partito da livecd), soprattutto questa parte
gentoo wiki wrote: | Once the resize has finished, boot back into the old Linux as described. Then go to The Gentoo Handbook: Preparing the Disks and follow the instructions. When chrooting, use the following command to flush the environment:
root #env -i HOME=$HOME TERM=$TERM chroot /mnt/gentoo /bin/bash
root #/usr/sbin/env-update
root #source /etc/profile |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Thu Nov 24, 2016 4:17 pm Post subject: |
|
|
fedeliallalinea wrote: | Prova a vedere qua (sinceramente io sono sempre partito da livecd), soprattutto questa parte
gentoo wiki wrote: | Once the resize has finished, boot back into the old Linux as described. Then go to The Gentoo Handbook: Preparing the Disks and follow the instructions. When chrooting, use the following command to flush the environment:
root #env -i HOME=$HOME TERM=$TERM chroot /mnt/gentoo /bin/bash
root #/usr/sbin/env-update
root #source /etc/profile |
|
No no non mi serve per installare, ma per gestire gentoo mentre sto lavorando con arch. Ci do un occhio ugualmente ma in installazione non ebbi problemi con chroot, grazie per l'aiuto |
|
Back to top |
|
|
sabayonino Veteran
Joined: 03 Jan 2012 Posts: 1014
|
Posted: Thu Nov 24, 2016 11:51 pm Post subject: |
|
|
il Wiki Gentoo indica :
mount --make-rslave ....
e non
mount --make-slave
(questo se si accede a chroot con systemd)
Man mount
Quote: | The shared subtree operations.
Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared, private, slave or unbindable. A shared mount provides the ability to create mirrors of that mount such
that mounts and unmounts within any of the mirrors propagate to the other mirror. A slave mount receives propagation from its master, but not vice versa. A private mount carries no
propagation abilities. An unbindable mount is a private mount which cannot be cloned through a bind operation. The detailed semantics are documented in Documentation/filesys‐
tems/sharedsubtree.txt file in the kernel source tree.
Supported operations are:
mount --make-shared mountpoint
mount --make-slave mountpoint
mount --make-private mountpoint
mount --make-unbindable mountpoint
The following commands allow one to recursively change the type of all the mounts under a given mountpoint.
mount --make-rshared mountpoint
mount --make-rslave mountpoint
mount --make-rprivate mountpoint
mount --make-runbindable mountpoint
|
il percorso di bash (o qualsiasi altro comando) è comunque rilevabile con :
Code: | # whereis bash
bash: /bin/bash /etc/bash /usr/share/man/man1/bash.1.bz2 /usr/share/info/bash.info.bz2
|
Qui c'è un warning se si accede al chroot da un sistema non-gentoo-based:
Quote: | Note
The --make-rslave operations are needed for systemd support later in the installation.
Warning
When using non-Gentoo installation media, this might not be sufficient. Some distributions make /dev/shm a symbolic link to /run/shm/ which, after the chroot, becomes invalid. Making /dev/shm/ a proper tmpfs mount up front can fix this:
root #rm /dev/shm && mkdir /dev/shm
root #mount -t tmpfs -o nosuid,nodev,noexec shm /dev/shm
Also ensure that mode 1777 is set
root # chmod 1777 /dev/shm
|
_________________ LRS i586 on G.Drive
LRS x86-64 EFI on MEGA |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Fri Nov 25, 2016 8:17 am Post subject: |
|
|
sabayonino wrote: | il Wiki Gentoo indica :
mount --make-rslave ....
e non
mount --make-slave
(questo se si accede a chroot con systemd)
Man mount
Quote: | The shared subtree operations.
Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared, private, slave or unbindable. A shared mount provides the ability to create mirrors of that mount such
that mounts and unmounts within any of the mirrors propagate to the other mirror. A slave mount receives propagation from its master, but not vice versa. A private mount carries no
propagation abilities. An unbindable mount is a private mount which cannot be cloned through a bind operation. The detailed semantics are documented in Documentation/filesys‐
tems/sharedsubtree.txt file in the kernel source tree.
Supported operations are:
mount --make-shared mountpoint
mount --make-slave mountpoint
mount --make-private mountpoint
mount --make-unbindable mountpoint
The following commands allow one to recursively change the type of all the mounts under a given mountpoint.
mount --make-rshared mountpoint
mount --make-rslave mountpoint
mount --make-rprivate mountpoint
mount --make-runbindable mountpoint
|
il percorso di bash (o qualsiasi altro comando) è comunque rilevabile con :
Code: | # whereis bash
bash: /bin/bash /etc/bash /usr/share/man/man1/bash.1.bz2 /usr/share/info/bash.info.bz2
|
Qui c'è un warning se si accede al chroot da un sistema non-gentoo-based:
Quote: | Note
The --make-rslave operations are needed for systemd support later in the installation.
Warning
When using non-Gentoo installation media, this might not be sufficient. Some distributions make /dev/shm a symbolic link to /run/shm/ which, after the chroot, becomes invalid. Making /dev/shm/ a proper tmpfs mount up front can fix this:
root #rm /dev/shm && mkdir /dev/shm
root #mount -t tmpfs -o nosuid,nodev,noexec shm /dev/shm
Also ensure that mode 1777 is set
root # chmod 1777 /dev/shm
|
|
Ciao e grazie mille, quando fai riferimento a systemd, intendi nel sistema ospitante o in gentoo? |
|
Back to top |
|
|
sabayonino Veteran
Joined: 03 Jan 2012 Posts: 1014
|
Posted: Fri Nov 25, 2016 11:03 am Post subject: |
|
|
Quote: | The --make-rslave operations are needed for systemd support later in the installation. |
Gentoo _________________ LRS i586 on G.Drive
LRS x86-64 EFI on MEGA |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Fri Nov 25, 2016 11:24 am Post subject: |
|
|
ok grazie, proverò |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Tue Dec 06, 2016 5:13 am Post subject: |
|
|
Ho risolto, sbagliavo scrivendo slave invece di rslave come scritto da @sabayonino |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Wed Dec 14, 2016 9:13 am Post subject: |
|
|
Ciao, scusate se riapro questa discussione.
Sto tentando di rientare in gentoo da arch con chroot. Mi connetto e tutto ma ho un problema con un repo esterno al momento del sync. Il repo in questione, se entro da gentoo non mi da alcun errore.
Questo è il codice di errore che mi da
Code: | (chroot) arch / # emerge --sync
>>> Syncing repository 'gentoo' into '/usr/portage'...
!!! getaddrinfo failed for 'rsync.at.gentoo.org': [Errno -3] Temporary failure in name resolution
Do you want to sync your Portage tree with the mirror at
rsync://rsync.at.gentoo.org/gentoo-portage/? [Yes/No] y
>>> Starting rsync with rsync://rsync.at.gentoo.org/gentoo-portage/...
rsync: getaddrinfo: rsync.at.gentoo.org 873: Temporary failure in name resolution
rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
>>> Retrying...
!!! Exhausted addresses for rsync.at.gentoo.org
>>> Syncing repository 'gentoo-italia' into '/var/lib/repos/gentoo-italia'...
/usr/bin/git pull
fatal: unable to access 'https://github.com/hexvar/gentoo-italia/': Couldn't resolve host 'github.com'
!!! git pull error in /var/lib/repos/gentoo-italia
|
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30915 Location: here
|
Posted: Wed Dec 14, 2016 10:19 am Post subject: |
|
|
Code: | >>> Syncing repository 'gentoo' into '/usr/portage'...
....
rsync: getaddrinfo: rsync.at.gentoo.org 873: Temporary failure in name resolution
...
fatal: unable to access 'https://github.com/hexvar/gentoo-italia/': Couldn't resolve host 'github.com' |
Ti funziona la rete? Se dai un ping github.com risolve il nome? _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Wed Dec 14, 2016 10:38 am Post subject: |
|
|
Allora dal teminale in chroot non riesco a pingare neppure google. Nel terminale diciamo normale riesco a pingare. Mi sa che è un problema di connessione allora, ma devo capire come mai. Se provo a dare un ifconfig mi vede connesso.
Questo è l'output del ping
Con github il risultato è lo stesso |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30915 Location: here
|
Posted: Wed Dec 14, 2016 10:51 am Post subject: |
|
|
In /etc/resolv.conf cosa hai impostato? _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Wed Dec 14, 2016 11:02 am Post subject: |
|
|
quel file mi risulta vuoto |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30915 Location: here
|
Posted: Wed Dec 14, 2016 11:04 am Post subject: |
|
|
zar Marco wrote: | quel file mi risulta vuoto |
Prima di fare il chroot copialo da arch alla cartella gentoo _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Wed Dec 14, 2016 11:18 am Post subject: |
|
|
Ok fatto, nella cartella mnt risulta copiato
Code: | saul on arch mer dic 14 12:16:46
[dir.= ~] > cat /mnt/gentoo/etc/resolv.conf
# Generated by resolvconf
search Home
nameserver 192.168.1.254
|
ma una volta in chroot da lo stesso errore e se vado a verede quel file
Code: | (chroot) arch / # cat /etc/resolv.conf
cat: /etc/resolv.conf: File o directory non esistente
|
E' come se non mi rendesse la modifica attiva in chroot |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30915 Location: here
|
Posted: Wed Dec 14, 2016 12:31 pm Post subject: |
|
|
Allora una volta in chroot prova a creare il file con dentro
Code: | search Home
nameserver 192.168.1.254 |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Wed Dec 14, 2016 12:41 pm Post subject: |
|
|
Effettivamente non ci avevo pensato, ma non è che poi potrebbe andare a creare un qualche problema partendo normalmente in gentoo? |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30915 Location: here
|
Posted: Wed Dec 14, 2016 12:53 pm Post subject: |
|
|
zar Marco wrote: | Effettivamente non ci avevo pensato, ma non è che poi potrebbe andare a creare un qualche problema partendo normalmente in gentoo? |
Al massimo lo cancelli . Non so cosa succede con networkmanager se trova gia' un resolv.conf ma secondo me lo va a sovrascrivere. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Wed Dec 14, 2016 1:11 pm Post subject: |
|
|
Ok ottimo domani provo |
|
Back to top |
|
|
sabayonino Veteran
Joined: 03 Jan 2012 Posts: 1014
|
Posted: Wed Dec 14, 2016 7:15 pm Post subject: |
|
|
per praticità mettici dentro i DNS di google
Code: | nameserver 8.8.8.8
nameserver 8.8.4.4 |
o gli opendns
Code: | nameserver 208.67.222.222
nameserver 208.67.220.220
|
non quelli della rete interna (sempre se non hai un sistema dedicato al DNS) _________________ LRS i586 on G.Drive
LRS x86-64 EFI on MEGA |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Wed Dec 14, 2016 8:37 pm Post subject: |
|
|
sabayonino wrote: | per praticità mettici dentro i DNS di google
Code: | nameserver 8.8.8.8
nameserver 8.8.4.4 |
o gli opendns
Code: | nameserver 208.67.222.222
nameserver 208.67.220.220
|
non quelli della rete interna (sempre se non hai un sistema dedicato al DNS) |
Dubito di avere un sistema dedicato, e mi scuso per l'ignoranza, ma a cosa servono? Cioè io ho fatto l'installazione senza metterli e funziona bene |
|
Back to top |
|
|
sabayonino Veteran
Joined: 03 Jan 2012 Posts: 1014
|
Posted: Wed Dec 14, 2016 11:28 pm Post subject: |
|
|
se hai eseguito l'installazione seguendo il manuale passo-passo , avrai anche esegiuito
Code: | # cp -L /etc/resolv.conf /mnt/gentoo/etc/ |
come indicato
al massimo , post installazione possono venir gestiti dal gestore connessione. ma senza quelli , non vai da nessuna parte senza accorgimenti _________________ LRS i586 on G.Drive
LRS x86-64 EFI on MEGA |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Thu Dec 15, 2016 8:26 am Post subject: |
|
|
OK, ora sono su gentoo, se vado a vedere il file /etc/resolv.conf risulta già scritto
Code: | martoo on hptoo gio dic 15 09:21:45
[dir.= ~] > cat /etc/resolv.conf
# Generated by dhcpcd from enp3s0.dhcp
# /etc/resolv.conf.head can replace this line
domain Home
nameserver 192.168.1.254
# /etc/resolv.conf.tail can replace this line
|
allora non mi spiego come mai in chroot non va....comunque aggiungo lo stesso i DNS di google secondo voi? |
|
Back to top |
|
|
sabayonino Veteran
Joined: 03 Jan 2012 Posts: 1014
|
Posted: Thu Dec 15, 2016 11:32 am Post subject: |
|
|
se quell'IP non fa da DNS server ....
inoltre il file è utilizzato come cache
rimpiazza il tutto con i DNS indicati
poi al riavvio di Gentoo eventualmnente si rimmetterà a posto. dipende come è configurato NetworkManager o chi per lui. _________________ LRS i586 on G.Drive
LRS x86-64 EFI on MEGA |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Thu Dec 15, 2016 2:46 pm Post subject: |
|
|
Ok grazie, Allor domani lo imposto con i DNS google |
|
Back to top |
|
|
|