LeadCo
asked on
Centos 6 wont boot because of syntax error in selinux/config need to edit selinux/config
I have a unique issue. I have placed a ";" to comment out a line instead of "#".
I restarted my centos 6 and it says:
Syntax error in /sysroot/etc/selinux/confi g : 6 : syntax error ";" unexpected
failed to boot sleeping forever.
I placed the live CD in my system booted from there was able to view the file in readonly but can not change it because its mounted form the live cD permissions wont allow me to edit.
I attempted to edit by using Grub and pulling up command line but I dont no how to get to the file from there to edit.
How do I edit the config file without being able to boot to get rid of the ";" in the config file so it will boot?
Thanks for help.
I restarted my centos 6 and it says:
Syntax error in /sysroot/etc/selinux/confi
failed to boot sleeping forever.
I placed the live CD in my system booted from there was able to view the file in readonly but can not change it because its mounted form the live cD permissions wont allow me to edit.
I attempted to edit by using Grub and pulling up command line but I dont no how to get to the file from there to edit.
How do I edit the config file without being able to boot to get rid of the ";" in the config file so it will boot?
Thanks for help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I have given u the command to remount the disk in read-write mode.
Follow the link given below to boot in rescue mode as suggested also
http://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-rescuemode-boot.html
Follow the link given below to boot in rescue mode as suggested also
http://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-rescuemode-boot.html
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
With the above instruction I do not use the live CD correct? I let it got to regular reboot and press any key to go to boot menu where I can press a,e,c etc...
Is that correct?
Then step 2 it will take you to single user mode: Will it boot up or just give me a prompt like command line where i run mount -n -o remount,rw /. If not where do I run the mount -n -o remount,rw /
Is that correct?
Then step 2 it will take you to single user mode: Will it boot up or just give me a prompt like command line where i run mount -n -o remount,rw /. If not where do I run the mount -n -o remount,rw /
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok I have in singel user mode I ran the mount -n -o remount,rw /
I am familar with nano to edit files but that don't seem to be a recognized command. How do I get to /etc/selinux/config and make the edit?
I am familar with nano to edit files but that don't seem to be a recognized command. How do I get to /etc/selinux/config and make the edit?
ASKER
This did not fix my issue but it prob would if i new how to access the right file and edit it.
Thanks for help.
Thanks for help.
you can do
vi /etc/selinux/config
to edit the file, press i before you can start modifying and after you are done modifying the file, press escape and then :x to save and exit the file.
vi should work
vi /etc/selinux/config
to edit the file, press i before you can start modifying and after you are done modifying the file, press escape and then :x to save and exit the file.
vi should work
ASKER
Ok I got it, simple.
I loaded the Live CD and when it was doing the auto login after boot and I hit escape and clicked login as other user: root no password was neccessarry, and I could access the drive from gui pull up file and edit and save.
Thanks all.
I loaded the Live CD and when it was doing the auto login after boot and I hit escape and clicked login as other user: root no password was neccessarry, and I could access the drive from gui pull up file and edit and save.
Thanks all.
ASKER