Ask Your Question

Revision history [back]

F22: how to change /dev/fedora_BadHostname directory to /dev/fedora_GoodHostname?

Hi! I just installed Fedora 22, and the installer apparently guessed my hostname poorly. I corrected the hostname easily (via hostnamectl), but the "bad-hostname" still appears as the logical name of the disk devices: on bootup, udev (I assume) creates the following directory and symlinks:

 /dev/fedora_BadHostname/home -> ../dm-5
 /dev/fedora_BadHostname/root -> ../dm-0
 /dev/fedora_BadHostname/swap -> ../dm-1

These /dev/fedora_BadHostname/* aliases then appear in other (more-visible) places, like /etc/fstab and the Disk Utility. I'd like the system to use "fedora_GoodHostname" instead, but I can't find out where "BadHostname" is coming from.

I think the ultimate origin is the grub2 configuration, because /etc/grub2.cfg has the BadHostname impregnated in it, which in turn may be coming from /etc/sysconfig/grub, because I see this:

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora_BadHostname/root rd.lvm.lv=fedora_BadHostname/swap rhgb quiet"
GRUB_DISABLE_RECOVERY="true"

But (1) I'm hella scared about modifying this file without understanding what I'm doing, and (2) I see "root" and "swap" but not "home", which makes me think I'm still missing a piece of the puzzle.

Can anyone give me some guidance on what to do? Thanks!