# Grub: Unknown Filesystem and kernel panics

## Gooberpatrol66

BTRFS/GRUB2/UEFI mode/core i5/hp elitebook

I have a gentoo installation that I'm trying to boot.

The kernel is a default genkernel except with btrfs support.

When I boot the hard drive, instead of the GRUB2 menu, I get a GRUB: Unknown Filesystem error.

For some reason, if I browse for the grub.efi file in /boot with my PC's BIOS, the GRUB2 menu will load successfully, and linux gets pretty far into the boot sequence, until the kernel panics. 

I have tried recording for what leads to the kernel panic, but it happens too fast, the screen ghosts, and it's impossible to read.

----------

## TigerJr

Maybe btrfs drivers with genkernel contained in intrd file?

----------

## szatox

I guess you have grub2, you were doing _something_ with it, and forgot to reinstall it afterwards so you have an inconsistent bootloader now.

Maybe a stage file is missing or damaged. Reinstalling it (grub-install or whatever it uses now, not emerge -1 grub  :Laughing:  ) should help with it.

However, since you have a more-or-less working EFI setup, do you still need that grub at all?

----------

## Gooberpatrol66

Alright, so apparently, my PC's EFI isn't complete and not supposed to be used or something, so I solved the grub issue by switching to BIOS mode and reinstalling grub. I'm still getting kernel panics though.

http://imgur.com/YX4QgOZ

----------

## s4e8

The busybox inside initrd crashed, it contains invalid instructions for your CPU. You may compile it with wrong CFLAGS.

 *Gooberpatrol66 wrote:*   

> Alright, so apparently, my PC's EFI isn't complete and not supposed to be used or something, so I solved the grub issue by switching to BIOS mode and reinstalling grub. I'm still getting kernel panics though.
> 
> http://imgur.com/YX4QgOZ

 

----------

## Gooberpatrol66

 *Quote:*   

> The busybox inside initrd crashed, it contains invalid instructions for your CPU. You may compile it with wrong CFLAGS. 

 

Reemerging busybox didn't fix it.

CFLAGS="-march=x86-64 -Os -pipe"

cpuflags are disabled.

busybox: ipv6 static systemd

----------

## s4e8

genkernel build&cache it's own busybox. You can remove initrd and skip busybox, just build root disk controller & fs driver into kernel, and use root=/dev/sdX or root=PARTUUID=xxxxx.

 *Gooberpatrol66 wrote:*   

>  *Quote:*   The busybox inside initrd crashed, it contains invalid instructions for your CPU. You may compile it with wrong CFLAGS.  
> 
> Reemerging busybox didn't fix it.
> 
> CFLAGS="-march=x86-64 -Os -pipe"
> ...

 

----------

## Gooberpatrol66

I fixed it with a rm /var/cache/genkernel/* and running genkernel again.

Thanks.

----------

