Centos booting with only "GRUB" and stuck there ?

Posted on 2009-07-03
Medium Priority
Last Modified: 2013-12-15

I need an assistant.

It seems that my server failed to boot, when booting from the primary hard disk the screen just display GRUB with no other word and stuck there.

May i know if anybody can help to teach me on how to fix this ?

My O/S is Centos 5.3 Enterprise 64 Bit.

Thank you
Question by:smksa
LVL 88

Assisted Solution

rindi earned 200 total points
ID: 24773168
Did this previously work? If yes, you probably have a hardware error (bad HD or RAM). Test the disk using the HD manufacturer's diagnostic utility, and the RAM using memtest86+. You'll find those tools on the UBCD:


If both test turn out OK, boot with a Parted Magic, and run testdisk on your CentOS HD. that should repair any filesystem errors.


Assisted Solution

glenthorne earned 200 total points
ID: 24773329
I concur with rindi.  I just dealt with this same problem last week.  If all you see if the word "GRUB" on the screen, then you probably have a haddrive problem.  Before you go too far, my preference is to boot to one of the linux distro's "Live" CDs or to a Knoppix distro.  This will allow you to get to the harddrive (if it is still accessible) and backup any data that you need.
LVL 21

Accepted Solution

Daniel McAllister earned 1200 total points
ID: 24773551

Before suspecting the HD, try first to re-install the GRUB boot-sector. Especially if you've done ANYTHING to this drive (like moving ports or removing other drives from the system).

The EASY way to do this is this:
 1) Boot from an installation disk -- it doesn't matter if it's the same version OS as your server is running, so long as the kernel family is the same. I just repaired a GRUB error on a Fedora Core 5 system using a Centos 5.3 install dvd!

 2) "Pretend" you're going to install a new system (that is, just press enter at the boot screen) -- and step through everything (SKIP any CD or DVD media check -- you won't be using it anyway!) UP TO the point where is searches for old installations -- AT THIS POINT, you have a kernel loaded that has scanned your IDE and SATA ports for hard drives and loaded drivers for them (so the /dev/hd* and /dev/sd* entries are there)... so now, all you have to do is get into them!

3) Press CONTROL-ALT-F2 -- which should get you a SHELL prompt...

4) Make sure you know which drive has your system... I usually do something like:
  cd /dev
  for i in sd?1 ; do e2label $i ; done

Which will show you the FileSystem Label (assuming you're using ext2 or ext3 filesystems -- which you SHOULD on boot partitions)

Let's assume that you find your ROOT partition at sda1 (likely, but not required)

5) Now let's mount that drive
   mkdir /mnt/rescue
   mount /dev/sda1 /mnt/rescue

6) If it reports an error, you MAY need to check the filesystem
   umount /mnt/rescue
   fsck -f /dev/sda1 (NOTE: you may want to run fsck with the -C option as well, so see the progression/status)

Then go back and re-mount it (DO NOT run FSCK on a mounted filesystem -- even a ROOT filesystem if you can help it!)
   mount /dev/sda1 /mnt/rescue

7) Here's the "tricky" part -- we're going to tell Linux to CHANGE the location of the kernel's root drive!
   chroot /mnt/rescue

You'll get a new prompt, and your PWD is now / (which is REALLY /mnt/rescue). Now you'll need to be careful, as no startup scripts have been run!

8) Now, all we need to do is re-install the GRUB boot block --
    cd /sbin
    ./grub-install --recheck /dev/sda   (NOTE: note that's /dev/sda, NOT /dev/sda1 !!!)

If GRUB comes back and tells you where fd0 and hd0 (and so forth) are located, you're in good shape!
If GRUB comes back with an error, well post your results here and we'll go from there

BUT -- assuming no error, you've just re-written your boot block and told GRUB how to access your root partition again. You can now reboot off your hard drive again.

HOWEVER: If you've made hardware changes, you MAY need to change your grub.conf file... if so, DO THIS BEFORE REBOOTING:
  cd /boot/grub
  vi grub.conf

The GOOD news is that changing the grub.conf file DOES NOT require you to re-run the grub-install program!

Best of luck!


Assisted Solution

dontdig earned 200 total points
ID: 24773558
do u see just like this?


if its tru then do the following

grub> root (hd0,0)
grub> setup (hd0)
grub> quit

if above doesnt omit any error then yours grub is good to go otherwise u will have to reinstall it ins rescue mode.

like this

grubinstall  /dev/hda(name of urs primary HDD)

LVL 35

Assisted Solution

torimar earned 200 total points
ID: 24776147
I support the solution given by dontdig above. This is the first thing I personally would try.

However, it will only work if your root or boot partition is on sda1. To make sure you actually install with the correct settings, modify the grub commands like this:

grub> find /boot/grub/stage1
(*take the output from here and insert it into the line below*)
grub> root (hd0,0)  (<--- replace "hd0,0" by the output from above)
grub> setup (hd0)
grub> quit

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question