System Recovery
1. rescue a system
2. boot with installation disc
3. rescue installed system
4. shell start shell
5.
chroot /mnt/sysimage
Virtualization
To install KVM
yum groupinstall Virtualization
chkconfig libvirtd on
service libvirtd start
Guest XML File (config details of VM)
/etc/libvirt/qemu/vm-name.xml
Guest HardDrive
/var/lib/libvirt/images
Virtual Shell
virsh nodeinfo show node details list --all list all the running guests start vm-name start a guest shutdown vm-name shutdown a guest destroy vm-name force shutdown dominfo vm-name show guest config info autostart vm-name auto start a guest when the host booted up autostart vm --disable turn off autostart help list of the commands
Virtual GUI
Virtual Machine Manager
SELinux
yum install policycoreutils setroubleshoot
To check SELinux mode
getenforce
To change SELinux mode
setenforce Permissive or setenforce 0/1 while 0 is Permissive, 1 is enforcing
/etc/selinux/config
man page
apropos selinux
To list a directory’s security context
ls -Zd /etc
To list a file’s security context
ls -Z /etc/services
To view security context of a running process
ps auZ
To change security context (copy from other file)
chcon --reference source target
To change security context
chcon -t etc_t file To restore security context
semanage fcontext -a -t etc_t "target"
restorecon -R -v target
To read AVC alert
sealert -a /var/log/audit/audit.log
Shutdown/Restart
Shutdown
shutdown -h now (shutdown immediately) shutdown -h +
Reboot
reboot shutdown -r + shutdiwn -r now init 6