FAQ
Hi,

This morning one of my servers (centos 4.5) refused to boot. The console
shows a lopp message grub loading stage2...

I've been able to boot from the install CD choosing the rescue option. I
can chroot /mnt/sysimage with no problems and even started the services
(network, mysql , httpd etc).

How can I solve this?

I've followed the manual (
http://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-using-grub_002dinstall.html#Installing-GRUB-using-grub_002dinstall)
but now just keeps beeping with the GRUB fixed :)

I have 3 IDE disks, hda, hde and hdg.
My /boot is a raid device /dev/md0 of /dev/(hda2,hde2,hdg2).
cat /proc/mdstat shows all disks online and active in the array.

I have tried the
grub-install --root-directory=boot --no-floppy hd0 (ou /dev/hda).

With the same results.

Ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.centos.org/pipermail/centos/attachments/20070829/5284b678/attachment.htm

Search Discussions

  • Mups.cp at Aug 29, 2007 at 8:11 pm
    What's inside your grub.conf?
    On 8/29/07, mbneto wrote:
    Hi,

    This morning one of my servers (centos 4.5) refused to boot. The console
    shows a lopp message grub loading stage2...

    I've been able to boot from the install CD choosing the rescue option. I
    can chroot /mnt/sysimage with no problems and even started the services
    (network, mysql , httpd etc).

    How can I solve this?

    I've followed the manual
    (http://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-using-grub_002dinstall.html#Installing-GRUB-using-grub_002dinstall
    ) but now just keeps beeping with the GRUB fixed :)

    I have 3 IDE disks, hda, hde and hdg.
    My /boot is a raid device /dev/md0 of /dev/(hda2,hde2,hdg2).
    cat /proc/mdstat shows all disks online and active in the array.

    I have tried the
    grub-install --root-directory=boot --no-floppy hd0 (ou /dev/hda).

    With the same results.

    Ideas?


    _______________________________________________
    CentOS mailing list
    CentOS@centos.org
    http://lists.centos.org/mailman/listinfo/centos
  • Mbneto at Aug 30, 2007 at 1:29 pm
    My grub.conf

    default=1
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title CentOS (2.6.9-55.0.2.ELsmp)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-55.0.2.ELsmp ro root=/dev/md1
    initrd /initrd-2.6.9-55.0.2.ELsmp.img
    title CentOS (2.6.9-55.ELsmp)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-55.ELsmp ro root=/dev/md1
    initrd /initrd-2.6.9-55.ELsmp.img
    title CentOS (2.6.9-42.0.10.ELsmp)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-42.0.10.ELsmp ro root=/dev/md1
    initrd /initrd-2.6.9-42.0.10.ELsmp.img
    title CentOS (2.6.9-42.0.3.ELsmp)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-42.0.3.ELsmp ro root=/dev/md1
    initrd /initrd-2.6.9-42.0.3.ELsmp.img
    title CentOS (2.6.9-42.0.2.ELsmp)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-42.0.2.ELsmp ro root=/dev/md1
    initrd /initrd-2.6.9-42.0.2.ELsmp.img

    My disks

    Disk /dev/hda: 163.9 GB, 163928604672 bytes
    255 heads, 63 sectors/track, 19929 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/hda1 * 1 13 104391 fd Linux raid
    autodetect
    /dev/hda2 14 6387 51199155 fd Linux raid
    autodetect
    /dev/hda3 6388 6452 522112+ 82 Linux swap
    /dev/hda4 6453 19929 108254002+ 5 Extended
    /dev/hda5 6453 19929 108253971 8e Linux LVM

    Disk /dev/hde: 163.9 GB, 163928604672 bytes
    255 heads, 63 sectors/track, 19929 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/hde1 * 1 13 104391 fd Linux raid
    autodetect
    /dev/hde2 14 6387 51199155 fd Linux raid
    autodetect
    /dev/hde3 6388 6452 522112+ 82 Linux swap
    /dev/hde4 6453 19929 108254002+ 5 Extended
    /dev/hde5 6453 19929 108253971 8e Linux LVM

    Disk /dev/hdg: 163.9 GB, 163928604672 bytes
    255 heads, 63 sectors/track, 19929 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/hdg1 1 13 104391 fd Linux raid
    autodetect
    /dev/hdg2 14 6387 51199155 fd Linux raid
    autodetect
    /dev/hdg3 6388 6452 522112+ 82 Linux swap
    /dev/hdg4 6453 19929 108254002+ 5 Extended
    /dev/hdg5 6453 19929 108253971 8e Linux LVM

    Disk /dev/md0: 106 MB, 106823680 bytes
    2 heads, 4 sectors/track, 26080 cylinders
    Units = cylinders of 8 * 512 = 4096 bytes

    Device Boot Start End Blocks Id System

    Disk /dev/md1: 104.8 GB, 104855502848 bytes
    2 heads, 4 sectors/track, 25599488 cylinders
    Units = cylinders of 8 * 512 = 4096 bytes
    On 8/29/07, mups. cp wrote:

    What's inside your grub.conf?
    On 8/29/07, mbneto wrote:
    Hi,

    This morning one of my servers (centos 4.5) refused to boot. The console
    shows a lopp message grub loading stage2...

    I've been able to boot from the install CD choosing the rescue
    option. I
    can chroot /mnt/sysimage with no problems and even started the services
    (network, mysql , httpd etc).

    How can I solve this?

    I've followed the manual
    (
    http://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-using-grub_002dinstall.html#Installing-GRUB-using-grub_002dinstall
    ) but now just keeps beeping with the GRUB fixed :)

    I have 3 IDE disks, hda, hde and hdg.
    My /boot is a raid device /dev/md0 of /dev/(hda2,hde2,hdg2).
    cat /proc/mdstat shows all disks online and active in the array.

    I have tried the
    grub-install --root-directory=boot --no-floppy hd0 (ou /dev/hda).

    With the same results.

    Ideas?


    _______________________________________________
    CentOS mailing list
    CentOS@centos.org
    http://lists.centos.org/mailman/listinfo/centos
    _______________________________________________
    CentOS mailing list
    CentOS@centos.org
    http://lists.centos.org/mailman/listinfo/centos
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.centos.org/pipermail/centos/attachments/20070830/209f2ca4/attachment.htm
  • Ross S. W. Walker at Aug 30, 2007 at 1:49 pm
    From: centos-bounces@centos.org
    On Behalf Of mbneto
    My grub.conf

    default=1
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title CentOS (2.6.9-55.0.2.ELsmp)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-55.0.2.ELsmp ro root=/dev/md1
    initrd /initrd- 2.6.9-55.0.2.ELsmp.img
    title CentOS (2.6.9-55.ELsmp)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-55.ELsmp ro root=/dev/md1
    initrd /initrd-2.6.9-55.ELsmp.img
    title CentOS (2.6.9-42.0.10.ELsmp)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-42.0.10.ELsmp ro root=/dev/md1
    initrd /initrd-2.6.9-42.0.10.ELsmp.img
    title CentOS (2.6.9-42.0.3.ELsmp)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-42.0.3.ELsmp ro root=/dev/md1
    initrd /initrd-2.6.9-42.0.3.ELsmp.img
    title CentOS (2.6.9-42.0.2.ELsmp)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-42.0.2.ELsmp ro root=/dev/md1
    initrd /initrd-2.6.9-42.0.2.ELsmp.img
    Can you boot into any of these?

    My disks
    <snip fdisk dumps look ok>

    ______________________________________________________________________
    This e-mail, and any attachments thereto, is intended only for use by
    the addressee(s) named herein and may contain legally privileged
    and/or confidential information. If you are not the intended recipient
    of this e-mail, you are hereby notified that any dissemination,
    distribution or copying of this e-mail, and any attachments thereto,
    is strictly prohibited. If you have received this e-mail in error,
    please immediately notify the sender and permanently delete the
    original and any copy or printout thereof.
  • Mbneto at Aug 30, 2007 at 2:05 pm
    Hi,

    I can't boot. It simply does not show me the menu of kernels to choose.

    When the problem first manisfested itselfFirst I was getting that loop
    regarding the 'loading stage2'.

    After I tried that grub-install I simply get an infinite loop of beeps!

    :(

    On

    Can you boot into any of these?

    My disks
    <snip fdisk dumps look ok>

    ______________________________________________________________________
    This e-mail, and any attachments thereto, is intended only for use by
    the addressee(s) named herein and may contain legally privileged
    and/or confidential information. If you are not the intended recipient
    of this e-mail, you are hereby notified that any dissemination,
    distribution or copying of this e-mail, and any attachments thereto,
    is strictly prohibited. If you have received this e-mail in error,
    please immediately notify the sender and permanently delete the
    original and any copy or printout thereof.

    _______________________________________________
    CentOS mailing list
    CentOS@centos.org
    http://lists.centos.org/mailman/listinfo/centos
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.centos.org/pipermail/centos/attachments/20070830/f7ba6fd2/attachment.htm
  • Phil Schaffner at Aug 30, 2007 at 2:39 pm

    On Thu, 2007-08-30 at 10:05 -0400, mbneto wrote:
    Hi,

    I can't boot. It simply does not show me the menu of kernels to
    choose.

    When the problem first manisfested itselfFirst I was getting that loop
    regarding the 'loading stage2'.

    After I tried that grub-install I simply get an infinite loop of
    beeps!
    I have seen problems similar to this when BIOS and running system see
    drives in a different order. Try making a GRUB boot floppy or CD, boot
    from it, and use the GRUB shell "find" command to see where it thinks
    things are located. See "info grub" for details. For example, if you
    have a /boot partition:

    grub> find /grub/stage2

    If you do not have a /boot partition:

    grub> find /boot/grub/stage2

    See if the above agrees with where your grub.conf file says the grub
    directory should be on the running system.

    Unless the problem is a hardware failure, you should be able to boot
    from the grub shell by properly specifying root, kernel, and initrd
    lines with command-line completion for the latter two to point to
    desired vmlinuz-<version> and initrd-<version>.img files. Again, will
    need to include /boot on the path if you do not have a /boot partition,
    exclude it if you do. The BIOS and running system can usually be made
    to agree on device ordering by setting BIOS device ordering to match
    what the running system expects, and/or by changing the order things are
    seen via /etc/modprobe.conf. May also have to fix /boot/grub/device.map
    to match.

    Phil
  • Robert at Aug 30, 2007 at 2:59 pm

    mbneto wrote:
    Hi,

    I can't boot. It simply does not show me the menu of kernels to choose.

    When the problem first manisfested itselfFirst I was getting that loop
    regarding the 'loading stage2'.

    After I tried that grub-install I simply get an infinite loop of beeps!

    :(
    Here is a set of steps that I distilled from how-to's that has worked
    for me. It might be worth a try.

    Recovery from a screwed MBR (Install GRUB)

    1. Boot with a rescue CD
    Go through the obligatory BS; network not needed
    2. Once rescue finds Linux, hit OK. Do NOT do the chroot. Run grub.
    Then, from the prompt:
    a. If /boot is an integral part of the / partition:
    grub> find /boot/grub/stage1
    -or-
    b. If /boot is in a separate partition:
    grub> find /grub/stage1
    -in either case-
    Grub answers with drive and partition: (hd1,0)
    3. Set the root for grub:
    grub> root (hd1,0) (or whatever returned above)
    4. Write the MBR on the 1st drive
    grub> setup (hd0)
    (grub will print a bunch of crap, double-checking, and install itself.)
    5. Remove the rescue CD and reboot.

    When entering the values above, pay close attention to spaces and comma
    characters!

    HTH.


    On



    Can you boot into any of these?

    My disks
    <snip fdisk dumps look ok>

    ______________________________________________________________________
    This e-mail, and any attachments thereto, is intended only for use by
    the addressee(s) named herein and may contain legally privileged
    and/or confidential information. If you are not the intended recipient
    of this e-mail, you are hereby notified that any dissemination,
    distribution or copying of this e-mail, and any attachments thereto,
    is strictly prohibited. If you have received this e-mail in error,
    please immediately notify the sender and permanently delete the
    original and any copy or printout thereof.

    _______________________________________________
    CentOS mailing list
    CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos


    ------------------------------------------------------------------------

    _______________________________________________
    CentOS mailing list
    CentOS@centos.org
    http://lists.centos.org/mailman/listinfo/centos

    --
    UNDOCUMENTED ALIEN -- "If they haven't followed the law
    to get here, they are by definition 'illegal'. It's like saying a
    drug dealer is an 'undocumented pharmacist.'"
    -John Varga, Westfield, New Jersey
  • Mbneto at Aug 30, 2007 at 8:21 pm
    Hi Robert,

    I've tried that.

    My /boot is located in a different partition than / so...

    grub>find /grub/stage1
    (hd0,0)
    (hd1,0)
    (hd2,0)

    grub> root (hd0,0) <-- i've tried also the hd1,0 with the same results
    grub> setup (h0,0)
    checking if /boot/grub/stage1 exists...yes
    checking if /boot/grub/stage2 exists...yes
    checking if /boot/grub/e2fs_stage1_5 exists...yes
    Running embed /boot/grub/e2fs_stage1_5 (hd0) 16 sectors succeeded
    Running install /boot/grub/stage1 (hd0) (hd0)1+16p (hd1,0)/boot/grub/stage2
    /boot/grub/grub.conf succeeded

    But no luck with boot. Still a loop but this time nothing appears...

    Recovery from a screwed MBR (Install GRUB)

    1. Boot with a rescue CD
    Go through the obligatory BS; network not needed
    2. Once rescue finds Linux, hit OK. Do NOT do the chroot. Run grub.
    Then, from the prompt:
    a. If /boot is an integral part of the / partition:
    grub> find /boot/grub/stage1
    -or-
    b. If /boot is in a separate partition:
    grub> find /grub/stage1
    -in either case-
    Grub answers with drive and partition: (hd1,0)
    3. Set the root for grub:
    grub> root (hd1,0) (or whatever returned above)
    4. Write the MBR on the 1st drive
    grub> setup (hd0)
    (grub will print a bunch of crap, double-checking, and install itself.)
    5. Remove the rescue CD and reboot.

    When entering the values above, pay close attention to spaces and comma
    characters!

    HTH.


    On



    Can you boot into any of these?

    My disks
    <snip fdisk dumps look ok>

    ______________________________________________________________________
    This e-mail, and any attachments thereto, is intended only for use by
    the addressee(s) named herein and may contain legally privileged
    and/or confidential information. If you are not the intended recipient
    of this e-mail, you are hereby notified that any dissemination,
    distribution or copying of this e-mail, and any attachments thereto,
    is strictly prohibited. If you have received this e-mail in error,
    please immediately notify the sender and permanently delete the
    original and any copy or printout thereof.

    _______________________________________________
    CentOS mailing list
    CentOS@centos.org > http://lists.centos.org/mailman/listinfo/centos


    ------------------------------------------------------------------------

    _______________________________________________
    CentOS mailing list
    CentOS@centos.org
    http://lists.centos.org/mailman/listinfo/centos

    --
    UNDOCUMENTED ALIEN -- "If they haven't followed the law
    to get here, they are by definition 'illegal'. It's like saying a
    drug dealer is an 'undocumented pharmacist.'"
    -John Varga, Westfield, New Jersey

    _______________________________________________
    CentOS mailing list
    CentOS@centos.org
    http://lists.centos.org/mailman/listinfo/centos
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.centos.org/pipermail/centos/attachments/20070830/e90c56a8/attachment.htm
  • Kai Schaetzl at Aug 29, 2007 at 8:31 pm

    Mbneto wrote on Wed, 29 Aug 2007 14:36:49 -0400:

    I have tried the
    grub-install --root-directory=boot --no-floppy hd0 (ou /dev/hda).
    Did you already try a simple
    grub-install (hd0) where hd0 should be the disk that is used for booting
    and first in BIOS? And the grub.conf should reflect that you have a boot
    partition (assuming / is on /dev/md1):
    title CentOS (2.6.18-8.1.8.el5PAE)
    root (hd0,1)
    kernel /vmlinuz-2.6.18-8.1.8.el5PAE ro root=/dev/md1
    initrd /initrd-2.6.18-8.1.8.el5PAE.img


    Kai

    --
    Kai Sch?tzl, Berlin, Germany
    Get your web at Conactive Internet Services: http://www.conactive.com
  • Mbneto at Aug 30, 2007 at 8:03 pm
    Hi Kai,

    I've sent my grub.conf in another post.

    The grub-install hd0 did not work either.

    On 8/29/07, Kai Schaetzl wrote:

    Mbneto wrote on Wed, 29 Aug 2007 14:36:49 -0400:
    I have tried the
    grub-install --root-directory=boot --no-floppy hd0 (ou /dev/hda).
    Did you already try a simple
    grub-install (hd0) where hd0 should be the disk that is used for booting
    and first in BIOS? And the grub.conf should reflect that you have a boot
    partition (assuming / is on /dev/md1):
    title CentOS (2.6.18-8.1.8.el5PAE)
    root (hd0,1)
    kernel /vmlinuz-2.6.18-8.1.8.el5PAE ro root=/dev/md1
    initrd /initrd-2.6.18-8.1.8.el5PAE.img


    Kai

    --
    Kai Sch?tzl, Berlin, Germany
    Get your web at Conactive Internet Services: http://www.conactive.com



    _______________________________________________
    CentOS mailing list
    CentOS@centos.org
    http://lists.centos.org/mailman/listinfo/centos
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.centos.org/pipermail/centos/attachments/20070830/f8425f25/attachment.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcentos @
categoriescentos
postedAug 29, '07 at 6:36p
activeAug 30, '07 at 8:21p
posts10
users6
websitecentos.org
irc#centos

People

Translate

site design / logo © 2021 Grokbase