System startup error

I get this error when sysyem starts up. Anyone seen this. It’s when the services are starting up.

Failed to start User Manager for UID 42.

Run this command:
id 42
and see what system user is identified

I don’t have a user on my system with id 42. Not on Rocky 8 nor on Rocky 9. I do have The Hitchhikers Guide to the Galaxy, which does have quite a lot of references to “42” however :wink:

1 Like

Unfortunately i can’t login as root either to check user id 42. When i type my root password does not accept it. Will do some more digging next week and update ticket with my findings.

Maybe I’ll have to build a new computer to find out what id 42 is.

You don’t have to be root to run “id”

on Rocky I don’t have a user associated with uid 42. On fedora I get:

$ id 42
uid=42(gdm) gid=42(gdm) groups=42(gdm)

The failure you see in your original post may not be an issue at all. Of the things you use is something not working? I have a lot of failures listed on reboots for conditional tests that are not met because the reboot is not the “first boot”. There are a lot of conditional tests on boot that fail because the conditions aren’t met for their activation.

So i can’t get into a terminal.

In only see 1 fail which is the
Failed to start User Manager for UID 42.
I can’t login as root and no terminal available. If i try to remotely ssh into the system it does not accept my root password

What does Rocky have in package gdm?

[alma9]$ rpm -q --scripts gdm
preinstall scriptlet (using /bin/sh):
/usr/sbin/useradd -M -u 42 -d /var/lib/gdm -s /sbin/nologin -r gdm > /dev/null 2>&1
/usr/sbin/usermod -d /var/lib/gdm -s /sbin/nologin gdm >/dev/null 2>&1
# ignore errors, as we can't disambiguate between gdm already existed
# and couldn't create account with the current adduser.
exit 0
...

(Not having that package installed is a good explanation.)

/etc/login.defs has something like:

UID_MIN                  1000
UID_MAX                 60000
# System accounts
SYS_UID_MIN               201
SYS_UID_MAX               999

Packages, like gdm, may create “system” accounts.
Some use fixed uid. Those tend to be < SYS_UID_MIN.
Some take next unused uid from the [SYS_UID_MIN, SYS_UID_MAX] range.


Ctrl-Alt-F3 (or -F4) may switch to a virtual console.
Adding systemd.unit=wulti-user.target to GRUB entry’s kernel options before boot does get to virtual console too (without attemting to start any DM).

Note: The el9 by default prevents ssh to root with password; one should use ssh-keys. The installer did have option to enable password-authentication for root, but it is easy to miss (and is better to not enable anyway).

Don’t you have any other accounts? Ssh with them, if you do.

preinstall scriptlet (using /bin/sh):
/usr/sbin/useradd -M -u 42 -d /var/lib/gdm -s /sbin/nologin -r gdm > /dev/null 2>&1
/usr/sbin/usermod -d /var/lib/gdm -s /sbin/nologin gdm >/dev/null 2>&1
# ignore errors, as we can't disambiguate between gdm already existed
# and couldn't create account with the current adduser.
exit 0
postinstall scriptlet (using /bin/sh):
# if the user already has a config file, then migrate it to the new
# location; rpm will ensure that old file will be renamed

custom=/etc/gdm/custom.conf

