LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-06-2012, 11:06 AM   #1
jjj0923
LQ Newbie
 
Registered: Jun 2011
Posts: 14

Rep: Reputation: Disabled
need to some identifying where to re-install grub loader on my system.


I have to re-install the grub loader on one of my systems

My Centos installation has 3 partitions
100 meg for /boot
6000 for swap
and the rest is created for /

my device names are:
/dev/dciss/c0d0p1 (boot)
/dev/dciss/c0d0p2 (swap)
and /dev/dciss/c0d0p3 ( / ) respectively.

I am not sure which partition (the boot ‘p1′ or the ‘/’ ‘p3′ should contain the grub loader. My /boot partition is marked as boot with an asterisk?

I am following the instructions provided here:
http://roshan18.wordpress.com/2008/0...b-boot-loader/

however I'm a little concerned because I though I'd be installing the grub loader in (hd0,2) and I dumped the grub.conf file from another system I have that has the exact same disk & partition layout and this is what I see:

[root@myserver-backup grub]# cat device.map
# this device map was generated by anaconda
(hd0) /dev/cciss/c0d0

[root@myserver-backup grub]# cat grub.conf
# 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/cciss/c0d0p3
# initrd /initrd-version.img
#boot=/dev/cciss/c0d0
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-308.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-308.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-308.el5.img
 
Old 12-06-2012, 11:18 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
If the kernel numbers are ok, then it is ok.
Also why can't you automatically install grub?

#grub-install /dev/sda
 
Old 12-06-2012, 12:14 PM   #3
jjj0923
LQ Newbie
 
Registered: Jun 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by amani View Post
If the kernel numbers are ok, then it is ok.
Also why can't you automatically install grub?

#grub-install /dev/sda

it comes back with an error:

"not found or not a block device" and I run it from /sbin where grub-install is located
 
Old 12-06-2012, 12:15 PM   #4
jjj0923
LQ Newbie
 
Registered: Jun 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by amani View Post
If the kernel numbers are ok, then it is ok.
Also why can't you automatically install grub?

#grub-install /dev/sda
what exactly does "If the kernel numbers are ok, then it is ok." this mean?

I don't understand your reply.

given my device names - where should I install the grub loader?
 
Old 12-06-2012, 03:24 PM   #5
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Just run:

Code:
# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
# reboot
 
Old 12-09-2012, 09:57 AM   #6
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Quote:
Originally Posted by jjj0923 View Post
what exactly does "If the kernel numbers are ok, then it is ok." this mean?

I don't understand your reply.


given my device names - where should I install the grub loader?
You said that those were cut pasted.

Since centOS has grub legacy and not grub2,

grub-install /dev/mapper/<FIND THIS NAME>

should be sufficient or follow above post
 
  


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
I have xp & ubuntu onmy system i have lost my grub loader gajananchavan Linux - Newbie 2 02-09-2012 09:33 AM
How do I uninstall Ubuntu and Grub loader from a dual boot system? wired_retired Linux - Newbie 7 08-13-2008 05:59 PM
how can i install a grub loader if my system directly boot windows akhil_jadhav Linux - General 11 08-26-2007 02:23 AM
how i install Grub loader...... ??? crazycracker Linux - Newbie 4 06-01-2003 01:32 PM

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

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