Welcome to CRUX bug tracking.

FS#1598 - Add PS1 change to setup-chroot

Attached to Project: CRUX
Opened by Lee (xeirrr) - Thursday, 01 March 2018, 02:43 GMT
Last edited by Matt Housh (jaeger) - Monday, 10 September 2018, 15:35 GMT
Task Type Improvement
Category doc
Status Closed
Assigned To Matt Housh (jaeger)
Operating System CRUX
Severity Low
Priority Normal
Reported Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


The shortcut command setup-chroot doesn't change the PS1 setting after chroot, which causes confusions. What if chroot failed? Also everytime for a new install, I have to run pwd to make sure I am in / . If export PS1="(chroot) $PS1" is added to the end of setup-chroot, setup-chroot will indicate users that you are in the chroot and it will be much more helpful, at least in my honest opinion.
This task depends upon

Closed by  Matt Housh (jaeger)
Monday, 10 September 2018, 15:35 GMT
Reason for closing:  Implemented
Comment by Danny Rawlins (Romster) - Thursday, 01 March 2018, 11:31 GMT
I always ". /etc/profile" after chrooting.
Comment by Lee (xeirrr) - Friday, 02 March 2018, 00:44 GMT
@Romster Initializing environment variables by . /etc/profile will work, but you won't see a PS1 change, because it's still a '#' as the one before you chrootted.
Comment by Matt Housh (jaeger) - Monday, 10 September 2018, 15:35 GMT
Note that adding commands to setup-chroot *after* the chroot means they will not be executed until after the chroot exits.

Fixed using env instead, see:;a=commitdiff;h=025dca03e668468616de75a06131afa1c1281af2