LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-08-2012, 08:24 AM   #1
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Question Download GRUB2 for CentOS 6


Dear All,

I am using a CentOS 6.2 64 Bit server (VMWare Virtual Machine).

While browsing some linux sites, I found that using GRUB2, we can have /boot on LVM/RAID. Just wanted to try my hands on it, but I am unable to find any GRUB2 RPM file.

I cannot update by GRUB too through any third party RPM repositories since I do not have an internet connection on the Linux box.

It would be great hep if anyone can provide links to download GRUB2 RPM suitable for CentOS 6.
 
Old 06-08-2012, 08:44 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Nothing around that I can see, I'd suggest just using the source.
 
Old 06-08-2012, 09:08 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Be aware that the CentOS 6.2 kernel update procedures won't know how to update the GRUB-2 configuration files.
 
Old 06-08-2012, 09:37 AM   #4
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by acid_kewpie View Post
Nothing around that I can see, I'd suggest just using the source.
Thanks Chris, I just used the source file grub-1.99.tar.gz from here.

I ran the following commands on runlevel 3, but still cannot see GRUB2 files like /etc/default/grub or /boot/grub/grub.cfg
Quote:
tar -xzvf grub-1.99.tar.gz
cd grub
./configure
make && make install
Do I need to make some more changes, forgive my ignorance.
 
Old 06-08-2012, 09:46 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I would expect to need to write those myself. You may find some defaults / examples in the source tree? Note that it's certainly not the source software's job to configure the grub.cfg file, it's the distro installer that would generally do that.
 
1 members found this post helpful.
Old 06-08-2012, 10:15 AM   #6
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Question

Quote:
Originally Posted by acid_kewpie View Post
I would expect to need to write those myself. You may find some defaults / examples in the source tree? Note that it's certainly not the source software's job to configure the grub.cfg file, it's the distro installer that would generally do that.
I got this file in the source tar ball

Code:
#
# Sample GRUB configuration file
#

# Boot automatically after 30 secs.
set timeout=30

# By default, boot the first entry.
set default=0

# Fallback to the second entry.
set fallback=1

# For booting GNU/Hurd
menuentry "GNU (aka GNU/Hurd)" {
	set root=(hd0,1)
	multiboot /boot/gnumach.gz root=device:hd0s1
	module /hurd/ext2fs.static ext2fs --readonly \
			--multiboot-command-line='${kernel-command-line}' \
			--host-priv-port='${host-port}' \
			--device-master-port='${device-port}' \
			--exec-server-task='${exec-task}' -T typed '${root}' \
			'$(task-create)' '$(task-resume)'
	module /lib/ld.so.1 exec /hurd/exec '$(exec-task=task-create)'
}

# For booting GNU/Linux
menuentry "GNU/Linux" {
	set root=(hd0,1)
	linux /vmlinuz root=/dev/sda1
	initrd /initrd.img
}

# For booting FreeBSD
menuentry "FreeBSD (or GNU/kFreeBSD), direct boot" {
	set root=(hd0,1,a)
	kfreebsd /boot/kernel/kernel
	kfreebsd_loadenv /boot/device.hints
	kfreebsd_module /boot/splash.bmp type=splash_image_data
	set kFreeBSD.vfs.root.mountfrom=ufs:ad0s1a
}
menuentry "FreeBSD (or GNU/kFreeBSD), via /boot/loader" {
	set root=(hd0,1,a)
	kfreebsd /boot/loader
}

# For booting NetBSD
menuentry "NetBSD" {
	set root=(hd0,1,a)
	knetbsd /netbsd
}

# For booting OpenBSD
menuentry "OpenBSD" {
	set root=(hd0,1,a)
	kopenbsd /bsd
}

# For booting Microsoft Windows
menuentry "Microsoft Windows" {
	set root=(hd0,1)
	chainloader +1
}

# For booting Memtest86+
menuentry "Memtest86+" {
	set root=(hd0,1)
	linux16 /memtest86+.bin
}

# Change the colors.
menuentry "Change the colors" {
	set menu_color_normal=light-green/brown
	set menu_color_highlight=red/blue
}
I think I need to create a file /boot/grub/grub.cfg similar to below one.
Code:
#
# Sample GRUB configuration file
#

# Boot automatically after 30 secs.
set timeout=30

# By default, boot the first entry.
set default=0

# Fallback to the second entry.
set fallback=1

# For booting GNU/Linux
menuentry "GNU/Linux" {
	set root=(hd0,1)
	linux /vmlinuz root=/dev/sda1
	initrd /initrd.img
}

I am not sure which all files needs to be removed/created from /boot/grub directory to boot from GRUB2. Any suggestions/links for this ? Thanks for all your help.
 
Old 06-08-2012, 10:35 AM   #7
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Question Done :)

Hi Chris,

These commands helped me. I am able to boot from grub2.

Quote:
/usr/local/sbin/grub-mkconfig -o /boot/grub/grub.cfg
/usr/local/sbin/grub-install /dev/sda
mv -v /boot/grub/grub.conf /boot/ (Can be removed too)
Now, my next step is to try LVM/RAID on /boot.

Last edited by vikas027; 06-08-2012 at 10:37 AM.
 
Old 06-08-2012, 01:37 PM   #8
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
[deleted]

Last edited by rknichols; 06-08-2012 at 01:41 PM. Reason: Misunderstood to whom a comment was directed
 
  


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
LXer: openSUSE 12.2 Milestone 2 Available For Download, Comes With Grub2 LXer Syndicated Linux News 0 03-20-2012 10:10 AM
[SOLVED] GRUB2 after a minor update of GRUB2 /boot prefix no longer needed?? wikapuki Linux - Software 1 10-24-2010 02:39 PM
Where can I download CentOS vampirebuffy Linux - Newbie 4 02-10-2010 11:21 PM
centOS how much cd download kara_lahana Linux - Server 1 06-11-2007 05:10 AM
About download CentOS satimis Linux - Distributions 2 11-14-2006 09:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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