Skip to content

Commit 9b50239

Browse files
committed
Split dsik layout section into its own page
1 parent 133cddd commit 9b50239

File tree

3 files changed

+67
-67
lines changed

3 files changed

+67
-67
lines changed

modules/ROOT/nav.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
** link:https://coreos.github.io/butane/specs/[Butane Specification]
2525
** xref:remote-ign.adoc[Using a remote Ignition config]
2626
* Storage Configuration
27+
** xref:disk-layout.adoc[Default layout]
2728
** xref:storage.adoc[Configuring Storage]
2829
* Network Configuration
2930
** xref:sysconfig-network-configuration.adoc[Network Configuration]

modules/ROOT/pages/disk-layout.adoc

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
= Default disk layout, partition tables and filesystems and mount points
2+
3+
All Fedora CoreOS systems start with the same disk image which varies slightly between architectures based on what is needed for bootloading. On first boot the root filesystem is expanded to fill the rest of the disk. The disk image can be customized using Butane configs to repartition the disk and create/reformat filesystems. Bare metal installations are not different; the installer only copies the raw image to the target disk and injects the specified config into `/boot` for use on first boot.
4+
5+
NOTE: See xref:storage.adoc#_reconfiguring_the_root_filesystem[Reconfiguring the root filesystem] for examples regarding the supported changes to the root partition.
6+
7+
== Partition Tables
8+
9+
Using partition numbers to refer to specific partitions is discouraged and labels or UUIDs should be used instead. Fedora CoreOS reserves the `boot`, `boot-<number>`, `root`, `root-<number>`, `BIOS-BOOT`, `bios-<number>`, `EFI-SYSTEM`, and `esp-<number>` labels, and the `md-boot` and `md-root` RAID device names. Creating partitions, filesystems, or RAID devices with those labels is not supported.
10+
11+
== x86_64 Partition Table
12+
13+
The x86_64 disk image is GPT formatted with a protective MBR. It supports booting via both BIOS and UEFI (including Secure Boot).
14+
15+
The partition table layout has changed over time. The current layout is:
16+
17+
.Partition Table for x86_64
18+
|============================================================================================
19+
| Number | Label | Description | Partition Type
20+
| 1 | BIOS-BOOT | Contains BIOS GRUB image | raw data
21+
| 2 | EFI-SYSTEM | Contains EFI GRUB image and Secure Boot shim | FAT32
22+
| 3 | boot | Contains GRUB configuration, kernel/initramfs images | ext4
23+
| 4 | root | Contains the root filesystem | xfs
24+
|============================================================================================
25+
26+
The EFI-SYSTEM partition can be deleted or reformatted when BIOS booting. Similarly, the BIOS-BOOT partition can be deleted or reformatted when EFI booting.
27+
28+
== Mounted Filesystems
29+
30+
Fedora CoreOS uses OSTree, which is a system for managing multiple bootable operating system trees that share storage. Each operating system version is part of the `/` filesystem. All deployments share the same `/var` which can be on the same filesystem, or mounted separately.
31+
32+
This shows the default mountpoints for a Fedora CoreOS system installed on a `/dev/vda` disk:
33+
34+
.Default mountpoints on x86_64
35+
[source,bash]
36+
----
37+
$ findmnt --real # Some details are elided
38+
TARGET SOURCE FSTYPE OPTIONS
39+
/ /dev/vda4[/ostree/deploy/fedora-coreos/deploy/$hash] xfs rw
40+
|-/sysroot /dev/vda4 xfs ro
41+
|-/etc /dev/vda4[/ostree/deploy/fedora-coreos/deploy/$hash/etc] xfs rw
42+
|-/usr /dev/vda4[/ostree/deploy/fedora-coreos/deploy/$hash/usr] xfs ro
43+
|-/var /dev/vda4[/ostree/deploy/fedora-coreos/deploy/var] xfs rw
44+
`-/boot /dev/vda3 ext4 ro
45+
----
46+
47+
The EFI System Partition was formerly mounted on `/boot/efi`, but this is no longer the case. On systems configured with boot device mirroring, there are independent EFI partitions on each constituent disk.
48+
49+
== Immutable `/`, read only `/usr`
50+
51+
As OSTree is used to manage all files belonging to the operating system, the `/` and `/usr` mountpoints are not writable. Any changes to the operating system should be applied via https://coreos.github.io/rpm-ostree/administrator-handbook/[`rpm-ostree`].
52+
53+
Similarly, the `/boot` mountpoint is not writable, and the EFI System Partition is not mounted by default. These filesystems are managed by `rpm-ostree` and `bootupd`, and must not be directly modified by an administrator.
54+
55+
Adding top level directories (i.e. `/foo`) is currently unsupported and disallowed by the immutable attribute.
56+
57+
The *real* `/` (as in the root of the filesystem in the `root` partition) is mounted readonly in `/sysroot` and must not be accessed or modified directly.
58+
59+
== Configuration in `/etc` and state in `/var`
60+
61+
The only supported writable locations are `/etc` and `/var`. `/etc` should contain only configuration files and is not expected to store data. All data must be kept under `/var` and will not be touched by system upgrades. Traditional places that might hold state (e.g. `/home`, or `/srv`) are symlinks to directories in `/var` (e.g. `/var/home` or `/var/srv`).
62+
63+
== Version selection and bootup
64+
65+
A GRUB menu entry is created for each version of Fedora CoreOS currently available on a system. This menu entry references an `ostree` deployment which consists of a Linux kernel, an initramfs and a hash linking to an `ostree` commit (passed via the `ostree=` kernel argument). During bootup, `ostree` will read this kernel argument to determine which deployment to use as the root filesystem. Each update or change to the system (package installation, addition of kernel arguments) creates a new deployment. This enables rolling back to a previous deployment if the update causes problems.

modules/ROOT/pages/storage.adoc

+1-67
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= Configuring Storage
22

3-
Fedora CoreOS ships with a simple default storage layout: the root partition is the last one and expands to take the full size of the disk. Apart from the boot partition, all data is stored on the root partition. See the xref:#_disk_layout[Disk layout section] for more details.
3+
Fedora CoreOS ships with a simple default storage layout: the root partition is the last one and expands to take the full size of the disk. Apart from the boot partition, all data is stored on the root partition. See the xref:disk-layout.adoc[Disk layout] page for more details.
44

55
Below, we provide examples of various ways you can customize this.
66

@@ -547,69 +547,3 @@ storage:
547547
wipe_filesystem: true
548548
with_mount_unit: true
549549
----
550-
551-
== Disk Layout
552-
553-
All Fedora CoreOS systems start with the same disk image which varies slightly between architectures based on what is needed for bootloading. On first boot the root filesystem is expanded to fill the rest of the disk. The disk image can be customized using Butane configs to repartition the disk and create/reformat filesystems. Bare metal installations are not different; the installer only copies the raw image to the target disk and injects the specified config into `/boot` for use on first boot.
554-
555-
NOTE: See xref:#_reconfiguring_the_root_filesystem[Reconfiguring the root filesystem] for examples regarding the supported changes to the root partition.
556-
557-
=== Partition Tables
558-
559-
Using partition numbers to refer to specific partitions is discouraged and labels or UUIDs should be used instead. Fedora CoreOS reserves the `boot`, `boot-<number>`, `root`, `root-<number>`, `BIOS-BOOT`, `bios-<number>`, `EFI-SYSTEM`, and `esp-<number>` labels, and the `md-boot` and `md-root` RAID device names. Creating partitions, filesystems, or RAID devices with those labels is not supported.
560-
561-
=== x86_64 Partition Table
562-
563-
The x86_64 disk image is GPT formatted with a protective MBR. It supports booting via both BIOS and UEFI (including Secure Boot).
564-
565-
The partition table layout has changed over time. The current layout is:
566-
567-
.Partition Table for x86_64
568-
|============================================================================================
569-
| Number | Label | Description | Partition Type
570-
| 1 | BIOS-BOOT | Contains BIOS GRUB image | raw data
571-
| 2 | EFI-SYSTEM | Contains EFI GRUB image and Secure Boot shim | FAT32
572-
| 3 | boot | Contains GRUB configuration, kernel/initramfs images | ext4
573-
| 4 | root | Contains the root filesystem | xfs
574-
|============================================================================================
575-
576-
The EFI-SYSTEM partition can be deleted or reformatted when BIOS booting. Similarly, the BIOS-BOOT partition can be deleted or reformatted when EFI booting.
577-
578-
== Mounted Filesystems
579-
580-
Fedora CoreOS uses OSTree, which is a system for managing multiple bootable operating system trees that share storage. Each operating system version is part of the `/` filesystem. All deployments share the same `/var` which can be on the same filesystem, or mounted separately.
581-
582-
This shows the default mountpoints for a Fedora CoreOS system installed on a `/dev/vda` disk:
583-
584-
.Default mountpoints on x86_64
585-
[source,bash]
586-
----
587-
$ findmnt --real # Some details are elided
588-
TARGET SOURCE FSTYPE OPTIONS
589-
/ /dev/vda4[/ostree/deploy/fedora-coreos/deploy/$hash] xfs rw
590-
|-/sysroot /dev/vda4 xfs ro
591-
|-/etc /dev/vda4[/ostree/deploy/fedora-coreos/deploy/$hash/etc] xfs rw
592-
|-/usr /dev/vda4[/ostree/deploy/fedora-coreos/deploy/$hash/usr] xfs ro
593-
|-/var /dev/vda4[/ostree/deploy/fedora-coreos/deploy/var] xfs rw
594-
`-/boot /dev/vda3 ext4 ro
595-
----
596-
597-
The EFI System Partition was formerly mounted on `/boot/efi`, but this is no longer the case. On systems configured with boot device mirroring, there are independent EFI partitions on each constituent disk.
598-
599-
=== Immutable `/`, read only `/usr`
600-
601-
As OSTree is used to manage all files belonging to the operating system, the `/` and `/usr` mountpoints are not writable. Any changes to the operating system should be applied via https://coreos.github.io/rpm-ostree/administrator-handbook/[`rpm-ostree`].
602-
603-
Similarly, the `/boot` mountpoint is not writable, and the EFI System Partition is not mounted by default. These filesystems are managed by `rpm-ostree` and `bootupd`, and must not be directly modified by an administrator.
604-
605-
Adding top level directories (i.e. `/foo`) is currently unsupported and disallowed by the immutable attribute.
606-
607-
The *real* `/` (as in the root of the filesystem in the `root` partition) is mounted readonly in `/sysroot` and must not be accessed or modified directly.
608-
609-
=== Configuration in `/etc` and state in `/var`
610-
611-
The only supported writable locations are `/etc` and `/var`. `/etc` should contain only configuration files and is not expected to store data. All data must be kept under `/var` and will not be touched by system upgrades. Traditional places that might hold state (e.g. `/home`, or `/srv`) are symlinks to directories in `/var` (e.g. `/var/home` or `/var/srv`).
612-
613-
=== Version selection and bootup
614-
615-
A GRUB menu entry is created for each version of Fedora CoreOS currently available on a system. This menu entry references an `ostree` deployment which consists of a Linux kernel, an initramfs and a hash linking to an `ostree` commit (passed via the `ostree=` kernel argument). During bootup, `ostree` will read this kernel argument to determine which deployment to use as the root filesystem. Each update or change to the system (package installation, addition of kernel arguments) creates a new deployment. This enables rolling back to a previous deployment if the update causes problems.

0 commit comments

Comments
 (0)