Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 114290 - The prompt doesn't change after a chroot confusing some users.
Summary: The prompt doesn't change after a chroot confusing some users.
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Handbook (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Łukasz Damentko (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-02 12:43 UTC by Tres 'RiverRat' Melton
Modified: 2006-01-05 04:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tres 'RiverRat' Melton 2005-12-02 12:43:13 UTC
We have had a few users that can't tell when they are in a chroot env or not.  I
always change the prompt immediately after a chroot so that I can tell which of
the 6 VTs are in the chroot.  I've discussed this with releng and there is no
easy way to make this happen without leaving too many droppings from it on the
finished system.  Therefore I would like to suggest a slight change to suggest a
small change to Code Listing 5 in the handbook.

http://gentoo/doc/en/handbook/handbook-x86.xml?part=1&chap=6#doc_chap2

Could you please add 'export PS1="(chroot) $PS1" ' right after the "source
/etc/profile" line.  Thanks.
Comment 1 SpanKY gentoo-dev 2005-12-02 12:46:39 UTC
we could update the livecds so that they set their prompt to something
like '(livecd) ....'

afterall, we already have a bunch of livecd-logic in baselayout and such ...
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2005-12-02 13:20:44 UTC
I would really prefer us not do any hacking unless we put it behind a CDBOOT. 
If you wanted to do this in baselayout, then great.  I personally, just think we
should document it and be done with it, if even that much.  I've already shot
down any ideas of changing the stages, which would be the only way to add a
(chroot) type of thing to the prompt without having the user do it themselves.

(Why is it nobody ever quotes their IRC conversations in bugs?)

The main thing to understand is that the Installer uses the exact same files as
the LiveCD itself for installation via GRP, so I have been working to remove any
special hacks that we had on the LiveCD to keep them from getting to user's live
systems after install.
Comment 3 SpanKY gentoo-dev 2005-12-02 15:48:06 UTC
i wasnt after changing the stage files, just the livecd env
Comment 4 Tres 'RiverRat' Melton 2005-12-02 19:42:46 UTC
That's what I was hoping too but wolf31o2 (Chris G?) told me that any changes
would get carried to the newly created system.  I even suggested that PS1 get
set to "livecd \W \$" and the hostname get changed to "chroot-livecd" as this
would effectively accomplish the same thing after ". /etc/profile" in the chroot.
Comment 5 Xavier Neys (RETIRED) gentoo-dev 2005-12-04 04:59:22 UTC
(In reply to comment #0)
> Could you please add 'export PS1="(chroot) $PS1" ' right after the "source
> /etc/profile" line.  Thanks.

I don't see any harm in telling users to change their prompt after having chrooted.
If it helps prevent mistakes, why not?
Comment 6 Łukasz Damentko (RETIRED) gentoo-dev 2006-01-05 04:00:45 UTC
It's in the handbook. Thank you.