public inbox for gentoo-user-br@lists.gentoo.org
 help / color / mirror / Atom feed
From: Fabiano - deStilaDo <fabianoengler@gmail.com>
To: gentoo-user-br@lists.gentoo.org
Subject: Re: [gentoo-user-br] Sobre o Erro no env + chroot
Date: Sat, 23 Oct 2010 15:52:24 -0200	[thread overview]
Message-ID: <AANLkTi=apWRcUD6kwaVcvVxeaR8f6Rw_bTk5x-=t08gc@mail.gmail.com> (raw)
In-Reply-To: <4CC2358E.5080806@yahoo.com.br>

O que o env faz é somente setar as variaveis. O env é normalmente
utilizado para shells antigos, por compatibilidade. Hoje a grande
maioria das distribuições usa o bash como shell, e ele não precisa do
env. No bash você pode simplesmente rodar o comando sem o env que vai
funcionar:

root@localhost:~ # HOME=$HOME TERM=$TERM chroot /mnt/gentoo /bin/bash

O que esse comando (ou com o env) faz é apenas setar essas duas
variáveis de ambiente. Outra forma de fazer isso seria, antes do
comando chroot, digitar

root@localhost:~ # export HOME TERM

Se vc tiver alguma dúvida de como ficou o valor dessas variáveis após
o chroot, é só usar o comando "set" e comparar o valor dessas
variáveis.


Att,

Fabiano.



2010/10/22 Cleverson Casarin Uliana <clever92000@yahoo.com.br>:
> Caros,
>
> Conforme relatei outro dia, o guia alternativo de instalar o Gentoo a partir
> de outra distro manda dar o seguinte comando para entrar no chroot:
> env -i HOME=$HOME TERM=$TERM chroot /mnt/gentoo /bin/bash
> Mas esse comando, tanto no Arch Linux como no Ubuntu, seja no console ou no
> gnome-terminal, retorna:
> env: chroot: Arquivo ou diretório não encontrado
>
> Curioso é que se eu dou somente "chroot /mnt/gentoo /bin/bash" ele entra
> normalmente.
>
> O que faz exatamente a parte do env ? Qual seria o efeito colateral de
> deixar isso fora ?
>
> Mais uma coisinha: no Handbook manda executar após o chroot:
> export PS1="(chroot) $PS1"
> Mas no guia alternativo não tem. É bom executar ou não faz diferença ?
>
> Grato desde logo.
> Cleverson
>
>
>



      parent reply	other threads:[~2010-10-23 17:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-23  1:08 [gentoo-user-br] Sobre o Erro no env + chroot Cleverson Casarin Uliana
2010-10-23  1:22 ` Dalton Barreto
2010-10-23  5:21 ` Thiago Nunes
2010-10-23 13:37   ` Cleverson Casarin Uliana
2010-10-23 14:46     ` Thiago Nunes
2010-10-23 16:25       ` Cleverson Casarin Uliana
2010-10-23 15:32         ` Thiago Nunes
2010-10-23 23:10           ` Cleverson Casarin Uliana
2010-10-24  0:39             ` Dalton Barreto
2010-10-24  2:19             ` Thiago Nunes
2010-10-24 13:13               ` Cleverson Casarin Uliana
2010-10-24 12:38                 ` Thiago Nunes
2010-10-24 14:14                   ` [gentoo-user-br] " Nuno J. Silva
2010-10-25 12:21                     ` Animal-X®
2010-10-25 16:00                       ` Daniel Medeiros
2010-10-24 20:55                   ` [gentoo-user-br] " Cleverson Casarin Uliana
2010-10-25  2:23                     ` Thiago Nunes
2010-10-24 12:05           ` [gentoo-user-br] " Nuno J. Silva
2010-10-24 12:34             ` Thiago Nunes
2010-10-24 14:12               ` Nuno J. Silva
2010-10-24 21:20               ` Fabiano - deStilaDo
2010-10-23 17:52 ` Fabiano - deStilaDo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=apWRcUD6kwaVcvVxeaR8f6Rw_bTk5x-=t08gc@mail.gmail.com' \
    --to=fabianoengler@gmail.com \
    --cc=gentoo-user-br@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox