Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-10-2004, 12:48 PM
|
#1
|
Member
Registered: Dec 2004
Posts: 59
Rep:
|
Screwed up boot
Hello all
Here's the problem. Beeing the idiot I am, I managed to screw up my boot/grub/menu.list so now I cant boot my debian. This happened after a kernel upgrade. Now I'm quite sure I've found the right thing to place there, but I have no permission to write to files using knoppix  . How can I undo this stupidity?
Thx a lot!
|
|
|
12-10-2004, 12:50 PM
|
#2
|
Senior Member
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170
Rep:
|
You should be able to write things as root in knoppix. Are you root?
BTW you can also use your debian CD as rescue disk (also with different kernels if you need). Check out the boot options.
|
|
|
12-10-2004, 12:50 PM
|
#3
|
Member
Registered: Dec 2004
Posts: 59
Original Poster
Rep:
|
nope, not root. any root password?
|
|
|
12-10-2004, 12:55 PM
|
#4
|
Senior Member
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170
Rep:
|
Then you need to edit the file via an terminal. Open xterm and then do
It'll ask your password. Then you can change the text file with vi.
Some basic vi commands are:
i = insert. if you hit i you'll be able to start editing the text file.
esc = to stop editing and give you the colon after which you can write commands
shift-q = exit menu
wq = save and exit
So use i then change the text. Then hit esc, shift-q, wq to save and exit
|
|
|
12-10-2004, 01:06 PM
|
#5
|
Member
Registered: Dec 2004
Posts: 59
Original Poster
Rep:
|
it doesn't seem to be working, I use vi as root, and it returns these errors:
E45: 'readonly' option is set (add ! to override)
so I ad !:
nothing seems to happen, i just get a new line, and if i hit enter I eventually get into the code.
cannot change anything, and when i try to quit using q, i get:
E37 No write since last time (add ! to override)
with q! nothing has changed in the file 
|
|
|
12-10-2004, 01:10 PM
|
#6
|
Member
Registered: Dec 2004
Posts: 59
Original Poster
Rep:
|
also, when typing wq! time nr 2 i get:
E212: Can't open file for writing
nor can I run any program as root using "run as different user", error child terminated with 1 status 
Last edited by TaNeK; 12-10-2004 at 01:22 PM.
|
|
|
12-10-2004, 01:53 PM
|
#7
|
Senior Member
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170
Rep:
|
Can you perhaps try with the debian CD. I'm not really familiair with knoppix and I know the debian rescue cd just works. If the CD starts don't hit enter but use F3 to check the options. Now you have to type the code for the rescue. Since you'll only need to edit a text file I think it's fine to just do it with a plain rescue command (no different kernels and stuff) IIRC the code was something like this:
rescue root=/dev/hd..
You have to say what your root partition is and then a debian session will start.
|
|
|
12-10-2004, 02:27 PM
|
#8
|
Member
Registered: Nov 2002
Location: Pennsylvania
Distribution: Mandrake 9.1 and Redhat 9
Posts: 144
Rep:
|
It is possible that you're dead debian filetree is being mounted readonly. If you ever use that debian rescue disk, make sure the filetree is mounted read-write.
|
|
|
12-10-2004, 02:50 PM
|
#9
|
Senior Member
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170
Rep:
|
Quote:
Originally posted by blinux1
It is possible that you're dead debian filetree is being mounted readonly. If you ever use that debian rescue disk, make sure the filetree is mounted read-write.
|
I think it does this automatically. You specify which root partition you use then you can login as root and edit whatever you want.
|
|
|
12-10-2004, 03:12 PM
|
#10
|
Senior Member
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100
Rep:
|
IIRC, Knoppix shows your hard disks on the desktop. If you right click them, there is gui interface that has the option like "allow write to this drive" or something in that neighborhood. That is not checked by default, but would have to be to edit a file on your debian drive. After clicking the write checkbox, you'll still have to be root and go through all the steps people ahve given here.
Peace,
JimBass
|
|
|
12-10-2004, 03:54 PM
|
#11
|
Member
Registered: Dec 2004
Posts: 59
Original Poster
Rep:
|
i've unchecked the read only box and changed to let users write to files through the gui. still cannot use either vi or any other editor... how does the rescue work? it lts me reinstall grub?
|
|
|
12-10-2004, 05:12 PM
|
#12
|
Member
Registered: Dec 2004
Posts: 59
Original Poster
Rep:
|
ok, i fixed it.
for everyone other than me who makes this kind of mistakes:
open terminal
su
passwd
set a password
run as a different user on an editor, think kedit or something worked for me (don't use kde-apps much..)
edit the file and voila, you should be able to save. 
|
|
|
All times are GMT -5. The time now is 08:23 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|