[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: black screen / blinking cursor after grub-install

From: Felix Miata
Subject: Re: black screen / blinking cursor after grub-install
Date: Thu, 11 Aug 2011 19:51:58 -0400
User-agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:6.0) Gecko/20110731 SeaMonkey/2.3

On 2011/08/11 16:11 (GMT-0600) J.V. composed:

 J.V. wrote:

 I have a black screen with a single blinking cursor after running:
     #grub-install /dev/sda1

I tried to do that just now, and it did not work.  I am looking for
additional solutions to make my system boot and undo what #grub-install
/dev/sda1 did

I tried using the CentOS 6 media in rescue mode to do this and got this
#grub-install /dev/sda

/sbin/grub: Not found.

Rescue mode is a limited environment. Grub-install is a shell script that depends on an adequate environment, part of which is the target location being mounted to /boot, part of which includes a proper /boot/grub/ file, and absence of which requires extra parameters on its cmdline for it to work. I find it much easier to ignore the existence of grub-install and use the Grub shell to execute as little as two commands to install Grub.

find /boot/grub/stage1 #only necessary if you are not sure of the ID of the target
root (hd0,0) # sets up partition containing files for Grub shell to work with
setup (hd0,0) # installs grub on the first partition on the first HD

The simplicity of the above can fail if more than one HD is in the system and a correct file cannot be found by the Grub shell in /boot/grub in the specified root partition.

The easiest way to get grub-install to work correctly includes mounting the target on /boot, which a rescue boot will not do automatically.

=>  so that is not possible with the CentOS 6 boot cd in rescue mode.

I then cut a knoppix CD and did the same thing and got

grub-probe: error: cannot finda  device for / (is /dev mounted?).
grub-probe: error: cannot find a device for /boot/ (is /dev mounted?).
Could not find device for /boot: Not found or not a block device.

so my system will not still not boot after completing the advice given.

Booting Knoppix is just another form of rescue boot. Grub-install won't find _your_ /boot directory or file before you mount the correct partition to its /boot directory, or supply appropriate extra command line parameters to it.

The Grub shell commands I gave above will work (I do them as often as I install brand new HDs that I don't clone from an old HD), assuming (hd0,0) aka /dev/sda1 is the appropriate target, but may require disconnecting the other 2 HDs until your problem gets figured out. Also assumed is the standard MBR code from the Windows installation remains on the MBR, and the Grub target partition has its boot flag set, and no other primary partition on the 1st HD has a boot flag set.
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***

reply via email to

[Prev in Thread] Current Thread [Next in Thread]