hostname change not reflected in early boot process

Solution Verified - Updated -

Issue

  • Although I changed the hostname from testhost to rh89-01, the old hostname still appears in the early boot process. By checking journalctl -xb command, the new hostname appears only after Switching root entry like below:
Aug 20 16:29:50 testhost systemd[1]: Starting Switch Root...
-- Subject: Unit initrd-switch-root.service has begun start-up
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
-- 
-- Unit initrd-switch-root.service has begun starting up.
Aug 20 16:29:50 testhost systemd[1]: Switching root.
Aug 20 16:29:50 testhost systemd-journald[225]: Journal stopped
-- Subject: The journal has been stopped
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
-- 
-- The system journal process has shut down and closed all currently
-- active journal files.
Aug 20 16:29:52 rh89-01 kernel: printk: systemd: 16 output lines suppressed due to ratelimiting
Aug 20 16:29:52 rh89-01 kernel: audit: type=1404 audit(1724135390.503:2): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295 enabled>
Aug 20 16:29:52 rh89-01 kernel: SELinux:  policy capability network_peer_controls=1
Aug 20 16:29:52 rh89-01 kernel: SELinux:  policy capability open_perms=1
Aug 20 16:29:52 rh89-01 kernel: SELinux:  policy capability extended_socket_class=1
Aug 20 16:29:52 rh89-01 kernel: SELinux:  policy capability always_check_network=0
Aug 20 16:29:52 rh89-01 kernel: SELinux:  policy capability cgroup_seclabel=1
Aug 20 16:29:52 rh89-01 kernel: SELinux:  policy capability nnp_nosuid_transition=1

Environment

  • RHEL

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content