ublue-os / bazzite

Bazzite is a cloud native image built upon Fedora Atomic Desktops that brings the best of Linux gaming to all of your devices - including your favorite handheld.
https://bazzite.gg
Apache License 2.0
4.12k stars 251 forks source link

Hostname not persisting #1718

Open git-mann opened 2 months ago

git-mann commented 2 months ago

Describe the bug

When I set the hostname on my system it does not persist after a reboot. I've tried setting the hostname:

to no avail; the output of hostname and the contents of /etc/hostname get reverted back to just: bazzite after a reboot.

("custom.fq.domain" is just a placeholder for my actual fully qualified domain)

What did you expect to happen?

I expected setting the static fully-qualified domain hostname to persist after reboots. I followed the methods described in the FAQ here.

Output of rpm-ostree status

State: idle
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-nvidia:stable
                   Digest: sha256:158bbced9de484d9e6a3acca9534be77d0becab8e7d4d828a75880024ef53340
                  Version: 40.20240922.0 (2024-09-23T05:05:17Z)
          LayeredPackages: freeipa-client

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-nvidia:stable
                   Digest: sha256:1e842af093ee4ffe69aab39ebab65dd529edb181d10543a522c421838e04e4eb
                  Version: 40.20240921.1 (2024-09-22T12:38:51Z)
          LayeredPackages: freeipa-client

Hardware

No response

Extra information or context

No response

Zeglius commented 2 months ago

Probably is because of this https://github.com/ublue-os/bazzite/blob/70436fbf02ecd6c2101426e16d10cf4a87067b9e/system_files/desktop/shared/usr/libexec/bazzite-hardware-setup#L267

Your hostname must be smaller than 20 characters, otherwise distrobox will break. bazzite is a fallback for long hostname cases

git-mann commented 2 months ago

Probably is because of this

https://github.com/ublue-os/bazzite/blob/70436fbf02ecd6c2101426e16d10cf4a87067b9e/system_files/desktop/shared/usr/libexec/bazzite-hardware-setup#L267

Your hostname must be smaller than 20 characters, otherwise distrobox will break. bazzite is a fallback for long hostname cases

My hostname was in-fact greater than 20 characters. I tried a shorter one and it worked as expected. This limitation should probably be documented on the FAQ entry I linked so that if others run into this they aren't just treated with the silent failure.

Also is there an issue that could be linked to distrobox's limitation? Thanks!