Hello,

I've got a VPS through a2hosting it was running Debian 11 specifically
11.7. Long story short I just had to reinstall it after a hard week of
work so instead of doing it all over again on 11.7 I decided to
upgrade to 12.0. I used this:

https://www.makeuseof.com/upgrade-to-debian-12-bookworm-from-debian-11/

the upgrade itself went just fine. I set my time zone that stuck and
is persisting then went for the hostname, I am doing this via ssh, in
setting the hostname it won't persist through a reboot.

In the below output I've x-d out items like the device chasis ID and
the IP I've made it a 192.168.x.x address even tthough the actual
address is public.

The one thing I see and I don't know if this is related is when I
change the hostname with set-hostname hostnamectl -f and -i gives an
error.

#hostname
server.example.com

#hostname -f
server.example.com

#hostname -i
192.168.23.195

#hostname -s
server

#cat /etc/hostname
server.example.com

#cat /etc/hosts
127.0.0.1       localhost
# Auto-generated hostname. Please do not remove this comment.
192.168.23.195 server.example.com server

#hostnamectl set-hostname bookworm

#hostname
bookworm

#hostname -f
hostname: Name or service not known

#hostname -s
bookworm

#hostname -i
hostname: Name or service not known

#cat /etc/hosts
127.0.0.1       localhost
# Auto-generated hostname. Please do not remove this comment.
192.168.23.195 server.example.com server

#perl -i -p -e 's/server/bookworm/g;' /etc/hosts

#cat /etc/hosts
127.0.0.1       localhost
# Auto-generated hostname. Please do not remove this comment.
192.168.23.195 bookworm.example.com bookworm

#cat /etc/hostname
bookworm

#reboot

#cat /etc/hosts
127.0.0.1       localhost
# Auto-generated hostname. Please do not remove this comment.
192.168.23.195 server.example.com server

#cat /etc/hostname
server.example.com

#hostname
server.example.com

#hostname -f
server.example.com

#hostname -s
server

#hostname -i
192.168.23.195

I've googled and not seen this as a problem, I am quite perplexed.
Suggestions welcome.
Thanks.
Dave.

Reply via email to