Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

grub stopped working suddenly

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
27 posts
  • 1
  • 2
  • Next
Author
Message
juniper
l33t
l33t
User avatar
Posts: 986
Joined: Fri Oct 22, 2004 12:03 am
Location: we the north

grub stopped working suddenly

  • Quote

Post by juniper » Sun Apr 24, 2005 11:36 pm

hello,

i tried to do a kernel update (something i have done a million times) and all of the sudden grub stopped working.

i did the usual of copying bzImage and System.map to /boot and editting my /boot/grub/grub.conf to include the new kernel.

then, instead of starting, i just get a blank black screen with

GRUB

in the top left corner.

i have used a live cd to look at my grub.conf and i couldn't see a problem. i removed the new boot entry and that didn't fix it.

what could cause this? keep in mind i have done this a million times and all of the sudden this has happened.

help!!!

j
Top
CrazyPyro
n00b
n00b
Posts: 51
Joined: Wed May 21, 2003 1:03 am
Location: Michigan, USA

  • Quote

Post by CrazyPyro » Sun Apr 24, 2005 11:49 pm

I think even if you had a bad config file, GRUB would still start. It's more likely that something's messed with the grub binary. Have you tried reinstalling GRUB? If that fails to solve it, check to see if you've recently upgraded to glibc-2.3.5 - I know the new glibc was causing problems with Nvidia GLX, so who knows what other things it might break...
Top
Bitwaba
n00b
n00b
Posts: 34
Joined: Thu Mar 10, 2005 5:43 pm

  • Quote

Post by Bitwaba » Mon Apr 25, 2005 12:07 am

I'm not sure if i understand you. It sounded like you were saying that you get a black screen after grub tries to boot. If this is the case, then you probably have a bad kernel, so you should boot back up with your old one and recompile the new.

However, if you are getting the black screen when grub is trying to start, then your grub has probably become corrupt some how.
You would probably want to reinstall it. I think you can do this by typing "grub" at your prompt. but if not you probably would have to reemerge it. Either way, i think the info can be found in the gentoo handbook.
Top
widremann
Veteran
Veteran
Posts: 1314
Joined: Mon Mar 14, 2005 9:47 pm

  • Quote

Post by widremann » Mon Apr 25, 2005 2:58 pm

This happened to me too. All you have to do after installing a new kernel is run 'grub-install --recheck /dev/hda' and possible 'grub-install /dev/hda' just to be sure. I think the kernel install somehow messes up GRUB's hardware map. I don't know how or why, but I know that this works, so until they fix the bug, just do this.
Top
Raistlin
l33t
l33t
User avatar
Posts: 691
Joined: Mon May 17, 2004 5:59 pm
Location: Boston, MA

  • Quote

Post by Raistlin » Mon Apr 25, 2005 3:50 pm

widremann wrote:...I think the kernel install somehow messes up GRUB's hardware map. I don't know how or why, but I know that this works, so until they fix the bug, just do this.
Please specify, what you mean by "kernel install". IMHO the most probable thing that prevents grub from loading is a messed-up MBR - and this shld not happen unless you write into the first block of your hd..

cheers, R.
Zwei Was Eins Initially

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
Top
sidkdbl07
Apprentice
Apprentice
User avatar
Posts: 184
Joined: Sun May 25, 2003 5:37 pm

  • Quote

Post by sidkdbl07 » Wed Apr 27, 2005 1:25 am

I have exactly the same trouble. Upon booting, my computer gets oast the bios screen but doesn't get to the grub splash screen. It just says GRUB in the top left corner.

I went in with liveCD and re-emerged grub-0.96-r1.... didn't work
I went in with liveCD and emerged grub-0.94-r1.... didn't work
I went in with liveCD and re-emerged grub-0.96-r1.... didn't work

I tried 'grub-install --recheck /dev/hda' after every install and I get the following error

Code: Select all

