Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 20th February 2008, 02:23 AM
RicksonCrazy Offline
Registered User
 
Join Date: Feb 2008
Posts: 5
How the hell do I edit grub.conf?

so I have windows xp and fedora 8.

sda1 is windows xp

sda2 is ext3 formated and fedora 8 on it.


I want to open grub.conf and put these lines in there for dual boot:

"
title windows xp
rootnoverify(hd0,0) ( I think this is correct. so windows is on very first partition of my single hard drive)
makeactive
chainloader +1.


but I can't open the grub.conf.

I used this code 'username All = (all) nopasswd: all'>>etc/sudoers.

but then what texteditor can I use to open grub.conf. or how do I open it with gui text editor?

remember your help is Sincerely apreciated.
Thank you.
Reply With Quote
  #2  
Old 20th February 2008, 02:26 AM
Wayne
Guest
 
Posts: n/a
Title edited for content. Please moderate your language on this forum.

Wayne
Reply With Quote
  #3  
Old 20th February 2008, 02:40 AM
kevmif Online
Registered User
 
Join Date: Dec 2004
Location: Australia
Posts: 472
You need to use the command line

The file is owned by root.

Open a terminal window and type the following:
su -
rootpassword

gedit (or kedit, vi, emacs or whatever bloody editor you want to use) /boot/grub/grub.conf

You can then save the file.

Last edited by kevmif; 15th April 2008 at 04:08 AM.
Reply With Quote
  #4  
Old 20th February 2008, 04:06 AM
RicksonCrazy Offline
Registered User
 
Join Date: Feb 2008
Posts: 5
thanks kevmif.

this is what needs to be done:

open terminal:
type su
type kernell password

type echo 'username All = (All)NoPasswd:All'>> /etc/sudoers

click enter.

navigate to /etc/ folder
type cd .. to go up the directory
type cd directoryName to go into directory
type ls to see all files and folders in directory.


then once you are in /etc/ folder
type gedit grub.conf


just wrote it out for others. took me a while to find out on the internet.
Reply With Quote
  #5  
Old 20th February 2008, 02:26 PM
sideways's Avatar
sideways Offline
Retired User
 
Join Date: Oct 2004
Location: London, UK
Posts: 4,999
Quote:
Originally Posted by RicksonCrazy
type echo 'username All = (All)NoPasswd:All'>> /etc/sudoers
You definitely SHOULD NOT do that.


You just needed to type this
Code:
su -
gedit /etc/grub.conf
Note that /etc/grub.conf is just a soft link to the actual file /boot/grub/grub.conf
Reply With Quote
  #6  
Old 22nd February 2008, 01:26 AM
RicksonCrazy Offline
Registered User
 
Join Date: Feb 2008
Posts: 5
Quote:
Originally Posted by sideways
You definitely SHOULD NOT do that.


You just needed to type this
Code:
su -
gedit /etc/grub.conf
Note that /etc/grub.conf is just a soft link to the actual file /boot/grub/grub.conf
ok thanks. so what's the problem with that "echo ....etc" command?
what does it do? are there any permanent changes done to the system after typing
"echo .....etc" command?
yes I have seen that grub.conf is also in boot/grub folder.
and thank again.
Reply With Quote
  #7  
Old 22nd February 2008, 02:36 AM
sideways's Avatar
sideways Offline
Retired User
 
Join Date: Oct 2004
Location: London, UK
Posts: 4,999
Quote:
Originally Posted by RicksonCrazy
ok thanks. so what's the problem with that "echo ....etc" command?
what does it do? are there any permanent changes done to the system after typing
"echo .....etc" command?
yes I have seen that grub.conf is also in boot/grub folder.
and thank again.
it allows your 'username' to execute commands with root privilege without a password (permanently).
That's really not very secure. However on a home system it might be convenient, I probably shouldn't have been so alarmist

Also, the proper way to edit the /etc/sudoers file is by using 'visudo' as root (it will parse basic errors for example)

better just to add your username to the following section of the sudoers file like this

Code:
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
username   ALL=(ALL)       ALL
Now you must enter your password to run a sudo command

eg
Code:
sudo yum update
sudo gedit /etc/grub.conf
This is how ubuntu is set up for example. (Note that the sudo password lasts for a few minutes, so you don't have to keep entering it for lots of sudo commands in quick succession)

Last edited by sideways; 22nd February 2008 at 02:46 AM.
Reply With Quote
  #8  
Old 15th April 2008, 02:17 AM
RicksonCrazy Offline
Registered User
 
Join Date: Feb 2008
Posts: 5
so is there any way to undo what I did?
I mean I don't want any user to run root commands.
how do I undo these changes:

"username All = (all) nopasswd: all'>>etc/sudoers"

Thanks.
Reply With Quote
  #9  
Old 15th April 2008, 06:23 AM
Bslagowski's Avatar
Bslagowski Offline
Registered User
 
Join Date: Dec 2007
Location: Wisconsin
Posts: 196
Quote:
Originally Posted by RicksonCrazy
so is there any way to undo what I did?
I mean I don't want any user to run root commands.
how do I undo these changes:

"username All = (all) nopasswd: all'>>etc/sudoers"

Thanks.
Code:
su -
visudo
Scroll to where that line is ("username All = ... etc) so that the cursor is at the start of the line. Pressing "x" will delete it character by character. Once you've deleted it press the colon key (thats the " : " key) and type wq. Press enter. You should be back at the terminal. Whew!

You might also be interested in the "vitutor" program. It teaches you the basics of vi. I don't think fedora has it installed by default but it should be a quick yum install away. Get it and at least familiarize yourself with the basics. My personal opinions aside, knowing at least the rudimentary workings of vi/vim is pretty important.
__________________
So dawn goes down to day,
Nothing gold can stay.
Reply With Quote
  #10  
Old 23rd April 2008, 04:35 AM
RicksonCrazy Offline
Registered User
 
Join Date: Feb 2008
Posts: 5
Thank you. is it a big deal if I use gedit instead of vi? so yes I deleted that line.
Reply With Quote
  #11  
Old 23rd April 2008, 06:55 AM
w5set Offline
Registered User
 
Join Date: Feb 2005
Location: ark n saw out in the sticks
Posts: 2,316
OHHHH MYYYYY!!!
You used gedit to edit grub.conf??????

Ahhh...never mind....
You just broke the purists hearts doing that.... hehe

Just remember to leave/put a empty line after the last line in grub....as most other scripts too.
and always just save as a plain text file --but not a ".txt" (a "dot"txt) like grub.conf.txt.....(just hit save...not save as)
Gedit works good...and usually it's default is a backup file (something.bak) so you could go back to the original if ya need to by renaming the old (bak or similar named) file
Always make a backup for the file to be edited if it's a system file.
That can save your bacon if editing is wrong/fubar, etc.
Reply With Quote
Reply

Tags
edit, grubconf, hell

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit grub.conf for configuring Ubuntu 9.04 shahdharmit Using Fedora 18 17th September 2009 04:22 PM
Need to edit grub.conf shahdharmit Using Fedora 9 15th August 2009 09:26 AM
possible to edit /boot/grub/grub.conf from live cd? mailman1175 Using Fedora 4 29th December 2008 01:28 AM
How to edit your GRUB.conf gonzalo76 Guides & Solutions (No Questions) 19 30th August 2008 08:51 AM
GRUB won't see WinXPx64 and don't let me edit grub.conf A.N.K. Installation and Live Media 1 29th March 2006 08:23 AM


Current GMT-time: 03:51 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat