Debian Codegraph @

po/de/man2/pivot_root.2.po

raw
1 # German translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Mario Blättermann <[email protected]>, 2014, 2019, 2020, 2021, 2022, 2023.
5 # Helge Kreutzmann <[email protected]>, 2019, 2021.
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: manpages-l10n 4.28.0\n"
9 "POT-Creation-Date: 2026-06-05 06:35+0200\n"
10 "PO-Revision-Date: 2025-11-01 18:16+0100\n"
11 "Last-Translator: Mario Blättermann <[email protected]>\n"
12 "Language-Team: German <[email protected]>\n"
13 "Language: de\n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17 "X-Generator: Lokalize 23.04.3\n"
18 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
20 #. type: TH
21 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
22 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
23 #, no-wrap
24 msgid "pivot_root"
25 msgstr "pivot_root"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2026-02-08"
32 msgstr "8. Februar 2026"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "Linux man-pages 6.18"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "BEZEICHNUNG"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid "pivot_root - change the root mount"
51 msgstr "pivot_root - die Wurzeleinhängung ändern"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "LIBRARY"
58 msgstr "BIBLIOTHEK"
59
60 #. type: Plain text
61 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
62 #: opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "Standard C library (I<libc>,\\ I<-lc>)"
64 msgstr "Standard-C-Bibliothek (I<libc>,\\ I<-lc>)"
65
66 #. type: SH
67 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
68 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
69 #, no-wrap
70 msgid "SYNOPSIS"
71 msgstr "ÜBERSICHT"
72
73 #. type: Plain text
74 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
75 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
76 #, no-wrap
77 msgid ""
78 "B<#include E<lt>sys/syscall.hE<gt>> /* Definition of B<SYS_*> constants */\n"
79 "B<#include E<lt>unistd.hE<gt>>\n"
80 msgstr ""
81 "B<#include E<lt>sys/syscall.hE<gt>> /* Definition der B<SYS_*>-Konstanten */\n"
82 "B<#include E<lt>unistd.hE<gt>>\n"
83
84 #. type: Plain text
85 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
86 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
87 #, no-wrap
88 msgid "B<int syscall(SYS_pivot_root, const char *>I<new_root>B<, const char *>I<put_old>B<);>\n"
89 msgstr "B<int syscall(SYS_pivot_root, const char *>I<neue_Wurzel>B<, const char *>I<alte_Wurzel>B<);>\n"
90
91 #. type: Plain text
92 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
93 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
94 msgid ""
95 "I<Note>: glibc provides no wrapper for B<pivot_root>(), necessitating the "
96 "use of B<syscall>(2)."
97 msgstr ""
98 "I<Hinweis>: Glibc stellt keinen Wrapper für B<pivot_root>() bereit; rufen "
99 "Sie ihn mittels B<syscall>(2) auf."
100
101 #. type: SH
102 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
103 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
104 #, no-wrap
105 msgid "DESCRIPTION"
106 msgstr "BESCHREIBUNG"
107
108 #. type: Plain text
109 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
110 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
111 msgid ""
112 "B<pivot_root>() changes the root mount in the mount namespace of the "
113 "calling process. More precisely, it moves the root mount to the directory "
114 "I<put_old> and makes I<new_root> the new root mount. The calling process "
115 "must have the B<CAP_SYS_ADMIN> capability in the user namespace that owns "
116 "the caller's mount namespace."
117 msgstr ""
118 "B<pivot_root>() ändert die Einhängewurzel im Einhängenamensraum des "
119 "aufrufenden Prozesses. Genauer ausgedrückt verschiebt es die Einhängewurzel "
120 "in das Verzeichnis I<alte_Wurzel> und macht I<neue_Wurzel> zur neuen "
121 "Einhängewurzel. Der aufrufende Prozess muss in dem Benutzer-Namensraum, zu "
122 "dem der Einhängenamensraum des Aufrufenden gehört, über die B<CAP_SYS_ADMIN>-"
123 "Capability verfügen."
124
125 # WONTFIX I<chdir(\"/\")> → B<chdir(\"/\")> // An expression, according to man-pages(7) completly in italics
126 #. type: Plain text
127 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
128 #: opensuse-tumbleweed
129 msgid ""
130 "B<pivot_root>() changes the root directory and the current working "
131 "directory of each process or thread in the same mount namespace to "
132 "I<new_root> if they point to the old root directory. (See also NOTES.) On "
133 "the other hand, B<pivot_root>() does not change the caller's current "
134 "working directory (unless it is on the old root directory), and thus it "
135 "should be followed by a I<chdir(\"/\")> call."
136 msgstr ""
137 "B<pivot_root>() ändert das Wurzelverzeichnis und das aktuelle "
138 "Arbeitsverzeichnis jedes Prozesses oder Threads im gleichen Namensraum in "
139 "I<neue_Wurzel>, falls diese auf das alte Verzeichnis zeigen (siehe auch "
140 "ANMERKUNGEN). Andererseits ändert B<pivot_root>() das aktuelle "
141 "Arbeitsverzeichnis des Aufrufenden nicht (es sei denn, es ist das alte "
142 "Wurzelverzeichnis), daher sollte darauf ein Aufruf von B<chdir(\"/\")> "
143 "folgen."
144
145 #. type: Plain text
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 msgid "The following restrictions apply:"
149 msgstr "Die folgenden Einschränkungen gelten:"
150
151 #. type: IP
152 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
153 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
154 #, no-wrap
155 msgid "\\[bu]"
156 msgstr "\\[bu]"
157
158 #. type: Plain text
159 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
160 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
161 msgid "I<new_root> and I<put_old> must be directories."
162 msgstr "I<Neue_Wurzel> und I<alte_Wurzel> müssen Verzeichnisse sein."
163
164 #. type: Plain text
165 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
166 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
167 msgid ""
168 "I<new_root> and I<put_old> must not be on the same mount as the current root."
169 msgstr ""
170 "Die I<neue_Wurzel> und die I<alte_Wurzel> dürfen sich nicht in der gleichen "
171 "Einhängung wie die aktuelle Wurzel befinden."
172
173 #. type: Plain text
174 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
175 #: opensuse-tumbleweed
176 msgid ""
177 "I<put_old> must be at or underneath I<new_root>; that is, adding some "
178 "nonnegative number of \\[dq]I</..\\&>\\[dq] suffixes to the pathname pointed "
179 "to by I<put_old> must yield the same directory as I<new_root>."
180 msgstr ""
181 "Die I<alte_Wurzel> muss sich unterhalb der I<neuen_Wurzel> befinden, das "
182 "heißt, Hinzufügen einer nicht-negativen Anzahl von »I</..>« zum Pfadnamen, "
183 "der auf die I<alte_Wurzel> zeigt, muss das gleiche Verzeichnis wie die "
184 "I<neue_Wurzel> ergeben."
185
186 #. type: Plain text
187 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
188 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
189 msgid ""
190 "I<new_root> must be a path to a mount point, but can't be I<\\[dq]/\\[dq]>. "
191 "A path that is not already a mount point can be converted into one by bind "
192 "mounting the path onto itself."
193 msgstr ""
194 "I<Neue_Wurzel> muss ein Pfad zu einem Einhängepunkt sein, aber darf nicht "
195 "I<»/«> sein. Ein Pfad, der nicht bereits ein Einhängepunkt ist, kann "
196 "umgewandelt werden, indem er auf sich selbst bind-eingehängt wird."
197
198 #. type: Plain text
199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
201 msgid ""
202 "The propagation type of the parent mount of I<new_root> and the parent mount "
203 "of the current root directory must not be B<MS_SHARED>; similarly, if "
204 "I<put_old> is an existing mount point, its propagation type must not be "
205 "B<MS_SHARED>. These restrictions ensure that B<pivot_root>() never "
206 "propagates any changes to another mount namespace."
207 msgstr ""
208 "Der Ausbreitungstyp von I<neue_Wurzel> und seiner Elterneinhängung dürfen "
209 "nicht B<MS_SHARED> sein; entsprechend falls I<alte_Wurzel> ein bestehender "
210 "Einhängepunkt ist, darf sein Ausbreitungstyp nicht B<MS_SHARED> sein. Diese "
211 "Einschränkungen stellen sicher, dass B<pivot_root>() niemals Änderungen in "
212 "einen anderen Einhänge-Namensraum ausbreitet."
213
214 #. type: Plain text
215 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
216 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
217 msgid "The current root directory must be a mount point."
218 msgstr "Das aktuelle Wurzelverzeichnis muss ein Einhängepunkt sein."
219
220 #. type: SH
221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
223 #, no-wrap
224 msgid "RETURN VALUE"
225 msgstr "RÜCKGABEWERT"
226
227 #. type: Plain text
228 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
229 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
230 msgid ""
231 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
232 "to indicate the error."
233 msgstr ""
234 "Bei Erfolg wird Null zurückgegeben. Bei einem Fehler wird -1 zurückgegeben "
235 "und I<errno> gesetzt, um den Fehler anzuzeigen."
236
237 #. type: SH
238 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
239 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
240 #, no-wrap
241 msgid "ERRORS"
242 msgstr "FEHLER"
243
244 #. type: Plain text
245 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
246 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
247 msgid ""
248 "B<pivot_root>() may fail with any of the same errors as B<stat>(2). "
249 "Additionally, it may fail with the following errors:"
250 msgstr ""
251 "B<pivot_root>() kann jeden der von B<stat>(2) zurückgegebenen Fehler "
252 "zurückgeben. Zusätzlich kann Folgendes zurückgegeben werden:"
253
254 #. type: TP
255 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
256 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
257 #, no-wrap
258 msgid "B<EBUSY>"
259 msgstr "B<EBUSY>"
260
261 #. #-#-#-#-# archlinux: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
262 #. Reconfirmed that the following error occurs on Linux 5.0 by
263 #. specifying 'new_root' as "/rootfs" and 'put_old' as
264 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
265 #. itself. Of course, this is an odd situation, since a later check
266 #. in the kernel code will in any case yield EINVAL if 'new_root' is
267 #. not a mount point. However, when the system call was first added,
268 #. 'new_root' was not required to be a mount point. So, this
269 #. error is nowadays probably just the result of crufty accumulation.
270 #. This error can also occur if we bind mount "/" on top of itself
271 #. and try to specify "/" as the 'new' (again, an odd situation). So,
272 #. the EBUSY check in the kernel does still seem necessary to prevent
273 #. that case. Furthermore, the "or put_old" piece is probably
274 #. redundant text (although the check is in the kernel), since,
275 #. in another check, 'put_old' is required to be under 'new_root'.
276 #. type: Plain text
277 #. #-#-#-#-# debian-trixie: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
278 #. Reconfirmed that the following error occurs on Linux 5.0 by
279 #. specifying 'new_root' as "/rootfs" and 'put_old' as
280 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
281 #. itself. Of course, this is an odd situation, since a later check
282 #. in the kernel code will in any case yield EINVAL if 'new_root' is
283 #. not a mount point. However, when the system call was first added,
284 #. 'new_root' was not required to be a mount point. So, this
285 #. error is nowadays probably just the result of crufty accumulation.
286 #. This error can also occur if we bind mount "/" on top of itself
287 #. and try to specify "/" as the 'new' (again, an odd situation). So,
288 #. the EBUSY check in the kernel does still seem necessary to prevent
289 #. that case. Furthermore, the "or put_old" piece is probably
290 #. redundant text (although the check is in the kernel), since,
291 #. in another check, 'put_old' is required to be under 'new_root'.
292 #. type: Plain text
293 #. #-#-#-#-# debian-unstable: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
294 #. Reconfirmed that the following error occurs on Linux 5.0 by
295 #. specifying 'new_root' as "/rootfs" and 'put_old' as
296 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
297 #. itself. Of course, this is an odd situation, since a later check
298 #. in the kernel code will in any case yield EINVAL if 'new_root' is
299 #. not a mount point. However, when the system call was first added,
300 #. 'new_root' was not required to be a mount point. So, this
301 #. error is nowadays probably just the result of crufty accumulation.
302 #. This error can also occur if we bind mount "/" on top of itself
303 #. and try to specify "/" as the 'new' (again, an odd situation). So,
304 #. the EBUSY check in the kernel does still seem necessary to prevent
305 #. that case. Furthermore, the "or put_old" piece is probably
306 #. redundant text (although the check is in the kernel), since,
307 #. in another check, 'put_old' is required to be under 'new_root'.
308 #. type: Plain text
309 #. #-#-#-#-# fedora-44: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
310 #. Reconfirmed that the following error occurs on Linux 5.0 by
311 #. specifying 'new_root' as "/rootfs" and 'put_old' as
312 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
313 #. itself. Of course, this is an odd situation, since a later check
314 #. in the kernel code will in any case yield EINVAL if 'new_root' is
315 #. not a mount point. However, when the system call was first added,
316 #. 'new_root' was not required to be a mount point. So, this
317 #. error is nowadays probably just the result of crufty accumulation.
318 #. This error can also occur if we bind mount "/" on top of itself
319 #. and try to specify "/" as the 'new' (again, an odd situation). So,
320 #. the EBUSY check in the kernel does still seem necessary to prevent
321 #. that case. Furthermore, the "or put_old" piece is probably
322 #. redundant text (although the check is in the kernel), since,
323 #. in another check, 'put_old' is required to be under 'new_root'.
324 #. type: Plain text
325 #. #-#-#-#-# fedora-rawhide: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
326 #. Reconfirmed that the following error occurs on Linux 5.0 by
327 #. specifying 'new_root' as "/rootfs" and 'put_old' as
328 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
329 #. itself. Of course, this is an odd situation, since a later check
330 #. in the kernel code will in any case yield EINVAL if 'new_root' is
331 #. not a mount point. However, when the system call was first added,
332 #. 'new_root' was not required to be a mount point. So, this
333 #. error is nowadays probably just the result of crufty accumulation.
334 #. This error can also occur if we bind mount "/" on top of itself
335 #. and try to specify "/" as the 'new' (again, an odd situation). So,
336 #. the EBUSY check in the kernel does still seem necessary to prevent
337 #. that case. Furthermore, the "or put_old" piece is probably
338 #. redundant text (although the check is in the kernel), since,
339 #. in another check, 'put_old' is required to be under 'new_root'.
340 #. type: Plain text
341 #. #-#-#-#-# mageia-cauldron: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
342 #. Reconfirmed that the following error occurs on Linux 5.0 by
343 #. specifying 'new_root' as "/rootfs" and 'put_old' as
344 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
345 #. itself. Of course, this is an odd situation, since a later check
346 #. in the kernel code will in any case yield EINVAL if 'new_root' is
347 #. not a mount point. However, when the system call was first added,
348 #. 'new_root' was not required to be a mount point. So, this
349 #. error is nowadays probably just the result of crufty accumulation.
350 #. This error can also occur if we bind mount "/" on top of itself
351 #. and try to specify "/" as the 'new' (again, an odd situation). So,
352 #. the EBUSY check in the kernel does still seem necessary to prevent
353 #. that case. Furthermore, the "or put_old" piece is probably
354 #. redundant text (although the check is in the kernel), since,
355 #. in another check, 'put_old' is required to be under 'new_root'.
356 #. type: Plain text
357 #. #-#-#-#-# opensuse-leap-16-1: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
358 #. Reconfirmed that the following error occurs on Linux 5.0 by
359 #. specifying 'new_root' as "/rootfs" and 'put_old' as
360 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
361 #. itself. Of course, this is an odd situation, since a later check
362 #. in the kernel code will in any case yield EINVAL if 'new_root' is
363 #. not a mount point. However, when the system call was first added,
364 #. 'new_root' was not required to be a mount point. So, this
365 #. error is nowadays probably just the result of crufty accumulation.
366 #. This error can also occur if we bind mount "/" on top of itself
367 #. and try to specify "/" as the 'new' (again, an odd situation). So,
368 #. the EBUSY check in the kernel does still seem necessary to prevent
369 #. that case. Furthermore, the "or put_old" piece is probably
370 #. redundant text (although the check is in the kernel), since,
371 #. in another check, 'put_old' is required to be under 'new_root'.
372 #. type: Plain text
373 #. #-#-#-#-# opensuse-tumbleweed: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
374 #. Reconfirmed that the following error occurs on Linux 5.0 by
375 #. specifying 'new_root' as "/rootfs" and 'put_old' as
376 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
377 #. itself. Of course, this is an odd situation, since a later check
378 #. in the kernel code will in any case yield EINVAL if 'new_root' is
379 #. not a mount point. However, when the system call was first added,
380 #. 'new_root' was not required to be a mount point. So, this
381 #. error is nowadays probably just the result of crufty accumulation.
382 #. This error can also occur if we bind mount "/" on top of itself
383 #. and try to specify "/" as the 'new' (again, an odd situation). So,
384 #. the EBUSY check in the kernel does still seem necessary to prevent
385 #. that case. Furthermore, the "or put_old" piece is probably
386 #. redundant text (although the check is in the kernel), since,
387 #. in another check, 'put_old' is required to be under 'new_root'.
388 #. type: Plain text
389 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
390 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
391 msgid ""
392 "I<new_root> or I<put_old> is on the current root mount. (This error covers "
393 "the pathological case where I<new_root> is I<\\[dq]/\\[dq]>.)"
394 msgstr ""
395 "Die I<neue_Wurzel> oder die I<alte_Wurzel> sind in der aktuellen "
396 "Wurzeleinhängung. (Dieser Fehler deckt den pathologischen Fall ab, wenn die "
397 "I<neue_Wurzel> I<»/«> ist.)"
398
399 #. type: TP
400 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
401 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
402 #, no-wrap
403 msgid "B<EINVAL>"
404 msgstr "B<EINVAL>"
405
406 #. type: Plain text
407 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
408 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
409 msgid "I<new_root> is not a mount point."
410 msgstr "I<neue_Wurzel> ist kein Einhängepunkt."
411
412 #. type: Plain text
413 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
414 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
415 msgid "I<put_old> is not at or underneath I<new_root>."
416 msgstr "Die I<alte_Wurzel> ist nicht in oder unterhalb der I<neuen_Wurzel>."
417
418 #. type: Plain text
419 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
420 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
421 msgid ""
422 "The current root directory is not a mount point (because of an earlier "
423 "B<chroot>(2))."
424 msgstr ""
425 "Das aktuelle Wurzelverzeichnis ist kein Einhängepunkt (wegen eines früher "
426 "ausgeführten B<chroot>(2))."
427
428 #. type: Plain text
429 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
430 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
431 msgid "The current root is on the rootfs (initial ramfs) mount; see NOTES."
432 msgstr ""
433 "Die aktuelle Wurzel ist auf dem Rootfs (anfänglichen Ramfs-)Dateisystem; "
434 "siehe ANMERKUNGEN."
435
436 #. type: Plain text
437 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
438 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
439 msgid ""
440 "Either the mount point at I<new_root>, or the parent mount of that mount "
441 "point, has propagation type B<MS_SHARED>."
442 msgstr ""
443 "Entweder der Einhängepunkt unter I<neue_Wurzel> oder die Elterneinhängung "
444 "dieses Einhängepunktes hat den Ausbreitungstyp B<MS_SHARED>."
445
446 #. type: Plain text
447 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
448 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
449 msgid "I<put_old> is a mount point and has the propagation type B<MS_SHARED>."
450 msgstr ""
451 "I<alte_Wurzel> ist ein Einhängepunkt und der Ausbreitungstyp ist "
452 "B<MS_SHARED>."
453
454 #. type: TP
455 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
456 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
457 #, no-wrap
458 msgid "B<ENOTDIR>"
459 msgstr "B<ENOTDIR>"
460
461 #. type: Plain text
462 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
463 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
464 msgid "I<new_root> or I<put_old> is not a directory."
465 msgstr "I<neue_Wurzel> oder I<alte_Wurzel> ist kein Verzeichnis."
466
467 #. type: TP
468 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
469 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
470 #, no-wrap
471 msgid "B<EPERM>"
472 msgstr "B<EPERM>"
473
474 #. type: Plain text
475 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
476 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
477 msgid "The calling process does not have the B<CAP_SYS_ADMIN> capability."
478 msgstr ""
479 "Der aufrufende Prozess verfügt nicht über die B<CAP_SYS_ADMIN>-Capability."
480
481 #. type: SH
482 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
483 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
484 #, no-wrap
485 msgid "STANDARDS"
486 msgstr "STANDARDS"
487
488 #. type: Plain text
489 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
490 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
491 msgid "Linux."
492 msgstr "Linux."
493
494 #. type: SH
495 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
496 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
497 #, no-wrap
498 msgid "HISTORY"
499 msgstr "GESCHICHTE"
500
501 #. type: Plain text
502 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
503 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
504 msgid "Linux 2.3.41."
505 msgstr "Linux 2.3.41."
506
507 #. type: SH
508 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
509 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
510 #, no-wrap
511 msgid "NOTES"
512 msgstr "ANMERKUNGEN"
513
514 #. type: Plain text
515 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
516 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
517 msgid ""
518 "A command-line interface for this system call is provided by "
519 "B<pivot_root>(8)."
520 msgstr ""
521 "Eine Befehlszeilenschnittstelle für diesen Systemaufruf wird durch "
522 "B<pivot_root>(8) bereitgestellt."
523
524 #. type: Plain text
525 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
526 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
527 msgid ""
528 "B<pivot_root>() allows the caller to switch to a new root filesystem while "
529 "at the same time placing the old root mount at a location under I<new_root> "
530 "from where it can subsequently be unmounted. (The fact that it moves all "
531 "processes that have a root directory or current working directory on the old "
532 "root directory to the new root frees the old root directory of users, "
533 "allowing the old root mount to be unmounted more easily.)"
534 msgstr ""
535 "B<pivot_root>() ermöglicht dem Aufrufenden, in eine neue Dateisystemwurzel "
536 "zu wechseln, während gleichzeitig die alte Einhängewurzel an einem Ort "
537 "unterhalb der I<neuen_Wurzel> platziert wird, wo sie anschließend ausgehängt "
538 "werden kann. (Die Tatsache, dass alle Prozesse, die ein Wurzelverzeichnis "
539 "oder ein aktuelles Arbeitsverzeichnis unterhalb des alten "
540 "Wurzelverzeichnisses haben, zu der neuen Wurzel verschoben werden, befreit "
541 "das alte Wurzelverzeichnis von Benutzern, wodurch das alte Wurzelverzeichnis "
542 "leichter ausgehängt werden kann.)"
543
544 #. type: Plain text
545 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
546 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
547 msgid ""
548 "One use of B<pivot_root>() is during system startup, when the system mounts "
549 "a temporary root filesystem (e.g., an B<initrd>(4)), then mounts the real "
550 "root filesystem, and eventually turns the latter into the root directory of "
551 "all relevant processes and threads. A modern use is to set up a root "
552 "filesystem during the creation of a container."
553 msgstr ""
554 "Der typische Anwendungsfall von B<pivot_root>() ist während des "
555 "Systemstarts, wenn das System ein temporäres Wurzeldateisystem einhängt, zum "
556 "Beispiel ein B<initrd>(4). Danach wird das reale Wurzeldateisystem "
557 "eingehängt und eventuell in die aktuelle Wurzel aller relevanten Prozesse "
558 "und Threads verwandelt. Ein moderner Anwendungsfall ist die Einrichtung "
559 "eines Wurzeldateisystems während der Erzeugung eines Containers."
560
561 #. type: Plain text
562 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
563 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
564 msgid ""
565 "The fact that B<pivot_root>() modifies process root and current working "
566 "directories in the manner noted in DESCRIPTION is necessary in order to "
567 "prevent kernel threads from keeping the old root mount busy with their root "
568 "and current working directories, even if they never access the filesystem in "
569 "any way."
570 msgstr ""
571 "B<pivot_root>() verändert die Wurzel und das aktuelle Arbeitsverzeichnis in "
572 "der im Abschnitt BESCHREIBUNG angegebenen Weise. Dies ist nötig, um Kernel-"
573 "Threads daran zu hindern, die alte Einhängewurzel mit ihren Wurzeln und "
574 "aktuellen Arbeitsverzeichnissen belegt zu halten, selbst dann, wenn sie auf "
575 "das Dateisystem niemals zugreifen."
576
577 #. type: Plain text
578 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
579 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
580 msgid ""
581 "The rootfs (initial ramfs) cannot be B<pivot_root>()ed. The recommended "
582 "method of changing the root filesystem in this case is to delete everything "
583 "in rootfs, overmount rootfs with the new root, attach I<stdin>/I<stdout>/"
584 "I<stderr> to the new I</dev/console>, and exec the new B<init>(1). Helper "
585 "programs for this process exist; see B<switch_root>(8)."
586 msgstr ""
587 "Das Rootfs (anfängliche Ramfs) kann nicht mittels B<pivot_root> erreicht "
588 "werden. Die in diesem Fall empfohlene Methode zur Änderung des "
589 "Wurzeldateisystems ist das Löschen sämtlicher Inhalte im Rootfs, das Rootfs "
590 "mit der neuen Wurzel übereinzuhängen, I<stdin>/I<stdout>/I<stderr> an das "
591 "neue I</dev/console> anzuhängen und das neue B<init>(1) auszuführen. "
592 "Helferprogramme für diesen Prozess existieren: siehe B<switch_root>(8)."
593
594 #. type: SS
595 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
596 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
597 #, no-wrap
598 msgid "pivot_root(\\[dq].\\[dq], \\[dq].\\[dq])"
599 msgstr "pivot_root(\\[dq].\\[dq], \\[dq].\\[dq])"
600
601 #. type: Plain text
602 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
603 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
604 msgid ""
605 "I<new_root> and I<put_old> may be the same directory. In particular, the "
606 "following sequence allows a pivot-root operation without needing to create "
607 "and remove a temporary directory:"
608 msgstr ""
609 "I<Neue_Wurzel> und I<alte_Wurzel> können das gleiche Verzeichnis sein. Die "
610 "folgende Sequenz erlaubt eine Pivot-Root-Aktion, ohne dass ein temporäres "
611 "Verzeichnis angelegt und wieder entfernt werden muss:"
612
613 #. type: Plain text
614 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
615 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
616 #, no-wrap
617 msgid ""
618 "chdir(new_root);\n"
619 "pivot_root(\".\", \".\");\n"
620 "umount2(\".\", MNT_DETACH);\n"
621 msgstr ""
622 "chdir(neue_Wurzel);\n"
623 "pivot_root(\".\", \".\");\n"
624 "umount2(\".\", MNT_DETACH);\n"
625
626 #. type: Plain text
627 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
628 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
629 msgid ""
630 "This sequence succeeds because the B<pivot_root>() call stacks the old root "
631 "mount point on top of the new root mount point at I</>. At that point, the "
632 "calling process's root directory and current working directory refer to the "
633 "new root mount point (I<new_root>). During the subsequent B<umount>() "
634 "call, resolution of I<\\[dq].\\[dq]> starts with I<new_root> and then moves "
635 "up the list of mounts stacked at I</>, with the result that old root mount "
636 "point is unmounted."
637 msgstr ""
638 "Diese Sequenz ist erfolgreich, weil der Aufruf von B<pivot_root>() den alten "
639 "Wurzeleinhängepunkt über den neuen Wurzeleinhängepunkt in I</> stapelt. An "
640 "diesem Punkt beziehen sich das Wurzelverzeichnis und das aktuelle "
641 "Arbeitsverzeichnis des aufrufenden Prozesses auf den neuen "
642 "Wurzeleinhängepunkt (I<neue_Wurzel>). Während des darauf folgenden Aufrufs "
643 "von B<umount>() beginnt die Auflösung von I<».«> mit der I<neue_Wurzel> und "
644 "wandert dann die Liste der in I</> gestapelten Einhängungen hinauf, mit dem "
645 "Ergebnis, dass der alte Einhängepunkt ausgehängt wird."
646
647 #. type: SS
648 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
649 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
650 #, no-wrap
651 msgid "Historical notes"
652 msgstr "Geschichtliche Anmerkungen"
653
654 #. type: Plain text
655 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
656 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
657 msgid "For many years, this manual page carried the following text:"
658 msgstr "Viele Jahre lang enthielt diese Handbuchseite den folgenden Text:"
659
660 #. type: Plain text
661 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
662 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
663 msgid ""
664 "B<pivot_root>() may or may not change the current root and the current "
665 "working directory of any processes or threads which use the old root "
666 "directory. The caller of B<pivot_root>() must ensure that processes with "
667 "root or current working directory at the old root operate correctly in "
668 "either case. An easy way to ensure this is to change their root and current "
669 "working directory to I<new_root> before invoking B<pivot_root>()."
670 msgstr ""
671 "B<pivot_root>() kann die aktuelle Wurzel und das aktuelle Arbeitsverzeichnis "
672 "von Prozessen und Threads ändern, welche das alte Wurzelverzeichnis nutzen, "
673 "muss dies aber nicht. Der Prozess, welcher B<pivot_root>() aufruft, muss "
674 "sicherstellen, dass Prozesse mit Wurzel- oder aktuellem Arbeitsverzeichnis "
675 "in jedem Fall korrekt arbeiten. Ein einfacher Weg hierzu ist die Änderung "
676 "von Wurzel- und aktuellem Arbeitsverzeichnis auf die I<neue_Wurzel>, bevor "
677 "B<pivot_root>() aufgerufen wird."
678
679 #. type: Plain text
680 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
681 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
682 msgid ""
683 "This text, written before the system call implementation was even finalized "
684 "in the kernel, was probably intended to warn users at that time that the "
685 "implementation might change before final release. However, the behavior "
686 "stated in DESCRIPTION has remained consistent since this system call was "
687 "first implemented and will not change now."
688 msgstr ""
689 "Dieser Text, der geschrieben wurde, bevor, die Implementierung des "
690 "Systemaufrufs im Kernel überhaupt abgeschlossen war, beabsichtigte "
691 "seinerzeit möglicherweise, die Benutzer zu warnen, dass sich die "
692 "Implementation bis zur finalen Veröffentlichung ändern könnte. Jedoch ist "
693 "das im Abschnitt BESCHREIBUNG angegebene Verhalten seit der "
694 "Erstveröffentlichung dieses Systemaufrufs konsistent geblieben und wird sich "
695 "nun nicht ändern."
696
697 #. type: SH
698 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
699 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
700 #, no-wrap
701 msgid "EXAMPLES"
702 msgstr "BEISPIELE"
703
704 #. FIXME
705 #. Would it be better, because simpler, to use unshare(2)
706 #. rather than clone(2) in the example below?
707 #. type: Plain text
708 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
709 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
710 msgid ""
711 "The program below demonstrates the use of B<pivot_root>() inside a mount "
712 "namespace that is created using B<clone>(2). After pivoting to the root "
713 "directory named in the program's first command-line argument, the child "
714 "created by B<clone>(2) then executes the program named in the remaining "
715 "command-line arguments."
716 msgstr ""
717 "Das untenstehende Programm beschreibt die Verwendung von B<pivot_root>() "
718 "innerhalb eines Einhängenamensraums, der mit B<clone>(2) erstellt wurde. "
719 "Nach dem Umschwenken zu dem im ersten Befehlszeilenargument des Programms "
720 "benannten Wurzelverzeichnis führt der mit B<clone>(2) erzeugte Kindprozess "
721 "das in den übrigen Befehlszeilenargumenten benannte Programm aus."
722
723 #. type: Plain text
724 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
725 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
726 msgid ""
727 "We demonstrate the program by creating a directory that will serve as the "
728 "new root filesystem and placing a copy of the (statically linked) "
729 "B<busybox>(1) executable in that directory."
730 msgstr ""
731 "Wir demonstrieren das Programm durch Anlegen eines Verzeichnisses, das als "
732 "das neue Wurzeldateisystem dient, und Setzen einer (statisch gelinkten) "
733 "Kopie der ausführbaren Datei B<busybox>(1) in dieses Verzeichnis."
734
735 #. type: Plain text
736 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
737 #: opensuse-tumbleweed
738 #, no-wrap
739 msgid ""
740 "$B< mkdir /tmp/rootfs>;\n"
741 "$B< ls -id /tmp/rootfs>; # Show inode number of new root directory\n"
742 "319459 /tmp/rootfs\n"
743 "$B< cp $(which busybox) /tmp/rootfs>;\n"
744 "$B< PS1=\\[aq]bbsh$ \\[aq] sudo ./pivot_root_demo /tmp/rootfs /busybox sh>;\n"
745 "bbsh$B< PATH=/>;\n"
746 "bbsh$B< busybox ln busybox ln>;\n"
747 "bbsh$B< ln busybox echo>;\n"
748 "bbsh$B< ln busybox ls>;\n"
749 "bbsh$B< ls>;\n"
750 "busybox echo ln ls\n"
751 "bbsh$B< ls -id />; # Compare with inode number above\n"
752 "319459 /\n"
753 "bbsh$B< echo \\[aq]hello world\\[aq]>;\n"
754 "hello world\n"
755 msgstr ""
756 "$B< mkdir /tmp/rootfs>;\n"
757 "$B< ls -id /tmp/rootfs>; # Inode-Anzahl des neuen Wurzelverzeichnisses zeigen\n"
758 "319459 /tmp/rootfs\n"
759 "$B< cp $(which busybox) /tmp/rootfs>;\n"
760 "$B< PS1=\\[aq]bbsh$ \\[aq] sudo ./pivot_root_demo /tmp/rootfs /busybox sh>;\n"
761 "bbsh$B< PATH=/>;\n"
762 "bbsh$B< busybox ln busybox ln>;\n"
763 "bbsh$B< ln busybox echo>;\n"
764 "bbsh$B< ln busybox ls>;\n"
765 "bbsh$B< ls>;\n"
766 "busybox echo ln ls\n"
767 "bbsh$B< ls -id />; # Mit der Inode-Anzahl oben vergleichen\n"
768 "319459 /\n"
769 "bbsh$B< echo \\[aq]Hallo Welt\\[aq]>;\n"
770 "Hallo Welt\n"
771
772 #. type: SS
773 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
774 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
775 #, no-wrap
776 msgid "Program source"
777 msgstr "Programmquelltext"
778
779 #. type: Plain text
780 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
781 #: opensuse-tumbleweed
782 #, no-wrap
783 msgid ""
784 "/* pivot_root_demo.c */\n"
785 "\\&\n"
786 "#define _GNU_SOURCE\n"
787 "#include E<lt>err.hE<gt>\n"
788 "#include E<lt>limits.hE<gt>\n"
789 "#include E<lt>sched.hE<gt>\n"
790 "#include E<lt>signal.hE<gt>\n"
791 "#include E<lt>stdio.hE<gt>\n"
792 "#include E<lt>stdlib.hE<gt>\n"
793 "#include E<lt>sys/mman.hE<gt>\n"
794 "#include E<lt>sys/mount.hE<gt>\n"
795 "#include E<lt>sys/stat.hE<gt>\n"
796 "#include E<lt>sys/syscall.hE<gt>\n"
797 "#include E<lt>sys/wait.hE<gt>\n"
798 "#include E<lt>unistd.hE<gt>\n"
799 "\\&\n"
800 "static int\n"
801 "pivot_root(const char *new_root, const char *put_old)\n"
802 "{\n"
803 " return syscall(SYS_pivot_root, new_root, put_old);\n"
804 "}\n"
805 "\\&\n"
806 "#define STACK_SIZE (1024 * 1024)\n"
807 "\\&\n"
808 "static int /* Startup function for cloned child */\n"
809 "child(void *arg)\n"
810 "{\n"
811 " char path[PATH_MAX];\n"
812 " char **args = arg;\n"
813 " char *new_root = args[0];\n"
814 " const char *put_old = \"/oldrootfs\";\n"
815 "\\&\n"
816 " /* Ensure that \\[aq]new_root\\[aq] and its parent mount don\\[aq]t have\n"
817 " shared propagation (which would cause pivot_root() to\n"
818 " return an error), and prevent propagation of mount\n"
819 " events to the initial mount namespace. */\n"
820 "\\&\n"
821 " if (mount(NULL, \"/\", NULL, MS_REC | MS_PRIVATE, NULL) == -1)\n"
822 " err(EXIT_FAILURE, \"mount-MS_PRIVATE\");\n"
823 "\\&\n"
824 " /* Ensure that \\[aq]new_root\\[aq] is a mount point. */\n"
825 "\\&\n"
826 " if (mount(new_root, new_root, NULL, MS_BIND, NULL) == -1)\n"
827 " err(EXIT_FAILURE, \"mount-MS_BIND\");\n"
828 "\\&\n"
829 " /* Create directory to which old root will be pivoted. */\n"
830 "\\&\n"
831 " snprintf(path, sizeof(path), \"%s/%s\", new_root, put_old);\n"
832 " if (mkdir(path, 0777) == -1)\n"
833 " err(EXIT_FAILURE, \"mkdir\");\n"
834 "\\&\n"
835 " /* And pivot the root filesystem. */\n"
836 "\\&\n"
837 " if (pivot_root(new_root, path) == -1)\n"
838 " err(EXIT_FAILURE, \"pivot_root\");\n"
839 "\\&\n"
840 " /* Switch the current working directory to \"/\". */\n"
841 "\\&\n"
842 " if (chdir(\"/\") == -1)\n"
843 " err(EXIT_FAILURE, \"chdir\");\n"
844 "\\&\n"
845 " /* Unmount old root and remove mount point. */\n"
846 "\\&\n"
847 " if (umount2(put_old, MNT_DETACH) == -1)\n"
848 " perror(\"umount2\");\n"
849 " if (rmdir(put_old) == -1)\n"
850 " perror(\"rmdir\");\n"
851 "\\&\n"
852 " /* Execute the command specified in argv[1]... */\n"
853 "\\&\n"
854 " execv(args[1], &args[1]);\n"
855 " err(EXIT_FAILURE, \"execv\");\n"
856 "}\n"
857 "\\&\n"
858 "int\n"
859 "main(int argc, char *argv[])\n"
860 "{\n"
861 " char *stack;\n"
862 "\\&\n"
863 " /* Create a child process in a new mount namespace. */\n"
864 "\\&\n"
865 " stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,\n"
866 " MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);\n"
867 " if (stack == MAP_FAILED)\n"
868 " err(EXIT_FAILURE, \"mmap\");\n"
869 "\\&\n"
870 " if (clone(child, stack + STACK_SIZE,\n"
871 " CLONE_NEWNS | SIGCHLD, &argv[1]) == -1)\n"
872 " err(EXIT_FAILURE, \"clone\");\n"
873 "\\&\n"
874 " /* Parent falls through to here; wait for child. */\n"
875 "\\&\n"
876 " if (wait(NULL) == -1)\n"
877 " err(EXIT_FAILURE, \"wait\");\n"
878 "\\&\n"
879 " exit(EXIT_SUCCESS);\n"
880 "}\n"
881 msgstr ""
882 "/* pivot_root_demo.c */\n"
883 "\\&\n"
884 "#define _GNU_SOURCE\n"
885 "#include E<lt>err.hE<gt>\n"
886 "#include E<lt>limits.hE<gt>\n"
887 "#include E<lt>sched.hE<gt>\n"
888 "#include E<lt>signal.hE<gt>\n"
889 "#include E<lt>stdio.hE<gt>\n"
890 "#include E<lt>stdlib.hE<gt>\n"
891 "#include E<lt>sys/mman.hE<gt>\n"
892 "#include E<lt>sys/mount.hE<gt>\n"
893 "#include E<lt>sys/stat.hE<gt>\n"
894 "#include E<lt>sys/syscall.hE<gt>\n"
895 "#include E<lt>sys/wait.hE<gt>\n"
896 "#include E<lt>unistd.hE<gt>\n"
897 "\\&\n"
898 "static int\n"
899 "pivot_root(const char *new_root, const char *put_old)\n"
900 "{\n"
901 " return syscall(SYS_pivot_root, new_root, put_old);\n"
902 "}\n"
903 "\\&\n"
904 "#define STACK_SIZE (1024 * 1024)\n"
905 "\\&\n"
906 "static int /* Startfunktion für das geklonte Kind */\n"
907 "child(void *arg)\n"
908 "{\n"
909 " char path[PATH_MAX];\n"
910 " char **args = arg;\n"
911 " char *new_root = args[0];\n"
912 " const char *put_old = \"/oldrootfs\";\n"
913 "\\&\n"
914 " /* Sicherstellen, dass »neue_Wurzel« und dessen Elterneinhängung\n"
915 " keine gemeinsame Ausbreitung haben (was pivot_root() dazu bringen\n"
916 " würde, einen Fehler auszugeben) und die Ausbreitung von\n"
917 " Einhängeereignissen in den anfänglichen Namensraum zu verhindern. */\n"
918 "\\&\n"
919 " if (mount(NULL, \"/\", NULL, MS_REC | MS_PRIVATE, NULL) == -1)\n"
920 " err(EXIT_FAILURE, \"mount-MS_PRIVATE\");\n"
921 "\\&\n"
922 " /* Sicherstellen, dass »neue_Wurzel« ein Einhängepunkt ist. */\n"
923 "\\&\n"
924 " if (mount(new_root, new_root, NULL, MS_BIND, NULL) == -1)\n"
925 " err(EXIT_FAILURE, \"mount-MS_BIND\");\n"
926 "\\&\n"
927 " /* Ein Verzeichnis anlegen, zu dem die alte Wurzel hin umgeschwenkt wird. */\n"
928 "\\&\n"
929 " snprintf(path, sizeof(path), \"%s/%s\", new_root, put_old);\n"
930 " if (mkdir(path, 0777) == -1)\n"
931 " err(EXIT_FAILURE, \"mkdir\");\n"
932 "\\&\n"
933 " /* Und das Wurzeldateisystem umschwenken. */\n"
934 "\\&\n"
935 " if (pivot_root(new_root, path) == -1)\n"
936 " err(EXIT_FAILURE, \"pivot_root\");\n"
937 "\\&\n"
938 " /* Das aktuelle Arbeitsverzeichnis auf »/« ändern. */\n"
939 "\\&\n"
940 " if (chdir(\"/\") == -1)\n"
941 " err(EXIT_FAILURE, \"chdir\");\n"
942 "\\&\n"
943 " /* Die alte Wurzel aushängen und den Einhängepunkt entfernen.*/\n"
944 "\\&\n"
945 " if (umount2(put_old, MNT_DETACH) == -1)\n"
946 " perror(\"umount2\");\n"
947 " if (rmdir(put_old) == -1)\n"
948 " perror(\"rmdir\");\n"
949 "\\&\n"
950 " /* Den in argv[1] … angegebenen Befehl ausführen */\n"
951 "\\&\n"
952 " execv(args[1], &args[1]);\n"
953 " err(EXIT_FAILURE, \"execv\");\n"
954 "}\n"
955 "\\&\n"
956 "int\n"
957 "main(int argc, char *argv[])\n"
958 "{\n"
959 " char *stack;\n"
960 "\\&\n"
961 " /* Einen Kindprozess in einem neuen Einhängenamensraum erzeugen. */\n"
962 "\\&\n"
963 " stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,\n"
964 " MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);\n"
965 " if (stack == MAP_FAILED)\n"
966 " err(EXIT_FAILURE, \"mmap\");\n"
967 "\\&\n"
968 " if (clone(child, stack + STACK_SIZE,\n"
969 " CLONE_NEWNS | SIGCHLD, &argv[1]) == -1)\n"
970 " err(EXIT_FAILURE, \"clone\");\n"
971 "\\&\n"
972 " /* Elternprozess fällt bis hierher durch; wartet auf Kindprozess. */\n"
973 "\\&\n"
974 " if (wait(NULL) == -1)\n"
975 " err(EXIT_FAILURE, \"wait\");\n"
976 "\\&\n"
977 " exit(EXIT_SUCCESS);\n"
978 "}\n"
979
980 #. SRC END
981 #. type: SH
982 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
983 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
984 #, no-wrap
985 msgid "SEE ALSO"
986 msgstr "SIEHE AUCH"
987
988 #. type: Plain text
989 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
990 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
991 msgid ""
992 "B<chdir>(2), B<chroot>(2), B<mount>(2), B<stat>(2), B<initrd>(4), "
993 "B<mount_namespaces>(7), B<pivot_root>(8), B<switch_root>(8)"
994 msgstr ""
995 "B<chdir>(2), B<chroot>(2), B<mount>(2), B<stat>(2), B<initrd>(4), "
996 "B<mount_namespaces>(7), B<pivot_root>(8), B<switch_root>(8)"
997
998 #. type: TH
999 #: debian-trixie
1000 #, no-wrap
1001 msgid "2024-05-02"
1002 msgstr "2. Mai 2024"
1003
1004 #. type: TH
1005 #: debian-trixie
1006 #, no-wrap
1007 msgid "Linux man-pages 6.9.1"
1008 msgstr "Linux man-pages 6.9.1"
1009
1010 #. type: Plain text
1011 #: debian-trixie
1012 msgid "Standard C library (I<libc>, I<-lc>)"
1013 msgstr "Standard-C-Bibliothek (I<libc>, I<-lc>)"
1014
1015 #. type: Plain text
1016 #: debian-trixie fedora-44 fedora-rawhide
1017 msgid ""
1018 "B<pivot_root>() changes the root directory and the current working "
1019 "directory of each process or thread in the same mount namespace to "
1020 "I<new_root> if they point to the old root directory. (See also NOTES.) On "
1021 "the other hand, B<pivot_root>() does not change the caller's current "
1022 "working directory (unless it is on the old root directory), and thus it "
1023 "should be followed by a B<chdir(\"/\")> call."
1024 msgstr ""
1025 "B<pivot_root>() ändert das Wurzelverzeichnis und das aktuelle "
1026 "Arbeitsverzeichnis jedes Prozesses oder Threads im gleichen Namensraum in "
1027 "I<neue_Wurzel>, falls diese auf das alte Verzeichnis zeigen (siehe auch "
1028 "ANMERKUNGEN). Andererseits ändert B<pivot_root>() das aktuelle "
1029 "Arbeitsverzeichnis des Aufrufenden nicht (es sei denn, es ist das alte "
1030 "Wurzelverzeichnis), daher sollte darauf ein Aufruf von B<chdir(\"/\")> "
1031 "folgen."
1032
1033 #. type: Plain text
1034 #: debian-trixie fedora-44 fedora-rawhide
1035 msgid ""
1036 "I<put_old> must be at or underneath I<new_root>; that is, adding some "
1037 "nonnegative number of \"I</..>\" suffixes to the pathname pointed to by "
1038 "I<put_old> must yield the same directory as I<new_root>."
1039 msgstr ""
1040 "Die I<alte_Wurzel> muss sich unterhalb der I<neuen_Wurzel> befinden, das "
1041 "heißt, Hinzufügen einer nicht-negativen Anzahl von I</..> zum Pfadnamen, der "
1042 "auf die I<alte_Wurzel> zeigt, muss das gleiche Verzeichnis wie die "
1043 "I<neue_Wurzel> ergeben."
1044
1045 #. type: Plain text
1046 #: debian-trixie fedora-44 fedora-rawhide
1047 #, no-wrap
1048 msgid ""
1049 "$ B<mkdir /tmp/rootfs>\n"
1050 "$ B<ls -id /tmp/rootfs> # Show inode number of new root directory\n"
1051 "319459 /tmp/rootfs\n"
1052 "$ B<cp $(which busybox) /tmp/rootfs>\n"
1053 "$ B<PS1=\\[aq]bbsh$ \\[aq] sudo ./pivot_root_demo /tmp/rootfs /busybox sh>\n"
1054 "bbsh$ B<PATH=/>\n"
1055 "bbsh$ B<busybox ln busybox ln>\n"
1056 "bbsh$ B<ln busybox echo>\n"
1057 "bbsh$ B<ln busybox ls>\n"
1058 "bbsh$ B<ls>\n"
1059 "busybox echo ln ls\n"
1060 "bbsh$ B<ls -id /> # Compare with inode number above\n"
1061 "319459 /\n"
1062 "bbsh$ B<echo \\[aq]hello world\\[aq]>\n"
1063 "hello world\n"
1064 msgstr ""
1065 "$ B<mkdir /tmp/rootfs>\n"
1066 "$ B<ls -id /tmp/rootfs> # Inode-Anzahl des neuen Wurzelverzeichnisses zeigen\n"
1067 "319459 /tmp/rootfs\n"
1068 "$ B<cp $(which busybox) /tmp/rootfs>\n"
1069 "$ B<PS1=\\[aq]bbsh$ \\[aq] sudo ./pivot_root_demo /tmp/rootfs /busybox sh>\n"
1070 "bbsh$ B<PATH=/>\n"
1071 "bbsh$ B<busybox ln busybox ln>\n"
1072 "bbsh$ B<ln busybox echo>\n"
1073 "bbsh$ B<ln busybox ls>\n"
1074 "bbsh$ B<ls>\n"
1075 "busybox echo ln ls\n"
1076 "bbsh$ B<ls -id /> # Mit der Inode-Anzahl oben vergleichen\n"
1077 "319459 /\n"
1078 "bbsh$ B<echo \\[aq]Hallo Welt\\[aq]>\n"
1079 "Hallo Welt\n"
1080
1081 #. type: Plain text
1082 #: debian-trixie fedora-44 fedora-rawhide
1083 #, no-wrap
1084 msgid ""
1085 "/* pivot_root_demo.c */\n"
1086 "\\&\n"
1087 "#define _GNU_SOURCE\n"
1088 "#include E<lt>err.hE<gt>\n"
1089 "#include E<lt>limits.hE<gt>\n"
1090 "#include E<lt>sched.hE<gt>\n"
1091 "#include E<lt>signal.hE<gt>\n"
1092 "#include E<lt>stdio.hE<gt>\n"
1093 "#include E<lt>stdlib.hE<gt>\n"
1094 "#include E<lt>sys/mman.hE<gt>\n"
1095 "#include E<lt>sys/mount.hE<gt>\n"
1096 "#include E<lt>sys/stat.hE<gt>\n"
1097 "#include E<lt>sys/syscall.hE<gt>\n"
1098 "#include E<lt>sys/wait.hE<gt>\n"
1099 "#include E<lt>unistd.hE<gt>\n"
1100 "\\&\n"
1101 "static int\n"
1102 "pivot_root(const char *new_root, const char *put_old)\n"
1103 "{\n"
1104 " return syscall(SYS_pivot_root, new_root, put_old);\n"
1105 "}\n"
1106 "\\&\n"
1107 "#define STACK_SIZE (1024 * 1024)\n"
1108 "\\&\n"
1109 "static int /* Startup function for cloned child */\n"
1110 "child(void *arg)\n"
1111 "{\n"
1112 " char path[PATH_MAX];\n"
1113 " char **args = arg;\n"
1114 " char *new_root = args[0];\n"
1115 " const char *put_old = \"/oldrootfs\";\n"
1116 "\\&\n"
1117 " /* Ensure that \\[aq]new_root\\[aq] and its parent mount don\\[aq]t have\n"
1118 " shared propagation (which would cause pivot_root() to\n"
1119 " return an error), and prevent propagation of mount\n"
1120 " events to the initial mount namespace. */\n"
1121 "\\&\n"
1122 " if (mount(NULL, \"/\", NULL, MS_REC | MS_PRIVATE, NULL) == -1)\n"
1123 " err(EXIT_FAILURE, \"mount-MS_PRIVATE\");\n"
1124 "\\&\n"
1125 " /* Ensure that \\[aq]new_root\\[aq] is a mount point. */\n"
1126 "\\&\n"
1127 " if (mount(new_root, new_root, NULL, MS_BIND, NULL) == -1)\n"
1128 " err(EXIT_FAILURE, \"mount-MS_BIND\");\n"
1129 "\\&\n"
1130 " /* Create directory to which old root will be pivoted. */\n"
1131 "\\&\n"
1132 " snprintf(path, sizeof(path), \"%s/%s\", new_root, put_old);\n"
1133 " if (mkdir(path, 0777) == -1)\n"
1134 " err(EXIT_FAILURE, \"mkdir\");\n"
1135 "\\&\n"
1136 " /* And pivot the root filesystem. */\n"
1137 "\\&\n"
1138 " if (pivot_root(new_root, path) == -1)\n"
1139 " err(EXIT_FAILURE, \"pivot_root\");\n"
1140 "\\&\n"
1141 " /* Switch the current working directory to \"/\". */\n"
1142 "\\&\n"
1143 " if (chdir(\"/\") == -1)\n"
1144 " err(EXIT_FAILURE, \"chdir\");\n"
1145 "\\&\n"
1146 " /* Unmount old root and remove mount point. */\n"
1147 "\\&\n"
1148 " if (umount2(put_old, MNT_DETACH) == -1)\n"
1149 " perror(\"umount2\");\n"
1150 " if (rmdir(put_old) == -1)\n"
1151 " perror(\"rmdir\");\n"
1152 "\\&\n"
1153 " /* Execute the command specified in argv[1]... */\n"
1154 "\\&\n"
1155 " execv(args[1], &args[1]);\n"
1156 " err(EXIT_FAILURE, \"execv\");\n"
1157 "}\n"
1158 "\\&\n"
1159 "int\n"
1160 "main(int argc, char *argv[])\n"
1161 "{\n"
1162 " char *stack;\n"
1163 "\\&\n"
1164 " /* Create a child process in a new mount namespace. */\n"
1165 "\\&\n"
1166 " stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,\n"
1167 " MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);\n"
1168 " if (stack == MAP_FAILED)\n"
1169 " err(EXIT_FAILURE, \"mmap\");\n"
1170 "\\&\n"
1171 " if (clone(child, stack + STACK_SIZE,\n"
1172 " CLONE_NEWNS | SIGCHLD, &argv[1]) == -1)\n"
1173 " err(EXIT_FAILURE, \"clone\");\n"
1174 "\\&\n"
1175 " /* Parent falls through to here; wait for child. */\n"
1176 "\\&\n"
1177 " if (wait(NULL) == -1)\n"
1178 " err(EXIT_FAILURE, \"wait\");\n"
1179 "\\&\n"
1180 " exit(EXIT_SUCCESS);\n"
1181 "}\n"
1182 msgstr ""
1183 "/* pivot_root_demo.c */\n"
1184 "\\&\n"
1185 "#define _GNU_SOURCE\n"
1186 "#include E<lt>err.hE<gt>\n"
1187 "#include E<lt>limits.hE<gt>\n"
1188 "#include E<lt>sched.hE<gt>\n"
1189 "#include E<lt>signal.hE<gt>\n"
1190 "#include E<lt>stdio.hE<gt>\n"
1191 "#include E<lt>stdlib.hE<gt>\n"
1192 "#include E<lt>sys/mman.hE<gt>\n"
1193 "#include E<lt>sys/mount.hE<gt>\n"
1194 "#include E<lt>sys/stat.hE<gt>\n"
1195 "#include E<lt>sys/syscall.hE<gt>\n"
1196 "#include E<lt>sys/wait.hE<gt>\n"
1197 "#include E<lt>unistd.hE<gt>\n"
1198 "\\&\n"
1199 "static int\n"
1200 "pivot_root(const char *new_root, const char *put_old)\n"
1201 "{\n"
1202 " return syscall(SYS_pivot_root, new_root, put_old);\n"
1203 "}\n"
1204 "\\&\n"
1205 "#define STACK_SIZE (1024 * 1024)\n"
1206 "\\&\n"
1207 "static int /* Startfunktion für das geklonte Kind */\n"
1208 "child(void *arg)\n"
1209 "{\n"
1210 " char path[PATH_MAX];\n"
1211 " char **args = arg;\n"
1212 " char *new_root = args[0];\n"
1213 " const char *put_old = \"/oldrootfs\";\n"
1214 "\\&\n"
1215 " /* Sicherstellen, dass »neue_Wurzel« und dessen Elterneinhängung\n"
1216 " keine gemeinsame Ausbreitung haben (was pivot_root() dazu bringen\n"
1217 " würde, einen Fehler auszugeben) und die Ausbreitung von\n"
1218 " Einhängeereignissen in den anfänglichen Namensraum zu verhindern. */\n"
1219 "\\&\n"
1220 " if (mount(NULL, \"/\", NULL, MS_REC | MS_PRIVATE, NULL) == -1)\n"
1221 " err(EXIT_FAILURE, \"mount-MS_PRIVATE\");\n"
1222 "\\&\n"
1223 " /* Sicherstellen, dass »neue_Wurzel« ein Einhängepunkt ist. */\n"
1224 "\\&\n"
1225 " if (mount(new_root, new_root, NULL, MS_BIND, NULL) == -1)\n"
1226 " err(EXIT_FAILURE, \"mount-MS_BIND\");\n"
1227 "\\&\n"
1228 " /* Ein Verzeichnis anlegen, zu dem die alte Wurzel hin umgeschwenkt wird. */\n"
1229 "\\&\n"
1230 " snprintf(path, sizeof(path), \"%s/%s\", new_root, put_old);\n"
1231 " if (mkdir(path, 0777) == -1)\n"
1232 " err(EXIT_FAILURE, \"mkdir\");\n"
1233 "\\&\n"
1234 " /* Und das Wurzeldateisystem umschwenken. */\n"
1235 "\\&\n"
1236 " if (pivot_root(new_root, path) == -1)\n"
1237 " err(EXIT_FAILURE, \"pivot_root\");\n"
1238 "\\&\n"
1239 " /* Das aktuelle Arbeitsverzeichnis auf »/« ändern. */\n"
1240 "\\&\n"
1241 " if (chdir(\"/\") == -1)\n"
1242 " err(EXIT_FAILURE, \"chdir\");\n"
1243 "\\&\n"
1244 " /* Die alte Wurzel aushängen und den Einhängepunkt entfernen.*/\n"
1245 "\\&\n"
1246 " if (umount2(put_old, MNT_DETACH) == -1)\n"
1247 " perror(\"umount2\");\n"
1248 " if (rmdir(put_old) == -1)\n"
1249 " perror(\"rmdir\");\n"
1250 "\\&\n"
1251 " /* Den in argv[1] … angegebenen Befehl ausführen */\n"
1252 "\\&\n"
1253 " execv(args[1], &args[1]);\n"
1254 " err(EXIT_FAILURE, \"execv\");\n"
1255 "}\n"
1256 "\\&\n"
1257 "int\n"
1258 "main(int argc, char *argv[])\n"
1259 "{\n"
1260 " char *stack;\n"
1261 "\\&\n"
1262 " /* Einen Kindprozess in einem neuen Einhängenamensraum erzeugen. */\n"
1263 "\\&\n"
1264 " stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,\n"
1265 " MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);\n"
1266 " if (stack == MAP_FAILED)\n"
1267 " err(EXIT_FAILURE, \"mmap\");\n"
1268 "\\&\n"
1269 " if (clone(child, stack + STACK_SIZE,\n"
1270 " CLONE_NEWNS | SIGCHLD, &argv[1]) == -1)\n"
1271 " err(EXIT_FAILURE, \"clone\");\n"
1272 "\\&\n"
1273 " /* Elternprozess fällt bis hierher durch; wartet auf Kindprozess. */\n"
1274 "\\&\n"
1275 " if (wait(NULL) == -1)\n"
1276 " err(EXIT_FAILURE, \"wait\");\n"
1277 "\\&\n"
1278 " exit(EXIT_SUCCESS);\n"
1279 "}\n"
1280
1281 #. type: TH
1282 #: fedora-44 fedora-rawhide
1283 #, no-wrap
1284 msgid "2024-07-23"
1285 msgstr "23. Juli 2024"
1286
1287 #. type: TH
1288 #: fedora-44 fedora-rawhide
1289 #, no-wrap
1290 msgid "Linux man-pages 6.13"
1291 msgstr "Linux man-pages 6.13"
1292
1293 #. type: TH
1294 #: mageia-cauldron
1295 #, no-wrap
1296 msgid "Linux man-pages 6.17"
1297 msgstr "Linux man-pages 6.17"
1298
1299 #. type: TH
1300 #: opensuse-leap-16-1 opensuse-tumbleweed
1301 #, no-wrap
1302 msgid "Linux man-pages (unreleased)"
1303 msgstr "Linux man-pages (unveröffentlicht)"