2014-06-17 23:24:08 +04:00
<?xml version='1.0'?> <!-- * - nxml - * -->
< !DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
Copyright 2014 Anne LoVerso <anne.loverso @ s t u d e n t s . o l i n . e d u >
2018-01-30 22:26:26 +03:00
SPDX-License-Identifier: LGPL-2.0+
2014-06-17 23:24:08 +04:00
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
2021-12-07 04:20:55 +03:00
License along with this library. If not, see <https: / / w w w . g n u . o r g / l i c e n s e s /> .
2014-06-17 23:24:08 +04:00
-->
<refentry id= "ostree" >
<refentryinfo >
<title > ostree admin init-fs</title>
<productname > OSTree</productname>
<authorgroup >
<author >
<contrib > Developer</contrib>
<firstname > Colin</firstname>
<surname > Walters</surname>
<email > walters@verbum.org</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta >
<refentrytitle > ostree admin init-fs</refentrytitle>
<manvolnum > 1</manvolnum>
</refmeta>
<refnamediv >
<refname > ostree-admin-init-fs</refname>
<refpurpose > Initialize a new root filesystem</refpurpose>
</refnamediv>
<refsynopsisdiv >
<cmdsynopsis >
2014-11-29 20:15:21 +03:00
<command > ostree admin init-fs</command> <arg choice= "opt" rep= "repeat" > OPTIONS</arg> <arg choice= "req" > PATH</arg>
2014-06-17 23:24:08 +04:00
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 >
<title > Description</title>
<para >
2024-04-12 15:56:13 +03:00
Initialize an empty physical root filesystem in the designated PATH, with normal toplevels and correct permissions for each directory.
Primarily useful for operating system installers.
2014-06-17 23:24:08 +04:00
</para>
</refsect1>
2024-04-12 15:56:13 +03:00
<refsect1 >
<title > Options</title>
<variablelist >
<varlistentry >
<term > <option > --modern</option> </term>
<listitem > <para >
Equivalent to <literal > --epoch=1</literal> .
</para> </listitem>
</varlistentry>
<varlistentry >
<term > <option > --epoch</option> </term>
<listitem > <para >
This accepts an integer value in the range [0-1], inclusive. The default is zero
for compatibility.
</para>
<para >
When set to 1, the command will skip adding a number of toplevel "API filesystems"
such as <literal > /proc</literal>
to the toplevel of the physical root. These should be unnecessary, as they
should only be mounted in the final deployment root. The main exception
is <literal > /boot</literal> , which may need to be mounted in some setups
before the target root.
2024-04-12 23:10:36 +03:00
</para>
<para >
Epoch 2 is the same as 1, except that the toplevel <literal > ostree</literal>
directory is mode 0700, denying access from unprivileged code. This
is a new recommended best practice as it avoids access to old configuration
files in <literal > /etc</literal> in previous deployments, as well as
potentially old setuid binaries in <literal > /ostree/repo</literal> .
</para>
</listitem>
2024-04-12 15:56:13 +03:00
</varlistentry>
</variablelist>
</refsect1>
2014-06-17 23:24:08 +04:00
<refsect1 >
<title > Example</title>
<para > <command > $ mkdir /example</command> </para>
2024-04-12 15:56:13 +03:00
<para > <command > $ ostree admin init-fs --epoch=1 /example</command> </para>
2014-06-17 23:24:08 +04:00
<para > <command > $ ls /example </command> </para>
<para >
2024-04-12 15:56:13 +03:00
<emphasis > boot</emphasis>
2014-06-17 23:24:08 +04:00
</para>
</refsect1>
</refentry>