"/boot/grub/grub.conf" VS "/etc/grub.conf"


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers "/boot/grub/grub.conf" VS "/etc/grub.conf"
# 1  
Old 10-30-2012
"/boot/grub/grub.conf" VS "/etc/grub.conf"

can someone please explain me the difference between these two files:

"/boot/grub/grub.conf" and "/etc/grub.conf" ..
# 2  
Old 10-30-2012
Please post the contents of both files and we can easily tell you the difference Smilie
# 3  
Old 10-30-2012
What does
Code:
ls -l /boot/grub/grub.conf /etc/grub.conf

give?
# 4  
Old 10-30-2012
Sounds like you are on Red Hat or a downstream distribution which uses Legacy GRUB. In this case the real configuration file is menu.lst. Both of the files you mention should simply be links to /boot/grub/menu.lst.
# 5  
Old 10-30-2012
Quote:
Originally Posted by Neo
Please post the contents of both files and we can easily tell you the difference Smilie
understanding Parameters is not a problem, I would never had bothered any of you for a question whose answer I could get by a single google search.

I just want to know why we need two grub.conf ? are they linked in any way ? What is the difference in there functionality.

just to end your curiosity Smilie :

.boot/grub/grub.conf
HTML 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,0)
#          kernel /vmlinuz-version ro root=/dev/vg00/root
#          initrd /initrd-version.img
#boot=/dev/sda
# default=0 # commented out by Proliant HBA install script
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-274.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-274.el5 ro root=/dev/vg00/root rhgb quiet crashkernel=128M@16M elevator=noop
        initrd /initrd-2.6.18-274.el5.img
/etc/grub.conf:
HTML 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,0)
#          kernel /vmlinuz-version ro root=/dev/vg00/root
#          initrd /initrd-version.img
#boot=/dev/sda
# default=0 # commented out by Proliant HBA install script
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-194.8.1.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-194.8.1.el5 ro root=/dev/vg00/root rhgb quiet crashkernel=128M@16M clock=pmtmr divider=10 iommu=soft elevator=noop
        initrd /initrd-2.6.18-194.8.1.el5.img

title Red Hat Enterprise Linux Server (2.6.18-194.3.1.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-194.3.1.el5 ro root=/dev/vg00/root rhgb quiet crashkernel=128M@16M clock=pmtmr divider=10 iommu=soft elevator=noop
        initrd /initrd-2.6.18-194.3.1.el5.img

title Red Hat Enterprise Linux Server (2.6.18-194.11.1.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-194.11.1.el5 ro root=/dev/vg00/root rhgb quiet crashkernel=128M@16M clock=pmtmr divider=10 iommu=soft elevator=noop
        initrd /initrd-2.6.18-194.11.1.el5.img
---------- Post updated at 06:29 PM ---------- Previous update was at 06:28 PM ----------

Quote:
Originally Posted by Scrutinizer
What does
Code:
ls -l /boot/grub/grub.conf /etc/grub.conf

give?
Quote:
Originally Posted by fpmurphy
Sounds like you are on Red Hat or a downstream distribution which uses Legacy GRUB. In this case the real configuration file is menu.lst. Both of the files you mention should simply be links to /boot/grub/menu.lst.
Code:
[wadhwaso@nxetlr22 ~]$ ll !$
ll /boot/grub/grub.conf
-rw------- 1 root root 705 Oct 26 15:02 /boot/grub/grub.conf
[wadhwaso@nxetlr22 ~]$ ll /etc/grub.conf
-rw------- 1 root root 1258 Jan 17  2012 /etc/grub.conf


Not links

Last edited by Scrutinizer; 10-30-2012 at 10:02 AM.. Reason: code tags
# 6  
Old 10-30-2012
The default directory for grub configuration files is: /boot/grub

Some people like to keep their configuration files in the same area and /etc is a natural place for that; hence it would be natural to assume the two files related by a symbolic link

If you look at the grub man pages here (for the man pages listed below), you can get a better idea of this.

Code:
grub-bin2h(1)	     - convert a binary file to a C header
grub-editenv(1)     - edit GRUB environment block
grub-fstest(1)      - debug tool for GRUB filesystem drivers
grub-install(8)     - install GRUB to a device
grub-menulst2cfg(1) - transform legacy menu.lst into grub.cfg
grub-mkconfig(8)    - generate a GRUB configuration file
grub-mkdevicemap(8) - generate a GRUB device map file automatically
grub-mkfont(1)      - make GRUB font files
grub-mkimage(1)     - make a bootable image of GRUB
grub-mklayout(1)    - generate a GRUB keyboard layout file
grub-mknetdir(8)    - prepare a GRUB netboot directory.
grub-mkpasswd-pbkdf2(1) - generate hashed password for GRUB
grub-mkrelpath(1)   - make a system path relative to its root
grub-mkrescue(1)    - make a GRUB rescue image
grub-mount(1)	     - export GRUB filesystem with FUSE
grub-probe(8)	     - probe device information for GRUB
grub-reboot(8)      - set the default boot entry for GRUB, for the next boot...
grub-script-check(1) - check grub.cfg for syntax errors
grub-set-default(8) - set the saved default boot entry for GRUB
grub-setup(8)	     - set up a device to boot using GRUB
update-grub(8)      - stub for grub-mkconfig
update-grub-gfxpayload(8) - update /boot/grub/gfxblacklist.txt
update-grub2(8)     - stub for grub-mkconfig

# 7  
Old 10-31-2012
You can have as many grub configuration files as you like. At the end of the day the only configuration file that GRUB Legacy actually looks at for menu options is /boot/grub/menu.lst.
These 2 Users Gave Thanks to fpmurphy For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Solaris

Changing "rx_queue_number" in "ixgbe.conf". Reboot or Network Restart?

Hi all, First post here. Working on Solaris 10, on a Sun t4-4, need to change RX queue depth(ethernet, not HBA) and was wondering if i could get by with just restarting the network or if i should just bounce the whole shebang. Apologies if i missed a similar thread. if there is one, please... (2 Replies)
Discussion started by: caspnx
2 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. Red Hat

Grub.conf kernel field boot messages verbosity configuration

I am trying to understand what are the differences of boot messages verbosity levels for the kernel field in grub.conf From my research, there appear to be three levels: quiet verbose debug I have also found documents that specify removing quiet from the kernel field. If this is done, is... (1 Reply)
Discussion started by: thaebich
1 Replies

5. Red Hat

Can we specify which grub.conf to use in grub-install.

Hi, Can we specify which grub.conf to use while installing grub on RHEL. We are working on application which requires different grub configurations needed, depending on certain criteria we need to update grub with correct grub.conf. Can we use grub-install for this purpose? (4 Replies)
Discussion started by: successlin
4 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. Shell Programming and Scripting

Parse "masters" ip from named.conf

Hi there, Im' trying to make a script to parse the BIND configuration file from my slave DNS server and obtain a certain parameter. The named.conf file has this format: zone "0.170.20.10.in-addr.arpa" { type slave; file "0/./db.0.170.20.10.in-addr.arpa.bak"; allow-notify {... (2 Replies)
Discussion started by: Citricut
2 Replies

8. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

9. UNIX for Dummies Questions & Answers

better information source than "man rc.conf"?

i find the man page really cryptic. does anyone else have a source that explains how to use this file better? (1 Reply)
Discussion started by: xyyz
1 Replies
Login or Register to Ask a Question