if [ $1 -ge 2 ] ; then
    if [ -f /usr/share/gdm/config/gdm.conf-custom ]; then
        oldconffile=/usr/share/gdm/config/gdm.conf-custom
    elif [ -f /etc/X11/gdm/gdm.conf ]; then
        oldconffile=/etc/X11/gdm/gdm.conf
    fi

    # Comment out some entries from the custom config file that may
    # have changed locations in the update.  Also move various
    # elements to their new locations.

    [ -n "$oldconffile" ] && sed \
    -e 's@^command=/usr/X11R6/bin/X@#command=/usr/bin/Xorg@' \
    -e 's@^Xnest=/usr/X11R6/bin/Xnest@#Xnest=/usr/X11R6/bin/Xnest@' \
    -e 's@^BaseXsession=/etc/X11/xdm/Xsession@#BaseXsession=/etc/X11/xinit/Xsession@' \
    -e 's@^BaseXsession=/etc/X11/gdm/Xsession@#&@' \
    -e 's@^BaseXsession=/etc/gdm/Xsession@#&@' \
    -e 's@^Greeter=/usr/bin/gdmgreeter@#Greeter=/usr/libexec/gdmgreeter@' \
    -e 's@^RemoteGreeter=/usr/bin/gdmlogin@#RemoteGreeter=/usr/libexec/gdmlogin@' \
    -e 's@^GraphicalTheme=Bluecurve@#&@' \
    -e 's@^BackgroundColor=#20305a@#&@' \
    -e 's@^DefaultPath=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin@#&@' \
    -e 's@^RootPath=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin@#&@' \
    -e 's@^HostImageDir=/usr/share/hosts/@#HostImageDir=/usr/share/pixmaps/faces/@' \
    -e 's@^LogDir=/var/log/gdm@#&@' \
    -e 's@^PostLoginScriptDir=/etc/X11/gdm/PostLogin@#&@' \
    -e 's@^PreLoginScriptDir=/etc/X11/gdm/PreLogin@#&@' \
    -e 's@^PreSessionScriptDir=/etc/X11/gdm/PreSession@#&@' \
    -e 's@^PostSessionScriptDir=/etc/X11/gdm/PostSession@#&@' \
    -e 's@^DisplayInitDir=/var/run/gdm.pid@#&@' \
    -e 's@^RebootCommand=/sbin/reboot;/sbin/shutdown -r now;/usr/sbin/shutdown -r now;/usr/bin/reboot@#&@' \
    -e 's@^HaltCommand=/sbin/poweroff;/sbin/shutdown -h now;/usr/sbin/shutdown -h now;/usr/bin/poweroff@#&@' \
    -e 's@^ServAuthDir=/var/gdm@#&@' \
    -e 's@^Greeter=/usr/bin/gdmlogin@Greeter=/usr/libexec/gdmlogin@' \
    -e 's@^RemoteGreeter=/usr/bin/gdmgreeter@RemoteGreeter=/usr/libexec/gdmgreeter@' \
    $oldconffile > $custom
fi

if [ $1 -ge 2 -a -f $custom ] && grep -q /etc/X11/gdm $custom ; then
   sed -i -e 's@/etc/X11/gdm@/etc/gdm@g' $custom
