Step 1: power on your pc and go to the graph page. Press ‘e’
Graph/kernel has three information: 1. HDD info(MBR) 2. Kernel location 3. Image
Figure: Graph page
Step 2: go to the kernel location line which start with “linux ….” At the end of this line give a space and type “rd.break”. then for exit/begin press “ctrl+x”.Step 3: Now you are in maintenance/emergency mode, where shows “switch-root#”.
Note: ‘/’ is always in read only mode. So we have to move ‘/’ data to ‘/sysroot’ directory for temporary purpose. And convert ‘/sysroot’ to read-write mode and also give the total power of ‘/’ to ‘/sysroot’.
Step 4: now type “mount –o remount,rw /sysroot” note: ‘-o’ means option.
Step 5: type” chroot /sysroot”
Note: By using chroot, we can give the power of root to ‘/sysroot’. By giving that command the shall is now change.
Step 6: now change the password of root by typing “passwd”
Note: type the new passwd for 2 times.
Step 7: now type: “touch /.autorelabel”
Note: By the creating this file, it makes relabel the change to the total system.
Step 8: now press “exit” for exit from the 1st shell.
Step 9: now press “exit” for exit from the 2nd shell.
Note: after exit the pc will reboot, and u will see the checking percentage, it means the autorelabel is works.
Enjoy