Booting linux from grub2 gets kernel panic - root=null

0

I'm doing my own homebrewed version of linux. The distro works fine but I need to update it to use EFI and GPT partitions. My problem now is that I can't for the life of me get grub2 to boot it. I install the distro on the machine and it boots to the EFI command prompt (this is what I want for now.) From there I load grub. My grub.cfg file is obviously flawed since it goes straight to the command line. I do the following commands:

set root=(hd0,gpt1)
linux bzImage... root=/dev/sda3
boot

The kernel starts booting and then panics because it can't load the root partition - it says root=null which seems to me to be that grub didn't pass the "root=/dev/sda3" kernel option in. I know that both /dev/sda3 and the kernel are fine since I can boot from the EFI command line by going bzImage... root=/dev/sda3 and it works with no problems but I need to get grub2 up and running.

Does anyone know how to fix this issue?

Dan Shernicoff

Posted 2016-04-19T17:46:06.060

Reputation: 1

Can you boot up a live USB stick and check that the partitions still exist? This is what happens when the kernel can't find / – acejavelin – 2016-04-19T18:59:33.830

I can boot from the UEFI command line and linux runs properly I just can't get GRUB to boot linux. – Dan Shernicoff – 2016-04-20T17:31:52.703

No answers