LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 12-10-2004, 01:48 PM   #1
TaNeK
Member
 
Registered: Dec 2004
Posts: 59

Rep: Reputation: 15
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!
 
Old 12-10-2004, 01:50 PM   #2
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
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.
 
Old 12-10-2004, 01:50 PM   #3
TaNeK
Member
 
Registered: Dec 2004
Posts: 59

Original Poster
Rep: Reputation: 15
nope, not root. any root password?
 
Old 12-10-2004, 01:55 PM   #4
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
Then you need to edit the file via an terminal. Open xterm and then do
Code:
su -
It'll ask your password. Then you can change the text file with vi.
Code:
vi /path/to/file
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
 
Old 12-10-2004, 02:06 PM   #5
TaNeK
Member
 
Registered: Dec 2004
Posts: 59

Original Poster
Rep: Reputation: 15
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
 
Old 12-10-2004, 02:10 PM   #6
TaNeK
Member
 
Registered: Dec 2004
Posts: 59

Original Poster
Rep: Reputation: 15
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 02:22 PM.
 
Old 12-10-2004, 02:53 PM   #7
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
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.
 
Old 12-10-2004, 03:27 PM   #8
blinux1
Member
 
Registered: Nov 2002
Location: Pennsylvania
Distribution: Mandrake 9.1 and Redhat 9
Posts: 144

Rep: Reputation: 15
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.
 
Old 12-10-2004, 03:50 PM   #9
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
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.
 
Old 12-10-2004, 04:12 PM   #10
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
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
 
Old 12-10-2004, 04:54 PM   #11
TaNeK
Member
 
Registered: Dec 2004
Posts: 59

Original Poster
Rep: Reputation: 15
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?
 
Old 12-10-2004, 06:12 PM   #12
TaNeK
Member
 
Registered: Dec 2004
Posts: 59

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB , has got my dual boot screwed up mickeyboa Fedora 9 04-18-2005 01:43 PM
Download to xp screwed up boot? quaylet Linux - Newbie 2 04-14-2005 11:49 PM
boot and X screwed up jalsk Linux - Newbie 3 04-12-2004 05:57 PM
oops - screwed up inittab, can't boot kaise Linux - General 3 03-13-2003 10:15 PM
I SCREWED UP MY BOOT DISK! Blootoon Linux - General 3 02-27-2001 06:33 PM


All times are GMT -5. The time now is 02:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration