Somehow I managed to mess up a RHEL 6 Alpha machine’s SELinux configuration so seriously that I could no longer log in:
$ ssh root@192.168.122.242 root@192.168.122.242's password: Unable to get valid context for root Last login: Wed Jan 6 18:34:46 2010 Connection to 192.168.122.242 closed.
However this is easy to fix with guestfish. Important: before you do this, make sure the guest is shut off.
# guestfish -i RHEL6Alpha
Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.
Type: 'help' for help with commands
'quit' to quit the shell
><fs> ls /
.autofsck
bin
boot
dev
etc
home
lib
lib64
lost+found
media
mnt
opt
proc
root
sbin
selinux
srv
sys
tmp
usr
var
><fs> touch /.autorelabel
><fs> sync
><fs> exit
It’ll fix the SELinux labels for you when it boots. Lo and behold I can log in again.

I didn’t know RHEL_6 would work on the alpha.. its good to see something will
.
A potential easier solution would be
sh “/sbin/setfiles -q /etc/selinux/targeted/contexts/files/file_contexts /”
So RHEL6 is finally in alpha! phew
I thought it was becoming friends with Duke Nukem
An easier solution still:
echo SELINUX=disabled > /etc/selinux/config
Oooh! What I said!
There is a RHEL 6 Alpha? Were can I get one for myself?