Description of problem: Hostname is not getting set correctly at bootup. When I kickstart a F35 vm, the first time it boots it gets its hostname via reverse DNS. After the first reboot, the hostname is set to "fedora" with no domain name. Version-Release number of selected component (if applicable): Fedora 35 How reproducible: Kickstart a minimal VM with F35. Steps to Reproduce: 1. Kickstart a VM with @core only 2. Boot system 3. Hostname is set the first time, but at reboot it's set to "fedora" Actual results: hostname set to "fedora" but should be set via reverse DNS. Expected results: hostname should be set to whatever reverse DNS resolves to. Additional info: This has been discussed on the Fedora mailing list at https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org/thread/B57BG5VVSLHQ345A5NTR6E3OEUF6K7FH/ - see that thread for multiple examples including videos I posted explaining the weird behavior.
One interesting thing to note is that when I kickstart the machine, while the kickstart is going on, the hostname is set correctly via reverse DNS. Once the system boots up and I log in, it's set to "fedora" instead of hostxxx.domain.tld. If I disable systemd-resolved.service and reboot, then the hostname is set to hostxxx.domain.tld again.
This is the ks.cfg I'm using for my kickstart: [root@dixie-flatline templates]# cat f35ks.cfg text reboot # Keyboard layouts keyboard --vckeymap=us --xlayouts='us' # System language lang en_US.UTF-8 url --url="http://172.31.100.28/cblr/links/f35server-x86_64" repo --name=Everything --baseurl=https://mirrors.kernel.org/fedora/updates/35/Everything/x86_64/ repo --name=Modular --baseurl=https://mirrors.kernel.org/fedora/updates/35/Modular/x86_64/ %packages @core bash-completion bind-utils vim-default-editor -nano-default-editor -firewalld.noarch %end # Run the Setup Agent on first boot firstboot --enable # Generated using Blivet version 3.4.2 # ignoredisk --only-use=vda # Partition clearing information clearpart --all --initlabel # Disk partitioning information autopart --type=plain timesource --ntp-server=grom.polpo.org timesource --ntp-server=clock.fmt.he.net timesource --ntp-server=50-39-230-98.bvtn.or.ptr.ziplyfiber.com timesource --ntp-server=time.cloudflare.com # System timezone timezone America/Chicago --utc # Root password rootpw --iscrypted [REDACTED] user --groups=wheel --name=thomas.cameron --password=[REDACTED] --iscrypted --gecos="Thomas Cameron" %post yum -y install iptables-services systemctl enable iptables.service %end
Thank you for reporting this. This is not hostname package to blame though. The package set hostname which was specified as the argument and it's the `caller` responsible for this. Even more hostnamectl should be used in modern Fedora's, not hostname. According to https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org/message/LZXWCOPN6KAN2RUWWITSL75UBA3R7QVM/ the bug report should be filled against systemd-resolved component, not hostname.
systemd-resolved doesn't show up as a component against which I can file a BZ
This message is a reminder that Fedora Linux 35 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '35'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 35 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13. Fedora Linux 35 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.