Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Yet another kernel panic
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
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Sat Mar 19, 2016 8:23 pm    Post subject: [SOLVED] Yet another kernel panic Reply with quote

Dear all,

as the title already mentioned, I'm getting a kernel panic:
Code:
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0800        234441064 sda    driver: sd
  0801             2048 sda1 38a941d4-4610-4165-bda5-a718d11b4629
  0802           131072 sda2 ce455a62-27e8-4fd1-88e5-90e617a8bd5c
  0803           262144 sda3 fa911519-5a87-40d8-9b6d-bfd29b9e841f
  0804        234033752 sda4 ef128816-3a60-48d2-a007-50251763cd62


and actually I don't know whats missing ...

Kernel configuration:
https://bpaste.net/raw/00b289cef131

Grub configuration (manually added rootfstype=ext4. Grub menu is not showing up, it seems my kernel directly becomes invoked):
https://bpaste.net/raw/2c02d50f5205

fstab:
https://bpaste.net/raw/343f1e65955a

lspci -k:
https://bpaste.net/raw/4b93cafa000f

ls -l /dev/disk/by-uuid:
https://bpaste.net/raw/f19aab4ec700

The printed available partition UUIDs in the kernel panic do neither match the output of
Quote:
ls -l /dev/disk/by-uuid
nor the generated grub.cfg.

Many thanks in advance!
Best regards


Last edited by jommes on Sun Mar 20, 2016 1:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43175
Location: 56N 3W

PostPosted: Sat Mar 19, 2016 8:41 pm    Post subject: Reply with quote

jommes,

Welcome to Gentoo.

I suspect that the UUIDs lisled in your post are partition UUIDs, not fiesystem UUID.
Boot your live distro and run /sbin/blkid to chek.

Note that partitions have PARTUUIDs which are the same format (for GPT) as filesystem UUIDs. They are gifferent values and are not interchangable.

It sounds as if your kernel has been made as an EFI stub as if boots directly - no grub menu.
Thats OK but you cannot pass the kernel a root= that way. The kernel command line must be built into the kernel.
Hence your
Code:
VFS: Cannot open root device "(null)"


If you need an initrd with direct booting, it must be built into the kernel too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Sat Mar 19, 2016 9:48 pm    Post subject: Reply with quote

Hi,

thanks for your fast reply.
I understand a lot more now, but not yet everything.

I generated my initramfs through genkernel as shown in the Gentoo handbook:
/boot/initramfs-genkernel-x86_64-4.1.15-gentoo-r1

I guess I have to put this path to the initramfs source file(s) within kernel config.

In the EFI stub kernel guide, they use the file extension .cpio. Do I have to append this extension in the kernel config as well?

Additionally, which initial ramdisk compression algorithms do I require(gzip, bzip2, LZMA, XZ, LZO, LZ4)?

Best regards
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Sun Mar 20, 2016 12:07 am    Post subject: Reply with quote

I removed the initramfs support.

Now, I do get:
Code:
Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance


And yes, /sbin/init does exist ^^
Back to top
View user's profile Send private message
stone821
n00b
n00b


Joined: 18 Mar 2016
Posts: 10

PostPosted: Sun Mar 20, 2016 12:55 am    Post subject: Reply with quote

Hi, jommes
Do you use systemd? You would add init=/usr/lib/systemd/systemd to kernel's boot line
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Sun Mar 20, 2016 11:49 am    Post subject: Reply with quote

Hi stone821,

Quote:
Do you use systemd?


Actually, I selected:
Code:
Gentoo Linux --->
        Support for init systems, system and service managers --->
                [*] OpenRC, runit and other script based systems and managers
                [ ] systemd


For me it doesn't really matter which init system I use.
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Sun Mar 20, 2016 12:39 pm    Post subject: Reply with quote

Now, I added the following kernel boot line:
Code:
boot=/dev/sda2 init=/usr/bin/init-openrc

And I get the first kernel panic again:
Code:
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0800        234441064 sda    driver: sd
  0801             2048 sda1 38a941d4-4610-4165-bda5-a718d11b4629
  0802           131072 sda2 ce455a62-27e8-4fd1-88e5-90e617a8bd5c
  0803           262144 sda3 fa911519-5a87-40d8-9b6d-bfd29b9e841f
  0804        234033752 sda4 ef128816-3a60-48d2-a007-50251763cd62

Going to try with PARTUUID usage in kernel boot line.
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Sun Mar 20, 2016 12:54 pm    Post subject: Reply with quote

Quote:
Going to try with PARTUUID usage in kernel boot line.

Unfortunately, no change in behavior.

But now I recognized he wants to have a root option, but I always set boot ..
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Sun Mar 20, 2016 1:02 pm    Post subject: Reply with quote

Now he managed mounting root partition:
Code:
EXT4-fs (sda4): mounted filesystem with ordered dara mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) readonly on device 8:4.

But fails with:
Code:
Kernel panic - not syncing: Requested init /usr/bin/init-openrc failed (error -2).
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Sun Mar 20, 2016 1:12 pm    Post subject: Reply with quote

I removed the init part of the kernel boot line and now it works fine!
Since I have a running kernel now and using efi stub, I'm going to remove GRUB2 and make use of efibootmgr for multiple kernels.