fi


 
if [ $1 -eq 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then 
    # Initial installation 
    /usr/lib/systemd/systemd-update-helper install-system-units gdm.service || : 
fi
preuninstall scriptlet (using /bin/sh):

 
if [ $1 -eq 0 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then 
    # Package removal, not upgrade 
    /usr/lib/systemd/systemd-update-helper remove-system-units gdm.service || : 
fi
postuninstall program: /bin/sh
posttrans scriptlet (using /bin/sh):
dconf update || :
type or paste code here

Can’t switch to different console using the ctrl F3 or anyone other Fs . I just get a black screen then.

Booting to multi-user.target should be possible. There are no other accounts for ssh?


# journalctl | grep "User [M]anager"
Jan 04 10:12:17 ctt systemd[1]: Starting User Manager for UID 42...
Jan 04 10:12:17 ctt systemd[1]: Started User Manager for UID 42.
Jan 04 10:12:31 ctt systemd[1]: Starting User Manager for UID 1000...
Jan 04 10:12:32 ctt systemd[1]: Started User Manager for UID 1000.
Jan 04 10:12:53 ctt systemd[1]: Stopping User Manager for UID 42...
Jan 04 10:12:53 ctt systemd[1]: Stopped User Manager for UID 42.

On my machine’s log there is GDM starting at 10:12:17 (on boot), followed by
me logging in at 10:12:31, and then GDM stepping out a moment later (as there was no urgent need to switch user – the GDM would restart if I do start a switch or log out.)

no other accounts. When I edit the grub to get into the command prompt. I see the prompt type in the user name “root” and password and I then get an error saying “error in service module” and then I get back to the prompt to type the user name in.

Just want to point out the install I’m doing is a kickstart install using my own repos and not dvd. I do however get an error when kickstart is booting up that anaconda cant access my nfs mount for my kickstart file. This is very odd because the kickstart does read my file and its loads my repos and the software list and the install starts and installs all my packages listed in the kickstart file. The setup is exactly the same as my rocky 8.8 kickstart and I do not get this error. Anyone else had this issue as well and resolved it?

There might be changes in anaconda/kickstart syntax in el9.

I do drop ssh public key for root in my kickstarts, in order to ssh root@vm without password.
The kickstart does have sshkey keyword.

That actual Warning I get before I get vnc access to the kickstart is:
dracut-initqueue[1790]: cp: cannot stat ‘run/nfs_mnt0/ks.cfg/ks.cfg’ Not a directory
dracut-initqueue[1332]: Warning: anaconda: failed to fetch kickstart from nfs://servername/kickstart/system/files/ks.cfg

But it does load the files and finds it otherwise the kickstart would not start

could you give me an example how you do that in your kickstart script please

My PXEboot gives following option to kernel

inst.ks=nfs:ro,nfsvers=4:myserver.mydomain:/mirrors/kickstart/workstation.ks

and I have not spotted issue on boots.

The kickstart looks like:

graphical
%addon com_redhat_kdump --disable
%end

keyboard --vckeymap=fi-winkeys --xlayouts='fi (winkeys)'
lang en_US.UTF-8
url --url="https://www.nic.funet.fi/pub/mirrors/almalinux.org/9/BaseOS/x86_64/os"

%packages
@^minimal-environment
%end

firstboot --disable
skipx
timesource --ntp-server=ntp.mydomain
timezone Europe/Helsinki --utc
sshkey --username=root "ssh-ed25519 AAA..wN comment"

I tried to use NFS as source (local mirror), but did end up loading from nearest official mirror (with HTTPS).
I do also set partitioning manually as I have heterogenous collection of systems.
The kickstart file did start to evolve from copy taken from non-kickstart system (anaconda always writes one – the actual choices).

The “real install” (of most packages and config) is by Ansible playbooks that are run afterwards.

I have exactly that as well in my pxe file grub.cfg

menuentry ‘Install RockyLinux 9.3 Workstation Build’ --class fedora --class gnu-linux --class gnu --class os {
linuxefi /images/rocky9.3/pxeboot/vmlinuz ip=dhcp inst.ks=nfs:ro,nfsvers=3:myserver.mydomain:/system/ksbuild/setup/ks.cfg inst.vnc inst.vncpassword=password
initrdefi /images/rocky9.3/pxeboot/initrd.img
}

While system is installing I look at the anaconda logs:
I see:
#######Installer errors encountered during boot end ############
INF core.util: Reporting the IPMI event: 7
WRN misc: /usr/lib64/python3.9/site-packages/dbus/connection.py:337: DeprecationWarning: invalid escape sequence
“”"Arrange for the given function to be called when a signal matching

WRN misc: /usr/lib64/python3.9/site-packages/dbus/proxies.py:307: DeprecationWarning: invalid escape sequence
“”" Arrange for the given function to be called when the given signal

INF isys
WRN misc /usr/lib64/python3.9/subprocess.py:941: RuntimeWarning: line buffering (buffering=1) isn’t supported in binary mode, the default buffwer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)

also see WRN misc /usr/lib64/python3.9/site-packages/pyanaconda/core/configuration/anaconda.py:79: DeprecationWarning: The kickstart_modules configuration option is deprecated and will be removed in in the future.