LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Grub problem (https://www.linuxquestions.org/questions/linux-software-2/grub-problem-718995/)

perfectpol7 04-14-2009 06:29 AM

Grub problem
 
Hie, I have a experience a problem after power failure on my fedora 10 server. My server normally start in gui mode. But now after the power failure its displaying grub prompt. (The screen had this message:- GNU GRUB version 0.97 9639k lower/3664848k upper memory) {Minimal BASH-like line editing is supported. For the first word, TAB list possible command completions. Anywhere else TAB lists the completions of a device/filename.] then grub>.

How do i recover my normally operating mode, or what are steps or procedures that i may take to return to my level 3 and 5 or the the gui.

Simon Bridge 04-14-2009 08:11 AM

This is because something has gone wrong with the boot and grub needs human intervention. After a power failure, there can be lots of strange things going on. You'll have to figure out what grub needs and supply it.

You may find it easiest to troubleshoot using the recovery mode instead of the grub prompt.

If you want to use this though (it can be useful to know) you need to give grub a bootable configuration. This usually means locating the kernel and root lines grub needs. Like the screen says - press tab for the list of commands.

eg.

geometry (hd0)

will list the partitions on the first HDD.

kernel <tab>

will complete the kernel line that it thinks it should be booting

boot

will try to complete the boot with what it has.


Have a look at:
http://forums.scotsnewsletter.com/in...ST&f=14&t=5025

perfectpol7 04-14-2009 10:15 AM

thanks with the reply

geometry (hd0)

output for the above code is: drive 0x80: C/H?S = 1023/255/63, The number of sectors =312581808, LBA
Partition num:0, Filesystem type unknown, partition type 0x083
Partition num:1, Filesystem type unknown, partition type 0x08e


Have a look at:
http://forums.scotsnewsletter.com/in...ST&f=14&t=5025[/QUOTE]

I have follow the instruction from the above link and the code output are as follows:
grub> root (hd0, is as the same as the geometry code above

grub> root (hd0,1)
Filesystem type unknown,partition type 0x08e
grub> root (hd0,0)
Partition num:0, Filesystem type unknown, partition type 0x083
grub> kernel /boot/
Error 17: Cannot mount selected partion

what should i do then its seem i cannot locate the kernel type on the hda

Simon Bridge 04-14-2009 12:02 PM

IIRC: type 0x083 is ext3 (or reiserfs)
error 17 is "invalid device"
Did you use tab to complete the kernel line? And it complained that the fs could not be mounted after that?

Have you examined the drive under recovery mode?

IIRC: fedora likes to be installed to three partitions by default - root, boot, and swap. Sometimes it gets installed to an LVM volume. Do you remember what you did?

perfectpol7 04-15-2009 02:28 AM

to be honest cannot remember what I did when during the installation, when I tried to chroot /mnt/sysimage
then
grub-install /dev/sda
the output for these code is : The file /boot/grub/stage1 not read correctly

Simon Bridge 04-15-2009 08:18 PM

Your simplest solution is to reinstall - this time being careful about partitions and not using LVM. Hope you did backups.

The hard way:

grub-install cannot read the stage1 files because it cannot read the filesystem. This is either because the FS is corrupt or because it is hidden behind an LVM wrapper.

You should attempt to mount the partitions from the recovery shell, you may have to rebuild the volumes to do that. First try a regular mount ...

perfectpol7 04-16-2009 01:59 AM

Yea that true that I have used LVM for installation, now I need to reinstall and need to create a recovery disk for grub how do I do that. Can I back up the grub or something in case i need to rescue operating system in the case like this happen again.


All times are GMT -5. The time now is 02:07 PM.