1

I've just finished installing CentOS on a fresh disk. I did it in a slightly unconventional mannner - by running a complete yum install in a chroot from Debian. So I had a few problems getting grub and fstab right. But now I think I'm blocked.

cat /etc/redhat-release 

CentOS Linux release 7.1.1503 (Core)

The system starts up (all green OKs on the screen while booting), but I can't log in to a tty - when I type a username and password the screen refreshes with the username prompt. I can log in to both accounts through a chroot, so that's not the problem.

Here's the (I think) relevant bit of /var/log/messages:

Sep 16 01:45:01 localhost systemd: Starting Multi-User System.
Sep 16 01:45:01 localhost systemd: Reached target Multi-User System.
Sep 16 01:45:01 localhost systemd: Starting Graphical Interface.
Sep 16 01:45:01 localhost systemd: Reached target Graphical Interface.
Sep 16 01:45:01 localhost systemd: Starting Update UTMP about System Runlevel Changes...
Sep 16 01:45:01 localhost systemd: Starting Stop Read-Ahead Data Collection 10s After Completed Startup.
Sep 16 01:45:01 localhost systemd: Started Stop Read-Ahead Data Collection 10s After Completed Startup.
Sep 16 01:45:01 localhost systemd: Started Update UTMP about System Runlevel Changes.
Sep 16 01:45:01 localhost systemd: Startup finished in 829ms (kernel) + 4.879s (initrd) + 23.991s (userspace) = 29.700s.
Sep 16 01:45:01 localhost NetworkManager[713]: <info>  startup complete
Sep 16 01:45:02 localhost systemd: SELinux policy denies access.
Sep 16 01:45:02 localhost systemd-logind: Failed to start unit user-42.slice: Access denied
Sep 16 01:45:02 localhost systemd-logind: Failed to start user slice: Access denied
Sep 16 01:45:02 localhost systemd-logind: Assertion 's->user->slice' failed at src/login/logind-session.c:515, function session_start_scope(). Aborting.
Sep 16 01:45:02 localhost abrt-hook-ccpp: Saved core dump of pid 609 (/usr/lib/systemd/systemd-logind) to /var/spool/abrt/ccpp-2015-09-16-01:45:02-609 (614400 bytes)

The backtrace in the core dump is identical to CentOS Bug: 8905

Next I'm going to add SELinux=0 to the grub start script, but I don't want to do that permanently. EDIT : I fixed it by adding selinux=1 enforcing=0 to my grub boot parameters, then editing /etc/sysconfig/selinux and changing the state to SELINUX=permissive

I can log in and everything works now, but if I set SElinux back to enforcing, I can't log in at all. Still looking for answers...

1

I ran into the same problem. Unconventional install as well, and I went with extlinux rather than grub. I tried logging in as root and as a regular user, neither worked.

cat /etc/redhat-release 

CentOS Linux release 7.1.1503 (Core)

I solved it by doing a complete SELinux relabel.

# inside the chroot from Debian
touch /.autorelabel

See CentOS SELinux for more details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.