LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-25-2012, 03:10 PM   #1
alpo85
Member
 
Registered: Nov 2012
Posts: 30

Rep: Reputation: Disabled
GRUB 0.97 Defaults to Command Line (RHEL 6)


All,

GRUB Legacy seems to be unable to locate and load the "/boot/grub/menu.lst" configuration file. Loading the menu.lst file must be done on each boot manually with the command:

Code:
configfile /grub/grub.conf
Of note, I have a separate /boot partition and installed GRUB with
Code:
grub-install --root-directory=/boot /dev/sda
Also, many users appear to suggest the setup command will resolve the issue if implemented as such:
Code:
root (hd0,2)
setup (hd0)
Unfortunately, this no workie for me.

Here's my menu.lst file:
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,3)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_alpo-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz

title Red Hat Enterprise Linux 6.1
        root (hd0,2)
        kernel /vmlinuz-2.6.32-131.6.1.el6.x86_64 ro root=/dev/mapper/vg_alpo-lv_root rd_LVM_LV=vg_alpo/lv_root rd_LVM_LV=vg_alpo/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-131.6.1.el6.x86_64.img
title Windows 7
        rootnoverify (hd0,0)
        chainloader +1
Here's my "sudo fdisk -l /dev/sda" output:
Code:
[Alpo@alpo-computer ~]$ sudo fdisk -l /dev/sda

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xde4b5a83

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13       28733   230690816    5  Extended
Partition 2 does not end on cylinder boundary.
/dev/sda3           65641       65705      512000   83  Linux
/dev/sda4           65705       91202   204800000   8e  Linux LVM
/dev/sda5              14       10457    83886080    7  HPFS/NTFS
/dev/sda6           10457       27428   136315904    7  HPFS/NTFS
/dev/sda7           27428       28733    10485760    7  HPFS/NTFS
Interestingly enough, the menu.lst item says,
Code:
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,3)
Thus "root (hd0,3)" is specified whereas each OS is called using "root (hd0,2)." Perhaps a mismatch in GRUB vs. the system's partition table?

At any rate, how can I get GRUB to automatically find "menu.lst" and load the menu interface (rather than the command interface) on each boot?

Thanks in advance for the help.

Last edited by alpo85; 11-25-2012 at 06:00 PM.
 
Old 11-25-2012, 06:18 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,541

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Quote:
Unfortunately, this no workie for me.
Details. "no workie" doesn't tell us a lot. Usually there is some output when you enter those commands at the grub prompt, success or an error reported?

You could go to the site below and download and run the bootinfoscript and review the output (a results.txt file) or post it here as it will give detailed information on your partitions and boot files:

http://sourceforge.net/projects/bootinfoscript/
 
1 members found this post helpful.
Old 11-25-2012, 06:19 PM   #3
alpo85
Member
 
Registered: Nov 2012
Posts: 30

Original Poster
Rep: Reputation: Disabled
Not sure what happened to the grub.conf file, but it seemed to have been stuck in the swap partition. Upon trying to edit menu.lst with "sudo vi /boot/grub/menu.lst", I got:
Code:
E325: ATTENTION
Found a swap file by the name "/boot/grub/.grub.conf.swp"
          owned by: root   dated: Sun Nov 25 18:17:26 2012
         file name: /boot/grub/menu.lst
          modified: no
         user name: root   host name: alpo-computer
        process ID: 3047 (still running)
While opening file "/boot/grub/menu.lst"
             dated: Sun Nov 25 10:58:52 2012

(1) Another program may be editing the same file.
    If this is the case, be careful not to end up with two
    different instances of the same file when making changes.
    Quit, or continue with caution.

(2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r /boot/grub/menu.lst"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/boot/grub/.grub.conf.swp"
    to avoid this message.
"/boot/grub/menu.lst" 20L, 865C
I rm'd .grub.conf.swp and .grub.conf.swo and re-installed GRUB with:
Code:
#grub-install --recheck /dev/sda
Viola! System workie, menu interface intact.

Last edited by alpo85; 11-25-2012 at 06:28 PM.
 
Old 11-25-2012, 06:23 PM   #4
alpo85
Member
 
Registered: Nov 2012
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
Details. "no workie" doesn't tell us a lot. Usually there is some output when you enter those commands at the grub prompt, success or an error reported?

You could go to the site below and download and run the bootinfoscript and review the output (a results.txt file) or post it here as it will give detailed information on your partitions and boot files:

http://sourceforge.net/projects/bootinfoscript/
@yancek, I ran the normal setup commands, but I wouldn't get any errors - it seemed to install normally. I'll be more specific regarding errors/output in future posts; thanks for the feedback. I'll check out your recommendations.

Thanks for the reply!
 
Old 11-25-2012, 10:27 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,541

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Quote:
but it seemed to have been stuck in the swap partition
The error you report above happens when an editing session in vi crashes or isn't saved/closed properly for whatever reason. The steps you took are the normal remedy for the problem, at least in my experience.
 
  


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
RHEL 6 in VMWare - Always boots to the command line instead of GUI P.S.Shiva Linux - Newbie 8 09-25-2012 01:01 AM
[SOLVED] How to see the RedHat Subcription via command line in RHEL 5 mail4vijay Linux - General 6 04-08-2011 12:42 AM
how to get rid of grub, from grub command line preferably slow_footed_Buffalo Linux - Software 10 03-14-2011 03:45 AM
Issue with line command in RHEL- 5 pramod.srk Linux - Newbie 2 11-10-2009 08:37 AM
Command line/tools in CentOS/RHEL ? tuxuser19 Red Hat 5 10-01-2006 07:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:14 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
Open Source Consulting | Domain Registration