mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-25 20:42:17 +01:00
commit
b5ebd7e32e
@ -60,7 +60,9 @@ create_base_image() {
|
||||
# Zero all fs free space to make it more compressible so auto-update
|
||||
# payloads become smaller, not fatal since it won't work on linux < 3.2
|
||||
sudo fstrim "${root_fs_dir}" || true
|
||||
if [[ -d "${root_fs_dir}/media/state" ]]; then
|
||||
if [[ "${disk_layout}" == *-usr ]]; then
|
||||
sudo fstrim "${root_fs_dir}/usr" || true
|
||||
else
|
||||
sudo fstrim "${root_fs_dir}/media/state" || true
|
||||
fi
|
||||
|
||||
|
||||
@ -36,9 +36,21 @@ install_dev_packages() {
|
||||
sudo mkdir -p "${root_fs_dir}/root"
|
||||
sudo touch "${root_fs_dir}/root/.dev_mode"
|
||||
|
||||
# Remount the system partition read-write by default.
|
||||
# The remount services are provided by coreos-base/coreos-init
|
||||
local fs_wants="${root_fs_dir}/usr/lib/systemd/system/local-fs.target.wants"
|
||||
sudo mkdir -p "${fs_wants}"
|
||||
if [[ "${disk_layout}" == *-usr ]]; then
|
||||
sudo ln -s ../remount-usr.service "${fs_wants}"
|
||||
else
|
||||
sudo ln -s ../remount-root.service "${fs_wants}"
|
||||
fi
|
||||
|
||||
# Zero all fs free space, not fatal since it won't work on linux < 3.2
|
||||
sudo fstrim "${root_fs_dir}" || true
|
||||
if [[ -d "${root_fs_dir}/media/state" ]]; then
|
||||
if [[ "${disk_layout}" == *-usr ]]; then
|
||||
sudo fstrim "${root_fs_dir}/usr" || true
|
||||
else
|
||||
sudo fstrim "${root_fs_dir}/media/state" || true
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user