-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpm2img, release: create /local filesystem at runtime
Before this change, we created the /local filesystem on the data partition at image build time. With this change, we create the /local ext4 filesystem on BOTTLEROCKET-DATA at runtime. This helps align the initial filesystem parameters with derived defaults from the running host. The impact to boot time seems to be negligible.
- Loading branch information
Showing
5 changed files
with
29 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[Unit] | ||
Description=Prepare Local Filesystem (/local) | ||
DefaultDependencies=no | ||
Wants=dev-disk-by\x2dpartlabel-BOTTLEROCKET\x2dDATA.device | ||
After=dev-disk-by\x2dpartlabel-BOTTLEROCKET\x2dDATA.device | ||
RefuseManualStart=true | ||
RefuseManualStop=true | ||
|
||
[Service] | ||
Type=oneshot | ||
|
||
# Create the filesystem on the partition, if it doesn't exist. | ||
ExecStart=/usr/lib/systemd/systemd-makefs ext4 /dev/disk/by-partlabel/BOTTLEROCKET-DATA | ||
|
||
RemainAfterExit=true | ||
StandardError=journal+console | ||
|
||
# systemd-repart returns 77 if there's no existing GPT partition table | ||
SuccessExitStatus=77 | ||
|
||
[Install] | ||
WantedBy=local-fs.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters