# [SOLVED] Everything turns black when loading kernel

## Manu311

I'm desperate now, so I ask for help.

I've totally messed up my root and boot partitions, so I had to reinstall gentoo again (like many times before). It worked so far, but I'm unable to boot into it. I've compiled multiple kernels which all have the exactly same result (including simply calling "genkernel" without a single change, or with only one: the removed fb-drivers).

I'm running on a efi-64 platform with a gpt (so I can't write to an mbr), since I've always used grub2 and know it works with efi, I used that.

Grub 2 is loading via efi (I used one of those buggy ubuntu live cds to use efibootmgr) BUT I can't get it to load the (\EFI\grub2\) grub.cfg it has created via "grub2-mkconfig" (in which my kernels were not recognized - at least on the gentoo live cd). I can execute it via the configfile command in grub, but that throws 4 errors:

```
out of memory

syntax error

Incorrect command

syntax error
```

 Anyways I'm able to see all files on every partition and am able to "boot" kernels via that. I also used Super Grub Disk 2 to boot my kernels (including initram of course) - same result.

So after all here's the real problem (I'll use efi stub later, so the grub is only temporary):

Whenever my kernel starts to boot, I get a blank screen, if I don't "insmod all_video" (or load the "corrupted" configfile) in grub2 before I get:

```
no video mode activated

Booting in blind mode
```

 In both cases I recognize my computer is not entirely frozen, e.g. my keyboard leds are working, but I'm unable to login and reboot.

I have no idea what could cause this, I have nothing special in my kernel, I know which modules my hardware needs - all are there. I disabled every framebuffer device - since I think that would be the most logical cause for this. And I even tried to boot a kernel that I haven't even touched (genkernel, without any changes) - always the same, not even a warning.

I have no more ideas what I could do, please help me.

More facts:

gentoo-sources-3.3.3

grub-2.00-beta5

64 bitLast edited by Manu311 on Mon May 28, 2012 3:03 am; edited 1 time in total

----------

## krinn

This

 *Manu311 wrote:*   

> 
> 
> Whenever my kernel starts to boot, I get a blank screen, if I don't "insmod all_video" (or load the "corrupted" configfile) in grub2 before I get:
> 
> ```
> ...

 

And this

 *Manu311 wrote:*   

> I know which modules my hardware needs - all are there.

 

contradict each other

----------

## Manu311

That error is not caused by my kernel but by grub. I don't know much about grub, so I don't know which modules I have to load from inside of grub, all_video obviously to solve the error message.

I've even tried "allyesconfig" and the error is exactly the same: none, just a black screen. Appending vga=normal doesn't help neither.

----------

## Logicien

These are references that can help. I can't help more, I never had and (U)EFI firmware and GPT hard drive.

Unified Extensible Firmware Interface - ArchWiki - Wiki - Arch Linux

UEFI - Gentoo Linux Wiki

----------

## Manu311

I know that a normal kernel, that has been able to boot from a msdos pt can be booted without recompiling or changing options, is bootable (without even a warning) from a efi booted grub 2. I've had that earlier.

More or less my grub2 is booting (it doesn't load the config file, but that shouldn't be critical) and I find the kernel files, I just can't boot them.

Since my GPT is not any longer able to contain mbrs, I can't install a grub from that, but anyways, even from a super grub disk without anything related to gpt (well the partition where my kernel is, is on a gpt but super grub disk is able to find it) it's the same issue.

My conclusion is I missed a kernel option somewhere, not nessessarly related to grub, efi or gpt. I just can't find the issue. And I mentioned all that simply to give as much informations as possible which may be related to my problem.

Is it possible to transfer the kernel from the live cd to my hard disk and boot that one via grub? Or any other kernel I don't need to configure but will work 100% (not optimized ofc)?

//EDIT: I'm reading through that page you mentioned and double check everything, at least at some of the tries I disabled the efiFB together will all the other framebuffers.

//EDIT2: Well I found one option I forgot: "CONFIG_FRAMEBUFFER_CONSOLE" was disabled - I enabled it, started the new kernel, both via efi and via grub, and was very surprised when I ended up with black screens -.-.

//EDIT3: I found the solution, I used the kernelcommandline to tell it where the initrd is located (I thought I had to do it this way, since my last tutorial hasn't offered alternatives without installing grub) and I did a small little misstake, I wrote: initrd=/EFI/..... but that beginning slash was wrong and caused all this, I changed it to initrd=EFI/.... and it booted (well it was my first try to configure this one, so I got an other kernel panic since I forgot something, but nvm).

And that only took me around 12 hours, men I'm fast -.-.Last edited by Manu311 on Mon May 28, 2012 3:01 am; edited 1 time in total

----------

## Logicien

If you can use live-cds, it is because Linux kernels can use UEFI/GTP, or they boot in BIOS/MBR compatibility mode.

With UEFI/GPT, you only need the EFI framebuffer driver compile in the kernel to have video support. You need console framebuffer and others mandatory supports too in the kernel.

I you cannot resolv your Gentoo problem, you should try to install ArchLinux and see if Grub2 (Grub 1 is the default I think) can be load with it's configfile by UEFI boot manager and if the Arch kernel load properly.

----------

## Logicien

Even if your kernel is correctly configure to have EFI framebuffer support, if in plus you enabled Kernel Mode Setting (KMS) for your graphic card (Ati/Amd, Nvidia or Intel) by default, and you do not have the required firmware for it in the kernel or initrd, KMS will replace the EFI framebuffer at boottime. Because KMS cannot find it's firmware, it will give you a blank screen.

So here, KMS must be disable in kernel or with kernel parameter or have the proper firmaware.

----------

