Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] kernel panic with EFI boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
freifunk_connewitz
Apprentice
Apprentice


Joined: 08 Feb 2006
Posts: 181

PostPosted: Tue Mar 26, 2019 9:45 pm    Post subject: [SOLVED] kernel panic with EFI boot Reply with quote

Hi

Writing this to spare people with the same problem the time I spent on this. So many reboots into the USB live system and chrooting in one day!

Situation: dual boot with Win 10 pre-installed. Brand new UEFI system (Dell Optiplex 7460, i5-8500). Made space for Linux, prepared new partition. Wanted to use EFI to boot the system, that is: copying the kernel, with all needed drivers and the correct info about the root partition built in, to the EPS (EFI boot partition) and telling EFI via efibootmgr about it.

But even in a very basic setup (no root encryption, no LVM) after installation a reboot never succeeded. The kernel always got stuck when it tried to access the root partition: "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(0,0)". I repeat: even when I built the root location into the kernel: CONFIG_CMDLINE="root=/dev/sdaX" (X being the root partition). Even tried it using the PARTUUID of the partition.

I dont know how often I rebuilt the kernel, even with a config that used the - working! - module list from the Gentoo live system (via 'make localyesconfig'). To no avail. So no driver issue.

What in the end helped me was to use a bootloader like I always had. With same kernel, when I installed and configured grub in EFI-mode, all worked.

Conclusion: if a pure EFI boot without bootloader works for you (what is one purpose of the whole thing), fine. If not: do not spent too much time on it. Be aware that any booting problems could just be caused by your EFI not being able to put your kernel into the right environment to find root. The Wiki and the Handbook really should contain a clear disclaimer about this instead of propagating an bootloader-less EFI boot as an viable alternative. It would have spared me a lot of time.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13831

PostPosted: Wed Mar 27, 2019 2:08 am    Post subject: Reply with quote

unknown block(0,0) usually means the kernel does not know how to operate the relevant device. We would need to see the kernel configuration (in a pastebin) and the hardware description to diagnose further. This is the first I have heard of a firmware that works properly when using grub as an intermediary, but fails when booting directly. What firmware is this?
Back to top
View user's profile Send private message
OldTango
l33t
l33t


Joined: 21 Feb 2004
Posts: 603

PostPosted: Wed Mar 27, 2019 8:33 pm    Post subject: Re: [SOLVED] kernel panic with EFI boot Reply with quote

freifunk_connewitz wrote:
Conclusion: if a pure EFI boot without bootloader works for you (what is one purpose of the whole thing), fine. If not: do not spent too much time on it. Be aware that any booting problems could just be caused by your EFI not being able to put your kernel into the right environment to find root. The Wiki and the Handbook really should contain a clear disclaimer about this instead of propagating an bootloader-less EFI boot as an viable alternative. It would have spared me a lot of time.
I respectfully have to disagree with you here. If simply installing a bootloader worked without any kernel or file system changes then I suspect your use of efibootmgr was some how incorrect. On decent modern UEFI systems I only need to use efibootmgr to fix the grap windows sets up. Windows always wants to be the default boot device and almost always sets the boot time out to 0.

I agree with Hu on this one. Something is wrong with your configuration. I stopped using boot loaders (GRUB) when I first started using hardware with UEFI firmware a few years ago. On some early hardware the firmware was not so great and you had to be a lot more careful how you set it up and use efibootmgr to write to the nvram.

Recently I had an older Gigabyte 990FX Gentoo-Linux system sitting around and decided to put back in service as a Windows only machine. I upgraded the hardware to a MSI-X470 board, Ryzen7 processor and ddr4 ram. Added a NVMe SSD drive and left the old Linux disk to be reformatted later as an NTFS storage drive for Windows 10. After Windows was installed and set up properly I rebooted and to my complete surprise the Firmware listed the linux drive as a bootable device. I knew booting it would fail but curious I booted it. Sure enough a predicable kernel panic "unable to find root fs on unknown block(?,?)" No surprise, the root fs was no longer located where the kernel config said it should be.

Installing a bootloader may have SOLVED your issue but it isn't a solution to the problem you were having.
Back to top
View user's profile Send private message
freifunk_connewitz
Apprentice
Apprentice


Joined: 08 Feb 2006
Posts: 181

PostPosted: Mon Apr 01, 2019 10:04 am    Post subject: Reply with quote

hi and thanks for your replies.

for the record: the firmware is on a Dell OptiPlex 7460 AIO, version 1.5.3, with a SSD disk.
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5838

PostPosted: Mon Apr 01, 2019 10:07 am    Post subject: Reply with quote

i've used efi on latitudes without a problem, i wouldn't be surprised if their desktops are any different. strange that it didn't work for you.
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum