Skip to content
Search Anolis OS

    Browse this documentation

    Anolis OS kickstart unattended install: the OEMDRV fully-automated run and its pit chain

    The OEMDRV fully-automated install is the successful chain from three rounds of PVE debugging on 2026-11-06 (the ks file ships in the repo as scripts/lab/kickstarts/an23-server.ks); on 2026-11-14 the same mechanism ran again as an en_US OEMDRV rerun on VM 430 (anolis23-p2-ks-en-20261114/run.json — pit 6 comes from that round); the inst.ks network-injection variant was not tested (same principle, parameters below).

    1. The ks file (verified against Anolis 23.5)

    Section titled “1. The ks file (verified against Anolis 23.5)”
    #version=DEVEL
    graphical # keep the GUI during install (text also works)
    lang zh_CN.UTF-8
    keyboard us
    timezone Asia/Shanghai --utc
    rootpw --plaintext 'your-password' # see pit ④: fall back to %post chpasswd
    user --name=labuser --groups=wheel --plaintext --password='your-password'
    sshkey --username=labuser "ssh-ed25519 AAAA...your-public-key"
    services --enabled=sshd
    selinux --permissive # the distro's install default is permissive (measured)
    firewall --enabled --service=ssh
    url --url=https://mirrors.openanolis.cn/anolis/23/os/x86_64/os/ # pit ②: double-layer path
    network --bootproto=static --ip=192.168.2.239 --netmask=255.255.255.0 \
    --gateway=192.168.2.2 --nameserver=223.5.5.5 --device=link --activate \
    --hostname=anolis-ks # pit ⑤: device=link
    bootloader --timeout=5
    clearpart --all --initlabel
    autopart --type=lvm
    reboot --eject # pit ③: on VMs switch boot to disk manually after reboot
    %packages
    @core
    %end
    %post
    echo 'root:your-password' | chpasswd # pit ④ fallback
    mkdir -p /etc/ssh/sshd_config.d
    printf 'PermitRootLogin yes\nPasswordAuthentication yes\n' > /etc/ssh/sshd_config.d/60-lab.conf
    sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/;s/^PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config || true
    echo 'labuser ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/90-labuser
    chmod 440 /etc/sudoers.d/90-labuser
    %end

    The symptom when the ks lacks an install-source command: the summary screen shows "Installation Source" in red and "Software Selection" greyed out (screenshot)

    2. OEMDRV injection (no kernel args needed)

    Section titled “2. OEMDRV injection (no kernel args needed)”

    Pack ks.cfg into an ISO with the volume label OEMDRV and Anaconda finds it automatically (no inst.ks= required):

    Terminal window
    mkdir -p ksdrv && cp an23-server.ks ksdrv/ks.cfg
    genisoimage -quiet -V OEMDRV -o oemdrv-an23.iso -rJ ksdrv
    # PVE: mount it as a second CD-ROM (ide3); boot.iso stays on ide2

    The other injection method is the GRUB kernel argument inst.ks=<url or device path> — suited to PXE; not tested on this page.

    After the url fix the full run completed unattended (no manual steps, screenshots):

    Kickstart v3: automated install in progress, every summary entry grey-locked

    3. The visual way to confirm the ks took effect

    Section titled “3. The visual way to confirm the ks took effect”

    On the installation summary screen, entries covered by the ks render grey-locked (Root “set”, user “labuser will be created”); only entries missing a command turn interactive (pit ①). When everything is covered, clicking Begin Installation runs the whole install hands-free.

    4. Post-install verification (a closed loop)

    Section titled “4. Post-install verification (a closed loop)”
    Terminal window
    ssh labuser@<ip> hostname # anolis-ks (ks --hostname took effect)
    ssh labuser@<ip> cat /etc/pve-lab/scenario # the %post marker
    ssh labuser@<ip> getenforce # Permissive

    This site runs a 12-step first-hour journey as install acceptance (archived in run.json) — write your acceptance checks in the same reproducible shape.

    #SymptomCauseFix
    1Summary screen “Installation Source” redThe ks has no install-source commandAdd url --url=…
    2The url is right yet 404sThe 23-line repo is a double-layer pathUse anolis/23/os/<arch>/os/
    3After install the machine boots into the installer againPVE does not eject + CD-ROM-first bootDetach the CD-ROM / boot from disk
    4Root password does not log inrootpw measured not applied%post chpasswd fallback
    5network never activatesWrong device-name guess--device=link