~ubuntu-branches/ubuntu/maverick/schroot/maverick

« back to all changes in this revision

Viewing changes to man/schroot.1.in

  • Committer: Bazaar Package Importer
  • Author(s): Roger Leigh
  • Date: 2010-07-06 23:34:30 UTC
  • mfrom: (1.1.24 upstream) (2.2.9 sid)
  • Revision ID: james.westby@ubuntu.com-20100706233430-0xhzqj6105yuyvb1
Tags: 1.4.7-1
* New upstream stable release.
* Use standards version 3.9.0.
* Correctly distribute profile conffiles (Closes: #588247).  Thanks
  to Mario Holbe.
* Update it and zh_CN translations.  Thanks to Vincenzo Campanella
  and Ji ZhengYu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
.IP
158
158
The default behaviour is as follows (all directory paths are inside the
159
159
chroot).  A login shell is run in the current working directory.  If this is
160
 
not available, it will try $HOME (when \fI\\-\-preserve\-environment\fP is
 
160
not available, it will try $HOME (when \fI\-\-preserve\-environment\fP is
161
161
used), then the user's home directory, and \fI/\fP inside the chroot in turn.
162
162
A command is always run in the current working directory inside the chroot.  If
163
163
none of the directories are available, schroot will exit with an error status.
201
201
.TP
202
202
.BR \-n ", " \-\-session\-name=\fIsession-name\fP
203
203
Name a session.  The specified \fIsession-name\fP replaces the default session
204
 
name containing an automatically-generated session ID.
 
204
name containing an automatically-generated session ID.  Note that it is not
 
205
currently possible to create a session with the same name as a chroot or alias.
205
206
.TP
206
207
.BR \-f ", " \-\-force
207
208
Force a session operation, even if it would otherwise fail.  This may be used
231
232
access.
232
233
.SH EXAMPLES
233
234
.SS List available chroots
234
 
\f[CR]% \f[CB]schroot \-l\fP\fP\[CR]
 
235
\f[CR]%\ \f[CB]schroot \-l\fP\fP\[CR]
235
236
.br
236
237
\f[CR]default\fP
237
238
.br
288
289
Use \fI\-\-all\fP or \fI\-c\fP multiple times to use all or multiple chroots,
289
290
respectively.
290
291
.SS Running commands in a chroot
291
 
\f[CR]% \f[CB]schroot \-c sid /bin/ls\fP\fP\[CR]
 
292
\f[CR]%\ \f[CB]schroot \-c sid /bin/ls\fP\fP\[CR]
292
293
.br
293
294
\f[CR][sid chroot] Running command: \[lq]/bin/ls\[rq]\fP
294
295
.br
302
303
.br
303
304
\f[CR]pam          sbuild\-session.c  schroot.conf\fP
304
305
.PP
305
 
\f[CR]% \f[CB]schroot \-c sid \-\- ls \-1 | head \-n 5\fP\fP\[CR]
 
306
\f[CR]%\ \f[CB]schroot \-c sid \-\- ls \-1 | head \-n 5\fP\fP\[CR]
306
307
.br
307
308
\f[CR][sid chroot] Running command: \[lq]ls \-1\[rq]\fP
308
309
.br
324
325
as required; the data will be the same as if the command was run directly on
325
326
the host system.
326
327
.SS Switching users
327
 
\f[CR]% \f[CB]schroot \-c sid \-u root\fP\fP\[CR]
 
328
\f[CR]%\ \f[CB]schroot \-c sid \-u root\fP\fP\[CR]
328
329
.br
329
330
\f[CR]Password:\fP
330
331
.br
402
403
requirement in order to use session management, and is supported by most chroot
403
404
types.  Next, we will create a new session:
404
405
.PP
405
 
\f[CR]% \f[CB]schroot \-b \-c sid\-snap\fP\fP\[CR]
 
406
\f[CR]%\ \f[CB]schroot \-b \-c sid\-snap\fP\fP\[CR]
406
407
.br
407
408
\f[CR]sid\-snap\-46195b04\-0893\-49bf\-beb8\-0d4ccc899f0f\fP
408
409
.PP
409
410
The session ID of the newly-created session is returned on standard output.  It
410
411
is common to store it like this:
411
412
.PP
412
 
\f[CR]% \f[CB]SESSION=$(schroot \-b \-c sid\-snap)\fP\fP\[CR]
 
413
\f[CR]%\ \f[CB]SESSION=$(schroot \-b \-c sid\-snap)\fP\fP\[CR]
413
414
.br
414
 
\f[CR]% \f[CB]echo $SESSION\fP\fP\[CR]
 
415
\f[CR]%\ \f[CB]echo $SESSION\fP\fP\[CR]
415
416
.br
416
417
\f[CR]sid\-snap\-46195b04\-0893\-49bf\-beb8\-0d4ccc899f0f\fP
417
418
.PP
490
491
.PP
491
492
Now the session has been created, commands may be run in it:
492
493
.PP
493
 
\f[CR]% \f[CB]schroot \-r \-c sid\-snap\-46195b04\-0893\-49bf\-beb8\-0d4ccc899f0f \-\- uname \-sr\fP\fP\[CR]
 
494
\f[CR]%\ \f[CB]schroot \-r \-c sid\-snap\-46195b04\-0893\-49bf\-beb8\-0d4ccc899f0f \-\- uname \-sr\fP\fP\[CR]
494
495
.br
495
496
\f[CR]I: [sid\-snap\-46195b04\-0893\-49bf\-beb8\-0d4ccc899f0f chroot] Running command: \[lq]uname \-sr\[rq]\fP
496
497
.br
497
498
\f[CR]Linux 2.6.18\-3\-powerpc\fP
498
499
.br
499
 
\f[CR]% \f[CB]schroot \-r \-c $SESSION \-\- uname \-sr\fP\fP\[CR]
 
500
\f[CR]%\ \f[CB]schroot \-r \-c $SESSION \-\- uname \-sr\fP\fP\[CR]
500
501
.br
501
502
\f[CR]I: [sid\-snap\-fe170af9\-d9be\-4800\-b1bd\-de275858b938 chroot] Running command: \[lq]uname \-sr\[rq]\fP
502
503
.br
505
506
When all the commands to run in the session have been performed, the session
506
507
may be ended:
507
508
.PP
508
 
\f[CR]% \f[CB]schroot \-e \-c sid\-snap\-46195b04\-0893\-49bf\-beb8\-0d4ccc899f0f\fP\fP\[CR]
 
509
\f[CR]%\ \f[CB]schroot \-e \-c sid\-snap\-46195b04\-0893\-49bf\-beb8\-0d4ccc899f0f\fP\fP\[CR]
509
510
.br
510
 
\f[CR]% \f[CB]schroot \-e \-c $SESSION\fP\fP\[CR]
 
511
\f[CR]%\ \f[CB]schroot \-e \-c $SESSION\fP\fP\[CR]
511
512
.PP
512
513
Finally, the session names can be long and unwieldy.  A name may be specified
513
514
instead of using the automatically generated session ID:
514
515
.PP
515
 
\f[CR]% \f[CB]schroot \-b \-c sid\-snap \-n my\-session\-name\fP\fP\[CR]
 
516
\f[CR]%\ \f[CB]schroot \-b \-c sid\-snap \-n my\-session\-name\fP\fP\[CR]
516
517
.br
517
518
\f[CR]my\-session\-name\fP
518
519
.SH TROUBLESHOOTING
554
555
.BR schroot.conf (5)
555
556
for further details.
556
557
.SH FILES
 
558
.SS Configuration files
557
559
.TP
558
560
\f[BI]@SCHROOT_CONF@\fP
559
561
The system-wide chroot definition file.  This file must be owned by the root
573
575
.TP
574
576
\f[BI]/etc/pam.d/schroot\fP
575
577
PAM configuration.
 
578
.SS System directories
 
579
.TP
 
580
\f[BI]@SCHROOT_LIBEXEC_DIR@\fP
 
581
Directory containing helper programs used by setup scripts.
 
582
.SS Session directories
 
583
Each directory contains a directory or file with the name of each session.  Not
 
584
all chroot types make use of all the following directories.
 
585
.TP
 
586
\f[BI]@SCHROOT_SESSION_DIR@\fP
 
587
Directory containing the session configuration for each active session.
 
588
.TP
 
589
\f[BI]@SCHROOT_MOUNT_DIR@\fP
 
590
Directory used to mount the filesystems used by each active session.
 
591
.TP
 
592
\f[BI]@SCHROOT_UNDERLAY_DIR@\fP
 
593
Directory used for filesystem union source (underlay).
 
594
.TP
 
595
\f[BI]@SCHROOT_OVERLAY_DIR@\fP
 
596
Directory used for filesystem union writeable overlay.
 
597
.TP
 
598
\f[BI]@SCHROOT_FILE_UNPACK_DIR@\fP
 
599
Directory used for unpacking file chroots.
576
600
.SH AUTHORS
577
601
Roger Leigh.
578
602
.SH COPYRIGHT
588
612
.BR chroot (2),
589
613
.BR run\-parts (8),
590
614
.BR schroot\-setup (5),
 
615
.BR schroot\-faq (7),
591
616
.BR schroot.conf (5).
592
617
.\"#
593
618
.\"# The following sets edit modes for GNU EMACS