LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 03-14-2006, 11:57 AM   #1
tindelk
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Rep: Reputation: 0
RedHat GRUB Editor Question (no password)


So I don't want to make an excessively long post, especially considering this is my first. The issue is fairly simple, I have an IBM server that is setup as dual boot, W2k3 Advanced server, and Redhat. It boots to the GRUB, and the default OS is Linux. The developers who setup RH on this machine are gone now, taking with them the passwords to get in (doh!).

So in short, this server needs to go out for a demo to a client like ASAP, but part of the demo requires a reboot, and I would like to have the default OS remain W2k3 Server.

Is this possible without reinstalling RH? I tried to use the GRUB editor, but whenever I tried to do the configfile command, it just said "unable to mount volume".

I'm lost. Thanks a lot for your help.
 
Old 03-14-2006, 12:02 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
All you have to do is edit the file /boot/grub/grub.conf, and change the number on the 'default=' statement to point to appropriate entry. The first entry is '0', the next is '1' and so on. No other changes are necessary, no 'resaving grub' no writing the boot sector.
 
Old 03-14-2006, 12:33 PM   #3
tindelk
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
I apologize for not being so smart about this stuff, but I tried to do that already - I typed:

configfile (hd0)/boot/grub/menu.lst
and also
configfile (hd0)/boot/grub/grub.conf

I keep getting the error message "could not mount the selected partition"
 
Old 03-14-2006, 12:38 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
What you want to do is (as root, from a command line):

vi /boot/grub/grub.conf

If you prefer a GUI editor:

gedit /boot/grub/grub.conf

You can boot Redhat without needing a password so that you can edit the file, by booting into single user mode

Last edited by macemoneta; 03-14-2006 at 12:42 PM.
 
Old 03-14-2006, 12:50 PM   #5
tindelk
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
As I stated in my first post, I do not have the root password, so I cannot get a regular command line. In fact we have NO log on information. This is using bash level commands only. I hit "e" when GRUB starts, and then hit "c" to get a command line...
 
Old 03-14-2006, 01:02 PM   #6
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Following the 'booting into single user mode' procedure, you neeed no passwords. You can change grub.conf, and set new passwords as you see fit.
 
Old 03-14-2006, 01:13 PM   #7
tindelk
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Hopefully this is my last question. Thankyou so much for your help, BTW.

I am in, I change the file. What is the command to save it?

I saw none, so I rebooted. Same thing. So I went back in to edit the file, it told me it was already being edited. How can I apply these changes?
 
Old 03-14-2006, 01:21 PM   #8
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
You will need to delete the '.grub.conf.swp' which was created when you rebooted while editing the file.

If you are editing the file with vi, then you can save and exit with 'ZZ' (two capital Z, no quotes).

To reboot normally (just power cycling can cause file system damage):

shutdown -r now
 
Old 03-14-2006, 01:58 PM   #9
tindelk
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
You RULE. Thank you so much, this was critical - thanks to you I managed to get it done.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
(another) Grub dual boot question with XP/Redhat agerkis Linux - Newbie 6 01-11-2011 02:14 PM
Setting password on grub, wha to do after changing default values in /boot/grub/menu. sarajevo Linux - Security 1 08-17-2005 08:01 PM
html editor for redhat kefal Red Hat 3 11-22-2003 11:59 PM
default editor RedHat 9.0 ner Linux - Newbie 1 11-17-2003 02:07 PM
Redhat / Windows XP / Grub question bmar Linux - General 3 04-07-2003 01:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:00 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