2

I have booted my server, getting some GRUB error and I pasted the error below.

Error Code:-

GNU GRUB version 0.97(502k Lower/496556K upper memory)
[Minimal BASH-like line editing is supported.
For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename]
grub>

Note : -

I have tried to recover the GRUB by following this step.

  1. GRUB is reinstalled on the master boot record:

  2. Boot the system from an installation boot medium.

  3. Type linux rescue at the installation boot prompt to enter the rescue environment.

  4. Type chroot /mnt/sysimage to mount the root partition.

  5. Type /sbin/grub-install /dev/hda to reinstall the GRUB boot loader, where /dev/hda is the boot partition.

  6. Reboot the system.

Again I am getting same error. How can I get the system to boot again?

kasperd
  • 29,894
  • 16
  • 72
  • 122
Nataraj raj
  • 143
  • 1
  • 3
  • 9

2 Answers2

1

Your picture shows a GRUB install, which is apparently working correctly. However it has no menu configured, so you are left with just a command line.

Installing a suitable configuration is simplest to do from the operating system, that you will be booting with the GRUB install. This means you have to type in the commands manually the first time. This is quite doable, since GRUB has usable completion.

Usually you just need to type three commands at the GRUB prompt:

linux /path/to/kernel/image root=/path/to/root/device ro
initrd /path/to/initrd/image
boot

The images are likely to reside in (hd0,0)/boot or (hd0,0)/, but check (hd0,1)/ as well. The kernel image usually has a name starting with vmlinuz and the initrd starting with initrd, completion is your friend here.

kasperd
  • 29,894
  • 16
  • 72
  • 122
  • Thank you for your reply.I will follow the same and update – Nataraj raj Aug 07 '14 at 10:06
  • I tried and got kernel panic error.please find the my screen shot. http://www.screencast.com/users/Raj13aug/folders/Grub%20Error/media/76c66e8b-e65b-4e6a-bdc7-c74e2f18e2a9 – Nataraj raj Aug 07 '14 at 11:07
  • @Natarajraj Looks like you typed `root=/dev/sde3` at the GRUB prompt. But you have no `sde`, perhaps you meant to type `root=/dev/sda3`. – kasperd Aug 07 '14 at 11:15
  • we dont have sda3 partition under my /dev/sd(a,b,c and e1,e2,e3) so let me explain my partions names root is '/dev/sde3' and '/dev/sde1' is for /boot . – Nataraj raj Aug 07 '14 at 13:13
  • @Natarajraj It is quite clear from the picture that `sde` is an empty slot in a card reader. There are ways to configure the boot process to be resilient to renumbering of devices, but you'll need to boot the system before you start reconfiguring it. And in order to boot you have to use the name, which the root device has in your current configuration. So try `root=/dev/sda3` or `root=sda3` or even `root=0803`. – kasperd Aug 07 '14 at 14:02
  • I have tried root=/dev/sda3 .but i m getting some different error.please help me on this issue. – Nataraj raj Aug 09 '14 at 09:55
  • screen shot below: http://content.screencast.com/users/Raj13aug/folders/Grub%20Error/media/4ec15021-84d8-4f4a-8115-64a1e5e5f935/IMAG0401.jpg – Nataraj raj Aug 09 '14 at 09:57
  • @Natarajraj Most of the output looks good, bu these messages are problematic: `chown: invalid user: 'root:root'` `telinit: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security pout expired, or the network connection was broken.` `init: rcS post-stop process (1466) terminagted with status 1`. I am suspecting something is missing from the `/etc` directory. How did you get into this state in the first place? – kasperd Aug 09 '14 at 11:27
  • sorry I could not get what your saying ... – Nataraj raj Aug 11 '14 at 12:37
  • 1
    @Natarajraj What was the server doing prior to this happening? It looks like the server's trashed... – Nathan C Aug 11 '14 at 12:55
  • @NathanC kernel, initrd, and root file system are there. The GRUB config is missing, so he has to type in a few commands manually at the GRUB prompt in order to boot. But the init scripts fail for some reason. The error message about the system not knowing a user called `root` may be a hint. – kasperd Aug 11 '14 at 13:00
  • @kasperd According to [this](https://www.centos.org/forums/viewtopic.php?t=7105) it sounds like his `/etc/passwd` got trashed at some point. Rescue mode or mounting the partition on a working system appears to be his options. – Nathan C Aug 11 '14 at 13:03
  • 1
    @NathanC It is not just `/etc/passwd` which is hosed. Before attempting to fix such a problem, it is useful to have an idea of which files might be hosed, and which can be relied on. The best way to get an idea is to know something about how the problem showed up in the first place. Could be the system newer worked in the first place, because the installer got interrupted half way through. But we haven't been told how it happened. – kasperd Aug 11 '14 at 13:16
0

This page has additional steps on how to configure from grub> prompt

https://www.linux.com/tutorials/how-rescue-non-booting-grub-2-linux/

perfecto25
  • 288
  • 3
  • 7