Probing devices to guess BIOS drives. This may take a long time.
floppy0: no floppy controllers found
Could not find device for /boot: Not found or not a block device
Any ideas?

P.S. I emerged glibc-2.3.5 at the same time I updated grub yesterday.
Top
penguinlnx
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 124
Joined: Thu Mar 17, 2005 9:20 am
Location: Ice Station Alert AFB
Contact:
Contact penguinlnx
Website

  • Quote

Post by penguinlnx » Wed Apr 27, 2005 2:01 am

I have had that in the past when GRUB tried to write to a Windose Drive BOOT SECTOR and trashed the drive.

GRUB sometimes does this....

My solution is to boot up with the 4-disk Win2K emergency disk set and go into a Win2K commandline. Although there are no decent commands on the disks, there is a built-in command (you can list them by typing HELP) called FIXMBR. this restores the Master Boot Record to a bootable one. There is another command called FIXBOOT you can execute as well.

Now you can usually reinstall your Windows side (dual boot) or reboot off a liveCD and reinstall LINUX using the GUI Partition program in either the VLOS Gentoo disk, or even a RED HAT partition maker. I can't really tell you how to recover critical partitions that may be okay, except to warn you that any FDISK type program can delete them forever, so you should do a listing of your (still usable) partitions from the commandline:

Code: Select all

# FDISK /DEV/HDA

