When deploying openSUSE Tumbleweed on bare-metal hardware using the Agama installer, certain GPU and HDMI monitor combinations can stall at the SDDM login screen after the first reboot. Below is one practical method which brings you to text login with screen resolution 1920x1080 and automatically starts KDE Plasma 6.8.2 upon login into system.
Unattended Agama installation was done via profile.json shown below. There are, actually, two approaches to manage Officially proposed way via remote Python Web Server either via "scp" pofile.json to Agama Live Instance on target host see https://lxer.com/module/newswire/view/369048/index.html
boris@localhost:~/Downloads> cat profile.json (*)
{
"product": {
"id": "Tumbleweed"
},
"software": {
"patterns": {
"add": [
"kde",
"selinux",
"kvm_tools"
],
"remove": [
"office"
]
}
},
"storage": {
"boot": {
"configure": true
},
"drives": [
{
"partitions": [
{
"filesystem": {
"mountOptions": [],
"path": "/boot/efi",
"reuseIfPossible": false,
"type": "vfat"
},
"id": "esp",
"size": {
"max": 1073741824,
"min": 1073741824
}
},
{
"filesystem": {
"mountOptions": [],
"path": "/boot",
"reuseIfPossible": false,
"type": "ext4"
},
"size": {
"max": 2684354560,
"min": 2684354560
}
},
{
"filesystem": {
"mountOptions": [],
"path": "/",
"reuseIfPossible": false,
"type": {
"btrfs": {
"snapshots": true
}
}
},
"size": {
"max": 274877906944,
"min": 274877906944
}
},
{
"filesystem": {
"mountOptions": [],
"path": "/opt",
"reuseIfPossible": false,
"type": "xfs"
},
"size": {
"max": 274877906944,
"min": 274877906944
}
},
{
"delete": true,
"search": {
"ifNotFound": "skip"
}
}
],
"search": {
"condition": {
"name": "/dev/sda"
},
"ifNotFound": "error"
}
}
],
"mdRaids": [],
"volumeGroups": []
},
"user": {
"fullName": "boris",
"password": "***********",
"hashedPassword": false,
"userName": "boris",
"sshPublicKeys": []
},
"root": {
"password": "************",
"hashedPassword": false,
"sshPublicKeys": [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO8Q7QV5JPnWRoIla0fPJ7doo8Cz/cIz9KRZuVBq1Pe0 name@example.com"
]
},
"scripts": {
"post": [
{
"name": "secure-login-with-autostart",
"chroot": false,
"content": "#!/usr/bin/bash\n\nTARGET_ROOT=\"/mnt\"\n\n# 1. Force standard text m
ode\nsystemctl --root=\"$TARGET_ROOT\" disable sddm.service --force\nsystemctl --root=\"$
TARGET_ROOT\" set-default multi-user.target\n\n# 2. Append auto-launch to global bash pro
file (bypasses user home folders)\ncat << 'EOF' >> \"$TARGET_ROOT/etc/profile\"\n\n# Auto
matically launch KDE Plasma Wayland for ANY user logging in on TTY1\nif [ -z \"${DISPLAY}
\" ] && [ \"${XDG_VTNR}\" -eq 1 ]; then\n exec /usr/bin/startplasma-wayland\nfi\nEOF\n
"
}
]
}
}
==================
Verification "scripts"
==================
boris@localhost:~/Downloads> jq -r '.scripts.post[0].content' profile.json
#!/usr/bin/bash
TARGET_ROOT="/mnt"
# 1. Force standard text mode
systemctl --root="$TARGET_ROOT" disable sddm.service --force
systemctl --root="$TARGET_ROOT" set-default multi-user.target
# 2. Append auto-launch to global bash profile (bypasses user home folders)
cat << 'EOF' >> "$TARGET_ROOT/etc/profile"
# Automatically launch KDE Plasma Wayland for ANY user logging in on TTY1
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
exec /usr/bin/startplasma-wayland
fi
EOF
Feel free to verify it on bare metal
By placing this block inside the global /etc/profile, we implemented an incredibly safe mechanism:
• If a person connects to the machine remotely via SSH, ${XDG_VTNR} will be empty or set to a pseudo-terminal identifier (like pts/0), so the script will skip launching Plasma.
• If a user logs into another virtual console (like pressing Ctrl+Alt+F2 to troubleshoot on TTY2), ${XDG_VTNR} will equal 2, so the script will skip launching Plasma.
Key Characteristics of "chroot": false
• File System Paths: Because it runs in the installer environment,
the newly installed system's root directory is not at /. Instead,
you must access the installed system via its mount point inside
the installer (typically under /mnt or a similar installer-defined mount path).
• Available Tooling: The script relies entirely on the binaries,
libraries, and utilities available on the Agama live installer media
rather than what was just installed on the target disk.
• Network & Environment: It operates with the network configuration and environment variables of the active installation session.
It only fires when someone physically sits at the machine (or via an active console stream) and logs into the primary TTY1 interface.
REFERENCES
(*) Assisted by Google AI

No comments:
Post a Comment