Files
fedora-OEMDRV/install.md
T
Daniel unbrot Pätzold 8652131882 inc.sh: use BASH_SOURCE for path resolution; add --missingconfok; fix install.sh sourcing and git pull logic
setup_system.inc.sh: replace $(dirname "$0") with $(dirname "${BASH_SOURCE[0]:-$0}") so
paths resolve correctly whether the file is sourced or executed directly. Add --missingconfok
flag to warn-and-continue instead of prompting+aborting when config is missing. Fix machine_uuid
path (missing ../). Move `source config` into the else branch so it is not reached when
missingconfok skips the exit.

install.sh: source inc.sh instead of executing it as a subprocess so exported variables
(REPO_URL etc.) propagate back to the caller. Fix git-origin conflict handling: when reusing
an existing OEMDRV partition the user has already confirmed they want to keep it, so remove
the "fresh clone / wipe" option entirely. Now always pulls (fetch+checkout) when a git repo
is present; clears and fresh-clones only when no git repo exists on the partition.

basic_pre_script.inc: dot-source inc.sh so INSTALLDOCS and other config vars are available.

config.dist, sync_client_software.sh: rename UPGRADEURL/UPGRADEBRANCH to REPO_URL/REPO_BRANCH
to match the variable names already used in install.sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 18:42:12 +02:00

2.4 KiB

OEMDRV Bootstrap — install.sh

the script ./system_setup/install.sh prepares a target machine for automated Fedora deployment. It shrinks an existing partition to carve out a dedicated OEMDRV partition, which Anaconda/Kickstart will detect automatically during installation.

What it does

  1. Lists all ext4 and btrfs partitions that have enough free space to be shrunk.
  2. Asks you to select one and shrinks it by 4 GiB.
  3. Creates a new 4 GiB BTRFS partition labeled OEMDRV in the freed space.
  4. Mounts it to /opt/sys_config with compress=zstd:6.
  5. Clones this repository (depth 1) into /opt/sys_config.

Prerequisites

  • Run as root on the target machine (live system or installed OS).
  • The following tools must be present: parted, e2fsck, resize2fs or btrfs-progs, mkfs.btrfs, git, curl.
  • The partition you want to shrink must not be the root filesystem (/) and must have at least 4.5 GiB free.
  • Network access to gitea.dtext.online.

Run directly from the repository

Download the script first, then run it as root:

curl -fsSL https://gitea.dtext.online/obel1x/fedora-OEMDRV/raw/branch/main/system_setup/install.sh -o /tmp/install.sh
sudo bash /tmp/install.sh

Run directly from another repository

If you are on another fork or branch and you want to test your changes, do:

export REPO_URL="https://yourgitserver.tld/.../fedora-OEMDRV.git"
export REPO_BRANCH="anotherbranch"
curl -fsSL ${REPO_URL%.git}/raw/branch/${REPO_BRANCH:-main}/system_setup/install.sh -o /tmp/install.sh
sudo -E bash /tmp/install.sh

Both are optional. That way, install.sh should know what to pull.

After the script completes

Configure your environment before running any installation:

cp /opt/sys_config/system_setup/config.dist/setup_system.conf.dist /opt/sys_config/config/setup_system.conf
# Edit setup_system.conf — set TLDOMAIN, SERVERFQDN_IPA, SERVERFQDN_NC, and paths.

Optionally add local per-machine overrides in config.d/:

# Example: use the devel branch on this machine
echo 'export REPO_BRANCH="devel"' > /opt/sys_config/config.d/system_defines.conf

Once configured, boot the Fedora installer from USB — Anaconda will detect the OEMDRV partition and run the Kickstart automatically.

Supported filesystems for shrinking

Filesystem Method
ext4 e2fsck + resize2fs (offline)
btrfs btrfs filesystem resize (temporary mount)