(from within FDISK type: P (list partitions)

and you should get a list of all the partitions of the drive onscreen here.
WRITE THEM DOWN and carefully figure out what each partition really is. (SWAP, ROOT, BOOT etc.)
I hope this is a start for you.
Firewall HardwareCUPS
Top
sidkdbl07
Apprentice
Apprentice
User avatar
Posts: 184
Joined: Sun May 25, 2003 5:37 pm

  • Quote

Post by sidkdbl07 » Wed Apr 27, 2005 2:11 am

I don't have a windows partition. Gentoo is the only thing I run.
Top
penguinlnx
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 124
Joined: Thu Mar 17, 2005 9:20 am
Location: Ice Station Alert AFB
Contact:
Contact penguinlnx
Website

  • Quote

Post by penguinlnx » Wed Apr 27, 2005 4:47 am

In any case, the MBR (master boot record) is either damaged, or GRUB can't find the /boot or /root.

You need to restore the /boot (this shouldn't be too bad if you can reinstall Gentoo without repartitioning your /root partition.
Then you could save most of your files and programs. If you can boot a liveCD and 'see' the other partitions, you can mount them and hopefully copy the files off before reinstalling Gentoo, if you can't actually save the partitions.

Alternately, if you can boot from the CD and get on the web, you could upload the files to a server or another computer on the net.

By the way, I tried that thing by dropping into a commandline and got this:

Code: Select all

#grub-install --recheck /dev/hda <enter>
(fd0)   /dev/fd0
(hd0)   /dev/hda
tux root #
Firewall HardwareCUPS
Top
penguinlnx
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 124
Joined: Thu Mar 17, 2005 9:20 am
Location: Ice Station Alert AFB
Contact:
Contact penguinlnx
Website

  • Quote

Post by penguinlnx » Wed Apr 27, 2005 5:20 am

"DING" Idea: It could be a bad hard drive cable. You should shut down, try unplugging and replugging in your cable, then reinstall GRUB and/or your /boot partition.

For tips on a possible hardware problem, see my thread here;

HARDWARE Failures: READ ME!
http://forums.gentoo.org/viewtopic-t-324144.html

-just in case your problem can't be solved without a bit of maintainence.
Firewall HardwareCUPS
Top
penguinlnx
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 124
Joined: Thu Mar 17, 2005 9:20 am
Location: Ice Station Alert AFB
Contact:
Contact penguinlnx
Website

  • Quote

Post by penguinlnx » Wed Apr 27, 2005 11:36 am

Okay I have a third idea, after trying to reboot from this mess.
Dropping into a commandline and executing grub-install --recheck /dev/hda <enter>was disastrous!
Afterward, my system was unable to reboot! Now the good news: I was able to duplicate your problem.
My machine now boots to a black screen with GRUB> as a prompt.
But now I know what this is: it is the same prompt you get if you run GRUB <enter> from the commandline.
That is, you are looking at the prompt that GRUB gives you, when you are about to manually configure GRUB.
To be exact, on trying to reboot, my screen looked like this:

Code: Select all

GNU GRUB .96 (639k lower/3092840k 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> (if you press TAB here, you get this:)
Possible commands are: background blocklist boot cat (...a whole pile of commands ....HELP ....some more commands).

grub> (if you type HELP here, you get columns with examples of arguments for each command.)
If this is your case, you can probably repair your BOOT partition and get back up again by following your handbook and manually re-installing GRUB. I found that from here (after booting) I could not proceed to a Linux commandline because the kernel was not yet loaded.

I solved my problem this way, and it should work whether or not
you are sitting in GRUB after bootup, or just hung frozen:
  • (1) Reboot with the LiveCD.

    (2) mount the swap drive (make sure you know what the partition was: mine was hda2.)
    a) # mkswap /dev/hda2 <enter>
    b) # swapon /dev/hda2 <enter>

    (3) mount the other boot and root partitions:
    a) # mount /dev/hda4 (yours might be hda3) /mnt/gentoo <enter> (this directory should exist)
    b) # mkdir /mnt/gentoo/boot <enter> (try this, you may already have a dummy folder here named 'boot'. Don't worry if you get an error.)
    c) # mount /dev/hda1 (the boot partition) /mnt/gentoo/boot <enter>
    d) # mount -t proc none /mnt/gentoo/proc <enter> (this I think is necessary when booting off the liveCD)

    (4) chroot to your hard drive:
    a) # chroot /mnt/gentoo /bin/bash <enter>
    b) # env-update <enter> (this may take a couple of minutes...)
    c) # source /etc/profile <enter>
    (You probably don't need to do anything else, if your file systems are intact, other than the GRUB files.)

    (5) Reinstall GRUB:
    a) # grub-install --root-directory=/boot /dev/hda <enter>
    (if you get an error here, make sure you have chrooted and mounted properly, start again.
    That is, Exit and unmount, by following step 6, and reboot with the LiveCD again:)

    (6) Exit the chrooted environment and unmount all partitions:
    a) # exit <enter>
    b) # cd <enter>
    c) # umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo <enter>
    d) # reboot <enter>
    (don't forget to pull the CD out of the drive after you get the blank screen/BIOS screen.)
Doing this restored my bootup to its usual errors,
some of which I haven't fixed yet. Please post a reply whether this works or not for you.
Firewall HardwareCUPS
Top
pazz
Apprentice
Apprentice
User avatar
Posts: 283
Joined: Sun Dec 01, 2002 9:59 pm

  • Quote

Post by pazz » Wed Apr 27, 2005 12:25 pm

hi!
I have the same problem.
I's not the Grub shell i get after rebooting, but just the letters
GRUB after hw related infor of my bios.
no respose to any keypresses from grub.

i also tried to remerge grub, ran grub-install and so on, but still the same error.

pazz
Top
penguinlnx
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 124
Joined: Thu Mar 17, 2005 9:20 am
Location: Ice Station Alert AFB
Contact:
Contact penguinlnx
Website

  • Quote

Post by penguinlnx » Wed Apr 27, 2005 12:39 pm

Note that I am using GRUB .96.

Second, notice that one of the other fellows did this:
I tried 'grub-install --recheck /dev/hda' after every install and I get the following error ...
I now believe this command to be dangerous and probably contains some buggy code.
Until that is clarified, try the instructions I have posted, and let me know if this series of steps works.
The steps I have posted DID work for me, and saved my system and partitions.
Firewall HardwareCUPS
Top
Cintra
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Apr 03, 2004 3:49 pm
Location: Norway

  • Quote

Post by Cintra » Wed Apr 27, 2005 12:49 pm

I guess juniper fixed it.. ;-)
btw for anyone with a floppy the following guide will let you boot from a grub floppy
http://www.wbglinks.net/pages/reads/wbg ... /grub.html
good to have around.. in fact I use it all the time
mvh
"I am not bound to please thee with my answers" W.S.
Top
pamplemousse
Tux's lil' helper
Tux's lil' helper
Posts: 89
Joined: Mon Feb 09, 2004 9:00 am

  • Quote