Does efibootmgr require this tiny partition (sda1)?

Thank you very much
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun Mar 20, 2016 2:34 pm    Post subject: Reply with quote

jommes wrote:
I removed the init part of the kernel boot line and now it works fine! Since I have a running kernel now and using efi stub, I'm going to remove GRUB2 and make use of efibootmgr for multiple kernels.

jommes ... efibootmgr is really only for modifying efivars in NVRAM, so while you could use it as a 'boot manager' it does come with some limitations (such as not providing a means of selecting the kernel, and parameters, at boot time). Generally you'd want something like this, because you never know when some issue with an updated kernel is going to arise. I needn't be grub2 however, I can recommend rEFInd which requires very little in terms of configuration (as it automatically finds any efi executables at boot and provides them as boot entires), and doesn't need reconfigured on kernel updates (just dump the vmlinux-<version>.efi on the ESP or in /boot).

jommes wrote:
Does efibootmgr require this tiny partition (sda1)?

I suspect you mean the ESP (EFI System Partition), code "EF00", yes, its part of the EFI standard ... though what do you mean by "tiny"?

jommes wrote:
Now, I added the following kernel boot line:
Code:
boot=/dev/sda2 init=/usr/bin/init-openrc

Openrc doesn't have its own init, it is sysvinit's /sbin/init that is used to start /sbin/rc ... so the above would definitely fail.

best ... khay
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Sun Mar 20, 2016 3:06 pm    Post subject: Reply with quote

Hi,

with
Quote:
Does efibootmgr require this tiny partition (sda1)?

I meant this 2MB (bios boot) partition, mentioned here:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks#Using_UEFI

Best regards
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43175
Location: 56N 3W

PostPosted: Sun Mar 20, 2016 4:46 pm    Post subject: Reply with quote

jommes,

The BIOS boot partition is used by boot loaders.
With an MSDOS partition table, there is small amont of free space before the first partition. Boot loaders use this.
With GPT, the partition table starts at LBA 1, so the free space is gone.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun Mar 20, 2016 7:29 pm    Post subject: Reply with quote

jommes wrote:
with "does efibootmgr require this tiny partition (sda1)?" I meant this 2MB (bios boot) partition, mentioned here:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks#Using_UEFI

jommes ... I see, no, its not part of the standard, all that is required is an ESP (code "EF00"). The "Defualt Partitioning Scheme" is unrelated to the "Using UEFI" section which proceeds it.

best ... khay
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Sun Mar 20, 2016 7:41 pm    Post subject: Reply with quote

Ah, that means I don't have to care when using GPT?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43175
Location: 56N 3W

PostPosted: Sun Mar 20, 2016 7:57 pm    Post subject: Reply with quote

jommes,

You need it when you use a boot loader with GPT. The boot loader puts its own code there when you install it to the MBR.
Boot loaders won't fit into 446 bytes.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun Mar 20, 2016 8:36 pm    Post subject: Reply with quote

NeddySeagoon wrote:
You need it when you use a boot loader with GPT. The boot loader puts its own code there when you install it to the MBR. Boot loaders won't fit into 446 bytes.

NeddySeagoon ... what "boot loaders" would they be? For those the OP might have on offer (grub2, rEFInd, gummyboot, elilo) they all can "reside in ... ESP".

best ... khay
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43175
Location: 56N 3W

PostPosted: Sun Mar 20, 2016 9:13 pm    Post subject: Reply with quote

khayyam,

grub2 puts its stage 1.5 in the BIOS_boot partition. If it can't, you can force it to use block lists. Its not happy though.
Grub legacy does not understand the BIOS_boot and reverts to loading using a block list when GPT is in use.
lilo closes its eyes and uses a block list all the time, so it won't care.

I'm not familar with other boot loaders ... yet. I tend to treat tem as firmware .. good for the life of the equipment.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun Mar 20, 2016 11:25 pm    Post subject: Reply with quote

NeddySeagoon wrote:
grub2 puts its stage 1.5 in the BIOS_boot partition. If it can't, you can force it to use block lists. Its not happy though.

Neddy ... I don't think this is the case, I can boot {ESP}/efi/grub2/grub2.efi without there being any 'BIOS_boot partition', or grub2 having put anything anywhere.

NeddySeagoon wrote:
Grub legacy does not understand the BIOS_boot and reverts to loading using a block list when GPT is in use. lilo closes its eyes and uses a block list all the time, so it won't care.

OK, but what you seem to be describing is MRB boot methods on GPT disks, not EFI (which basically involves grub2.efi, refind_{x64,ia32}.efi, gummyboot.efi, vmlinuz.efi, etc, being executables stored on a GPT/fat32 partition with the 'EF00' code.

NeddySeagoon wrote:
I'm not familar with other boot loaders ... yet. I tend to treat tem as firmware .. good for the life of the equipment.

Well, grub2 is more like an OS than a firmware, and I'd avoid it at all costs.

best ... khay
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Wed Mar 23, 2016 6:09 am    Post subject: Reply with quote

I tried rEFInd and got no problems without BIOS_boot partition.

Best regards
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