I just installed CentOS 6.2 on my server but it keeps going to the GRUB prompt. I've never used Grub before but did some digging online. Looks like I have to run the kernel command before I can boot the system. However, the kernel command is not running. As I installed the OS I checked the box that said something like "Install boot loader on /dev/sda". The following is what I've done:

grub> find /vmlinuz-2.6.32-220.el6.x86_64

grub> root (hd1,0)

grub> kernel /vmlinuz-2.6.32-220.el6.x86_64 root=/dev/sda1

Error 27: Unrecognized command

I've tried it with and without the root=/dev/sda1, just /dev/sda, also tried a ro inserted in the middle but nothing works. I've read the docs but at a bit of a loss. Any suggestions?

  • I suggest writing a real question... not "any suggestions?" – Chris S Feb 8 '12 at 23:18
  • The question is 'How to boot the server', as noted in the title. I've had my questions downgraded in the past for not showing what I have tried thus far. I'm trying to boot the server and have attempted to do so with the following approach... – ngramsky Feb 9 '12 at 0:13

Your missing commands, which is the main reason your having this problem. I also recommend entering your commands from the edit screen, and then booting with CTRL-X

here is an example, I would assume you will have to change things to fit your installation.

    root (hd1,0)
    kernel /vmlinuz-2.6.18-92.1.22.el5 ro root=LABEL=/
    initrd /initrd-2.6.18-92.1.22.el5.img

If this doesn't point you in the right direction, or you have another error message, comment under this and I will help more in depth.

Also worth mentioning, I believe the default GRUB installed with CentOS is still legacy GRUB. So make sure you don't end up trying answers that are for GRUB2

  • I'm still getting a 'Error 27: Unrecognized command' when I run 'kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=LABEL=/' – ngramsky Feb 8 '12 at 23:43
  • Did you do the initrd section?, And enter these commands from the edit menu. Don't try and do this from the rescue prompt. – J. M. Becker Feb 8 '12 at 23:44
  • The rescue prompt is all I have. I'm on the console of the box, so I'm not aware of another way to do so. What file do I put after initrd? The one you have listed? – ngramsky Feb 8 '12 at 23:46
  • NO, you need to use the filename corresponding to those installed already. what do you mean console of the box? The console is what is called when your running Linux. I assume you mean the GRUB rescue prompt, what happens when you reboot? Do you get any menu at all? – J. M. Becker Feb 8 '12 at 23:48
  • Yes, I believe this is the rescue prompt. I've yet to get a login prompt for teh box. I did an install of CentOS on the box and each time I boot the box I am left at the Grub prompt. I do not get a menu, least I do not believe I do. The box is in a datacenter that I cannot access very easily. Is there a way to reboot the box again from Grub? I'll try the initrd command as well at this point.... – ngramsky Feb 8 '12 at 23:51

I was never able to boot the server, nor was anyone else on site who knows anything about Linux. We re-did the install and accepted the default values CentOS provided after selecting the 'Use all Space' option. Apparently not setting your own custom partitions worked. I've set partitions hundreds of time on other systems with no issues but this CentOS install did not like this. Unsure if anyone else has run into this or not but it is something to consider if anyone else runs into the same issue when performing an install the way I did.


You were using documentation for grub-legacy with grub2. they are not compatible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.