Files
fedora-OEMDRV/install.md
T
Daniel unbrot Pätzold b978771206 confige: source dists defaults to for robustnes
and docs
2026-05-06 09:06:30 +02:00

79 lines
3.3 KiB
Markdown

# 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:
```bash
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:
```bash
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 export parameters are optional. That way, install.sh should know what to pull and use it for your new setup.
## After the script completes
At the end of the installation, you will be asked wheter to run configure.sh . You are encouraged to do this always.
But bevor letting `configure.sh` start, there are some options for making your life easier:
1. You can either get some `setup_system.conf` file from your system admin and put it to `/opt/sys_config/config` . That way all your settings will be prefilled the right way.
2. You may also use some preconfigured file from `config.d/configure.conf(.bak)` and put it to `config.d/configure.conf` - if thats existing from the first setup of this pc.
Pleas mind, that in the meantime your config may have changed dramatically, so this may be only a good choice if your last configure was not that long ago.
3. You may also configure your environment before manually:
```sh
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, paths and all you need
```
Mind, that this would be the job of `configure.sh`
4. Optionally add additional local per-machine overrides in `config.d/`:
```sh
# Example: always use the devel branch on this machine, no matter what was specified anywhere
echo 'export REPO_BRANCH="devel"' > /opt/sys_config/config.d/system_defines.conf
```
5. Otherwise, let `configure.sh` do it's job.
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) |