Post by pamplemousse » Wed Apr 27, 2005 8:56 pm

Hello,

I think I have made a very big mistake. I have following Penguinlnx method. But at the 2nd step, when mounting swapdrive, I have launch this:

Code: Select all

mkswap /dev/hda7
swapon /dev/hda7
, thinking hda7 is my swap partition but NO! it is my boot partition!!!! and my swap partition is hda8. Very very big mistake because now I have lost my boot partition, it is now a swap partition. :x

I have launched System Rescue CD boot disk to verify this and it is right: hda7 and hda8 are now swap partitions.
I actually use Knoppix boot cd to write this message. Have I definitively broken my Gento system? Should I reinstall all my system from the beginning, like a new computer? Installing this Pentium III-500 had taken one week to 10 days in the past... :cry:

Bye.
AMD Sempron 2800+ 64bit, 512 Mo RAM, ATI Radeon 7000 (64Mo), Sound Blaster Audigy 2 Value, 32-bit installation.

Pamplemousse aka Sun Wukong, DJ of The Metropolisians
http://themetropolisians.free.fr
http://www.myspace.com/themetropolisians
Top
penguinlnx
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 124
Joined: Thu Mar 17, 2005 9:20 am
Location: Ice Station Alert AFB
Contact:
Contact penguinlnx
Website

  • Quote

Post by penguinlnx » Wed Apr 27, 2005 9:30 pm

This isn't so bad then:

You only need to redo the BOOT partition.

When you boot the LiveCD, you have to delete the 2nd SWAP partition and re-partition it to be a BOOT partition.
Then re-compile your kernel and install GRUB. This might save the main ROOT partitions if you have files on those.
You could try to do it with one of the GUI driven install disks as well, but this would be experimental.
You could boot with a VidaLinux Install disk, and when you get to the GUI driven Partition program it would be fairly easy to put things right and get your system back up.
You can then convert it to a 'true' Gentoo system later, after recovering your files.
Firewall HardwareCUPS
Top
pamplemousse
Tux's lil' helper
Tux's lil' helper
Posts: 89
Joined: Mon Feb 09, 2004 9:00 am

  • Quote

Post by pamplemousse » Thu Apr 28, 2005 7:16 pm

Hello,

very thank you, penguinlnx, now I can relax. I have launch System Rescue CD to format my hda7 to a ext2 partition. I have boot the LiveCD, and make all the procedures to get the good environment (after chroot). And then, I have compiled the kernel, and emerge Grub.

I have read the old install documentation of Gentoo I had printed the last year when I had installed Gentoo for the 1st time. I have follow all the steps to configure grub. At last, it tells to write the grub.conf file like this:

Code: Select all

# Boot automatically after 30 secs.
timeout 30

# By default, boot the first entry.
default 0

# Fallback to the second entry.
fallback 1

# For booting GNU/Hurd
title  GNU/Gentoo 2.6.9
root   (hd0,6)
kernel (hd0,6)/boot/bzImage root=/dev/hda9
But when rebooting, grub tells me it can't the bzImage file. After trying several possibilites, I found that writing this line:

Code: Select all

kernel /bzImage root=/dev/hda9
works and now my Gentoo system boots well.

