LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-07-2006, 03:05 PM   #1
SquishyMarbles
Member
 
Registered: Apr 2006
Posts: 39

Rep: Reputation: 15
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.

Last edited by SquishyMarbles; 09-07-2006 at 03:08 PM.
 
Old 09-07-2006, 03:40 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 09-07-2006, 04:17 PM   #3
SquishyMarbles
Member
 
Registered: Apr 2006
Posts: 39

Original Poster
Rep: Reputation: 15
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Messed with grub file, now can't boot Fedora 5 wildmtncrazy Linux - General 10 06-08-2006 06:02 PM
XORG.CONF file messed up, how do I edit on boot? technofreek Linux - Software 6 03-10-2006 10:25 AM
Root cannot change file permissions. aje Slackware 3 08-12-2005 02:27 AM
Root can't change file permissions!!!!!! j_pooria Fedora 1 08-19-2004 03:29 AM
change with monitor settings messed up boot centr0 Linux - Newbie 2 02-26-2003 09:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration