LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 11-12-2003, 09:53 PM   #1
hoffman
Member
 
Registered: Nov 2003
Location: Georgia
Distribution: Redhat 9
Posts: 43

Rep: Reputation: 15
opening files...


I'm trying to edit the code in grub.conf.
I can get to it via the file manager in the boot file but I can't get it to open. (It has a red slash symbol on it).
I tried the command line and opening pico but it says "command line not found" I must not have
pico...
I can also get to it using emacs but damned if I can figure that out either.
I also tried logging in as su on the command line and typing "/boot/grub/grub.conf" and it says "permission denied".
I've been fooling with it for a few hours now and I'm sort of stumped.
just keep plugging I guess...
Ought to be real fun getting p2p working on this thing



I'm not fooling with anything until I get this one ironed out.
 
Old 11-12-2003, 09:59 PM   #2
Awatto
Member
 
Registered: Aug 2003
Location: Halifax, NS
Distribution: Debian, Gentoo, Ubuntu, Fedora
Posts: 128

Rep: Reputation: 30
I'm not quite sure what you mean you logged in as su and typed "/boot/grub/grub.conf" cause as far as I know in a terminal that won't do anything

Open a terminal (console) and type:
su
<password>
vi /boot/grub/grub.conf

If that doesn't work something is messed
 
Old 11-12-2003, 10:00 PM   #3
gradedcheese
Member
 
Registered: Nov 2003
Posts: 59

Rep: Reputation: 15
what happens if you do:

su
[log in as root]
cd /boot/grub/
emacs grub.conf

?

EDIT: or yes do what Awatto said (same thing but using vi)

basically you
1) log in as root
2) go to while the file is located
3) tell emacs or vi to open that file

Last edited by gradedcheese; 11-12-2003 at 10:02 PM.
 
Old 11-12-2003, 10:02 PM   #4
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 598
Blog Entries: 1

Rep: Reputation: 45
First you need to see what's there and if it is a file or not. Are you familiar with what a bash terminal is?
 
Old 11-12-2003, 10:04 PM   #5
gradedcheese
Member
 
Registered: Nov 2003
Posts: 59

Rep: Reputation: 15
one more thing. You can edit grub dynamically when you turn on your computer and the grub screen loads after POST. Press "e" to edit your configuration. IT's a little confusing (follow the steps on screen) but convinient.
 
Old 11-12-2003, 10:06 PM   #6
Awatto
Member
 
Registered: Aug 2003
Location: Halifax, NS
Distribution: Debian, Gentoo, Ubuntu, Fedora
Posts: 128

Rep: Reputation: 30
Hmm, I didn't know that myself, nice to know
 
Old 11-12-2003, 10:14 PM   #7
hoffman
Member
 
Registered: Nov 2003
Location: Georgia
Distribution: Redhat 9
Posts: 43

Original Poster
Rep: Reputation: 15
I'm getting there. I logged in as su on the terminal, (that's the same as command line isn't it?) then opened nautilus and clicked right to it windoze style. (the red circle/slash is gone) I have it opened now.
Hmmmm, How do I edit the code? I can view it but I can't change it.

I wasn't logging in as su properly before because the prompt deal didn't say "root@alltel..."

Funny, I hold out on posting a question and as soon as I do It sort of comes to me...

"Bourne again shell." But I only have a fuzzy notion about how the different shells and term
inals work.

Last edited by hoffman; 11-12-2003 at 10:16 PM.
 
Old 11-12-2003, 10:21 PM   #8
Awatto
Member
 
Registered: Aug 2003
Location: Halifax, NS
Distribution: Debian, Gentoo, Ubuntu, Fedora
Posts: 128

Rep: Reputation: 30
Hmm, I don't do much windoze style anymore so couldn't tell you, not familiar with vi? If not it's about time you learnt
 
Old 11-12-2003, 10:28 PM   #9
hoffman
Member
 
Registered: Nov 2003
Location: Georgia
Distribution: Redhat 9
Posts: 43

Original Poster
Rep: Reputation: 15
[hoffman@alltel hoffman]$ su -
Password:
[root@alltel root]# vi/boot/grub/grub.conf
-bash: vi/boot/grub/grub.conf: No such file or directory
[root@alltel root]#

This is what I keep getting.
I guess I can't edit from nautilus, just look...
 
Old 11-13-2003, 12:15 AM   #10
Halo_Rules
LQ Newbie
 
Registered: Sep 2003
Distribution: Gentoo ONLY!
Posts: 2

Rep: Reputation: 0
vi /boot/grub/grub.conf

Needs a space between vi and /boot/grub/grub.conf

Vi is a text editor and your telling it to edit that file.
 
Old 11-13-2003, 01:24 PM   #11
gradedcheese
Member
 
Registered: Nov 2003
Posts: 59

Rep: Reputation: 15
yes and don't use Nautilus as root. Instead run vi or emacs or the like as root. If you do want to use nautilus though, browse to the file like you did, right click on it, and choose gedit to open it OR, much better:

su
cd /boot/grub/
gedit grub.conf

That will just open it in gEdit (like Windows Notepad) with root permission. That's probably the way you'd want to do things if you don't like command line editors.
 
  


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
Opening .db files m123 Linux - Newbie 3 09-29-2005 05:51 PM
Opening files Diederick Programming 5 06-27-2005 09:11 PM
Opening .exe files oldtrout Linux - Newbie 4 03-27-2005 06:46 PM
Samba opening files timgerr Linux - Software 0 02-18-2004 01:56 PM
opening *.run files A500 Linux - Newbie 3 08-26-2003 08:37 PM


All times are GMT -5. The time now is 09:42 PM.

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