Thanks a lot!
AMD Sempron 2800+ 64bit, 512 Mo RAM, ATI Radeon 7000 (64Mo), Sound Blaster Audigy 2 Value, 32-bit installation.

Pamplemousse aka Sun Wukong, DJ of The Metropolisians
http://themetropolisians.free.fr
http://www.myspace.com/themetropolisians
Top
sidkdbl07
Apprentice
Apprentice
User avatar
Posts: 184
Joined: Sun May 25, 2003 5:37 pm

  • Quote

Post by sidkdbl07 » Sat Apr 30, 2005 8:23 pm

No dice yet :?

I get the following error
-> grub-install --root-directory=/boot /dev/hda
Could not find device for /boot/boot: Not found or not a block device
I'm getting really pissed! Sorry to be so krass, but AGGGGGHHHHHHH!!!!!
Top
platojones
Veteran
Veteran
User avatar
Posts: 1602
Joined: Wed Oct 23, 2002 10:48 pm
Location: Just over the horizon

  • Quote

Post by platojones » Sat Apr 30, 2005 8:29 pm

What partition is /boot on in your configuration?
Top
sidkdbl07
Apprentice
Apprentice
User avatar
Posts: 184
Joined: Sun May 25, 2003 5:37 pm

  • Quote

Post by sidkdbl07 » Sat Apr 30, 2005 10:23 pm

/dev/hda1 is /boot (ex2)
/dev/hda2 is swap
/dev/hda3 is /root (reiserfs)
Top
platojones
Veteran
Veteran
User avatar
Posts: 1602
Joined: Wed Oct 23, 2002 10:48 pm
Location: Just over the horizon

  • Quote

Post by platojones » Sat Apr 30, 2005 10:27 pm

Ok, I see the problem. First mount your /boot partition, then give the following grub-install command:

Code: Select all

grub-install /dev/hda1
Top
sidkdbl07
Apprentice
Apprentice
User avatar
Posts: 184
Joined: Sun May 25, 2003 5:37 pm

  • Quote

Post by sidkdbl07 » Sat Apr 30, 2005 11:05 pm

i used livecd 2005.1 to get in.
-> net-setup eth0
-> mkswap /dev/hda2
-> swapon /dev/hda2
-> mount /dev/hda3 /mnt/gentoo
-> mount /dev/hda1 /mnt/gentoo/boot
-> mount -t proc none /mnt/gentoo/proc
-> chroot /mnt/gentoo /bin/bash
-> env-update; source /etc/make.profile
-> grub-install /dev/hda1
Could not find device for /boot: Not found or not a block device
Am I doing something wrong here? I also tried unmerging and the re-emerging grub from scratch... no dice.
Top
platojones
Veteran
Veteran
User avatar
Posts: 1602
Joined: Wed Oct 23, 2002 10:48 pm
Location: Just over the horizon

  • Quote

Post by platojones » Sat Apr 30, 2005 11:08 pm

Mount the /boot partition after you do the 'chroot /mnt/gentoo /bin/bash'.
Top
sidkdbl07
Apprentice
Apprentice
User avatar
Posts: 184
Joined: Sun May 25, 2003 5:37 pm

  • Quote

Post by sidkdbl07 » Sat Apr 30, 2005 11:52 pm

Well... the good news is that I can get into the splash screen. I think I have some upgrading to do to accomodate the new kernel sources, but for now.......yeah, I can login!!!

Thank you for all of those involved.
Top
[sinz]
n00b
n00b
Posts: 71
Joined: Tue Jun 08, 2004 9:28 pm

  • Quote

Post by [sinz] » Sun May 01, 2005 2:56 am

I had the same deal but it was after I updated grub. If you did also, maybe you updated world and didn't notice it? You simply need to type:

Code: Select all

root (hd0,0)
setup (hd0)
boot
at the grub prompt (on the black screen you get when you boot up).
Top
Post Reply

27 posts
  • 1
  • 2
  • Next

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy