How do I change a root only file after I've messed it up and computer will not boot?
edit: I now realize that the title to my thread is a little too alarming. My system still boots, but it stalls when loading X, and it's all because I editted the /etc/hosts file.
I thought I knew how to edit such a file. I swear I've just loaded a bootable copy of Knoppix before, and it could edit "root-only" (only read/write for root) on my regular installation of Fedora Core. In this case, I editted the /etc/hosts file and X no longer starts. I've noticed that my system still wants its hostname to be "localhost.localhost," and I changed the /etc/hosts file to something else (It just reads "127.0.0.1 linux1nic linux1nic"). I thought about booting up Knoppix to edit the file back, and like I said, I swear I've done this before, but Knoppix will not load the file. I also thought about editting grub.conf to boot me into a shell instead of X, but I can't get read-write privileges on that, either. First of all, I'd like to know why Knoppix can't write to these files. I've done this before, but all of a sudden it's being a pain in the neck. Secondly, is there any way to boot into just a shell, which I assume still works? This is by far the dumbest problem I have ever had with Linux, and Fedora Core. I can't believe that I did this to my good ol' Fedora box. |
just hit e at the grub boot screen and add "1" or "single" to the kernel options string and then boot. that'll dump you in runelevel 1 where you should be able to edit the files without any issues. that said you could probably boot to level 3 as you supposed in the same way.
|
Thanks a_k. I've never really gotten into the topic of kernel options at startup. I got it to work like you said. All is good. For future folks, you have to change your hostname in /etc/sysconfig/network, or one of networking files. Also, I've seen /etc/HOSTNAME before on other systems, but for some reason all I found was /etc/hosts, and this file must be on the very bottom of the food chain as far as naming your own computer goes. What a drag. At least I learned something from it.
|
All times are GMT -5. The time now is 10:55 AM. |