RHEL 7: gain access to VM during boot process

*possible uses would be to reset root password or if selinux results in freezing and cannot boot

at the GRUB 2 menu type e to edit
at the kernel line (starting with linux16) add the following statements at the end
rd.break enforcing=0 or rd.break selinux=0
note: rd.break asks for break at early stage of booting, selinux=0 completely disables SELinux
Press CNTRL x
switch_root:/# mount –o remount,rw /sysroot
switch_root:/# chroot /sysroot
make your edits to files etc
exit exit to reboot
Now you can reset password for root or edit any other files you wish; e.g /etc/sysconfig/selinux (to disable or enable)

Leave a Reply

Your email address will not be published.



Get Free Shipping on Everything All Season Long
Best Buy Co, Inc.
Best Buy Co, Inc.