You are not logged in.

#1 2016-08-22 00:24:31

Skybrod
Member
Registered: 2016-08-21
Posts: 8

[SOLVED] EFI boot with systemd-boot: kernel panic

Hello, this is my first archlinux installation.

I decided to go for dm-crypt/luks encryption of my drives. Here is my partition scheme:

 NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                  8:0         0      256.2G    0   disk
├─sda1            8:1         0       511M      0   part     /boot
├─sda2            8:2         0       40.5G     0   part
  └─root           254:0     0       40.5G      0   crypt    /
└─sda3            8:3         0       176.8G    0   part
  └─home         254:1     0       176.8G    0   crypt   /home 

I followed Beginner's guide and the the articles about systemd-boot and dm-crypt on Archwiki. After I try to boot into the installed system, I get the screen, which lets me choose different boot options, then an error appears:

kernel panic -not syncing VFS: unable to mount root fs on unknown block (0,0)

My prior steps: after pacstrap into /mnt I have:

  • run

     bootctl install 

    into ESP

  • created /boot/loader/entries/arch.conf:

               title Arch Linux
               efi /vmlinuz-linux
               initrd /intel-ucode.img
               initrd /initframs-linux.img
               options cryptdevice=UUID=<UUID of my /dev/sda2 partition>:root root=/dev/mapper/root quiet rw 

My /boot directory is populated:

 #ls /boot
            EFI initframs-linux-fallback.img initframs-linux.img intel-ucode.img loader vmlinuz-linux

fstab:

/dev/mapper/root    /   ext4   rw,relatime,data=ordered 0 1
/dev/mapper/home   /home   ext4    rw,relatime,data=ordered 0 2
UUID=<myUUID>     /boot     vfat     rw,relatime,fmask=0022,codepage=437,iocharset=iso8859-1, shortname=mixed, errors=remount-ro 0 2

I have also added "encrypt" to HOOKS in mkinitcpio.conf. And I have tried to replace UUID with PARTUUID in /boot/loader/entries/arch.conf, as well as replacing /dev/mapper/root with proper UUID — still no luck. I am not sure, what I am missing here. I have looked for similar posts, but only found ones, where people used grub, not systemd-boot. Should I try different bootloader? Thanks in advance.

Last edited by Skybrod (2016-08-24 00:16:05)

Offline

#2 2016-08-22 09:46:49

mxfm
Member
Registered: 2015-10-23
Posts: 163

Re: [SOLVED] EFI boot with systemd-boot: kernel panic

Hi! I also use encrytion of root and home. I used manual grub configuration. After reading your post I find no evidence that crypt parameters are passed by grub to kernel. Grub should pass cryptdevice and crypto parameters. What is yours grub.cfg? Does it contains crypto option?

Well, it seems I am totally offtopic. If you use LUKS, you don't need crypto option and systemd-boot is itself loader.

Last edited by mxfm (2016-08-22 09:55:40)

Offline

#3 2016-08-22 09:55:49

Skybrod
Member
Registered: 2016-08-21
Posts: 8

Re: [SOLVED] EFI boot with systemd-boot: kernel panic

mxfm wrote:

What is yours grub.cfg? Does it contains crypto option?

Hello. As of now I decided to go with systemd-boot (gummiboot), not with grub. That's why as of now I have no grub.cfg. According to wiki the relevant options are passed to esp/loader/entries/arch.conf, which I did (although, there's probably some mistake in my configuration).

Last edited by Skybrod (2016-08-22 09:58:11)

Offline

#4 2016-08-22 10:03:06

mxfm
Member
Registered: 2015-10-23
Posts: 163

Re: [SOLVED] EFI boot with systemd-boot: kernel panic

Skybrod wrote:

I have also added "encrypt" to HOOKS in mkinitcpio.conf. And I have tried to replace UUID with PARTUUID in /boot/loader/entries/arch.conf, as well as replacing /dev/mapper/root with proper UUID — still no luck. I am not sure, what I am missing here.

Dumb question. Have you rerun mkinitcpio?

AFAIK PARTUUID in kernel parameters is necessary because UUID is fs-specific and is available only after decryption. Before it UUID does not exist. It seems you also need to add /home into crypttab. Using /dev/mapper/root should be fine because name collision in such context is unlikely.

Offline

#5 2016-08-22 10:22:31

Skybrod
Member
Registered: 2016-08-21
Posts: 8

Re: [SOLVED] EFI boot with systemd-boot: kernel panic

mxfm wrote:

Dumb question. Have you rerun mkinitcpio?

Yes, I have. It did not help.

mxfm wrote:

AFAIK PARTUUID in kernel parameters is necessary because UUID is fs-specific and is available only after decryption. Before it UUID does not exist. It seems you also need to add /home into crypttab. Using /dev/mapper/root should be fine because name collision in such context is unlikely.

Yes, I have added /home into crypttab. Well, I'll try to recheck UUID a bit later, when I have time. I have also found this topic. I might try the solution which is proposed there.

Offline

#6 2016-08-23 16:14:06

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: [SOLVED] EFI boot with systemd-boot: kernel panic

Why are your “initramfs” files called “initframs”? Are you using a custom mkinitcpio preset?

Offline

#7 2016-08-23 16:23:20

Skybrod
Member
Registered: 2016-08-21
Posts: 8

Re: [SOLVED] EFI boot with systemd-boot: kernel panic

ukhippo wrote:

Why are your “initramfs” files called “initframs”? Are you using a custom mkinitcpio preset?

I am sorry, I do not fully understand your question. I followed the guide and ran

# mkinitcpio -p linux 

Then I added "encrypt" hook to mkinitcpio.conf, then I reran the command.

Offline

#8 2016-08-23 16:27:39

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,565

Re: [SOLVED] EFI boot with systemd-boot: kernel panic

He's pointing out a typo in your entries/arch.conf

Offline

#9 2016-08-23 16:29:02

Skybrod
Member
Registered: 2016-08-21
Posts: 8

Re: [SOLVED] EFI boot with systemd-boot: kernel panic

Scimmia wrote:

He's pointing out a typo in your entries/arch.conf

I'll check on that. Thank you.

Offline

#10 2016-08-24 00:15:08

Skybrod
Member
Registered: 2016-08-21
Posts: 8

Re: [SOLVED] EFI boot with systemd-boot: kernel panic

Well, I tried a few other things, before I went back to /entries/arch.conf and made a change proposed here , but kept the "efi" line.

    title Arch Linux
           efi /vmlinuz-linux
           initrd /intel-ucode.img
           initrd /initramfs-linux.img
           options initrd=initramfs-linux.img cryptdevice=PARTUUID=<PARTUUID of my /dev/sda2 partition>:root root=/dev/mapper/<mapped name> quiet rw 

I am not sure why it helps, but it does.

wiki states:

For Linux, you can specify linux path-to-vmlinuz and initrd path-to-initramfs; this will be automatically translated to efi path and options initrd=path – this syntax is only supported for convenience and has no differences in function.

From the quoted text if follows (correct me if I am wrong), that you could use the first two parameters or the second two parameters without any difference. Probably (again, I am just assuming), if you go with efi path, you have to use initrd=path. And conversely if you use linux path, you are good with initrd path.

Thanks to everyone for help!

Offline

Board footer

Powered by FluxBB