You are not logged in.

#1 2020-08-03 17:54:43

pk.gmp
Member
Registered: 2020-06-15
Posts: 44

mkinitcpio vs dracut

Background: Since last one month or so, due to i915 related issues for my very old macbook pro on kernel 5.7.x I was required to compile custom kernel. Technically, I can boot using lts kernel or linux-clear-bin, but they somehow don't satisfy my requirements fully. So I ended up using https://aur.archlinux.org/packages/linux-next-git/. I liked the idea of using fresh kernel so much that I started compiling these sources every now and then during my lunch hours. Fast forward some compilations, I realized I can reduce the compilation time by compiling only those modules which I use. This is well documented in arch wiki. So now, I only take the sources from kernel.org per this aur package and try to compile myself fresh kernel (based on infrastructure as available from the linux-next-git package). So far so good.

So what is the issue?: Today, I realized that all my prior compiled kernels (till 0731) boot properly, except today's. Today's compiled kernel gave me kernel panic during boot saying root file system is not found and essentially kernel bailed on me.

Analysis: I noticed that I had not changed my config file or any compilation settings in a while now. Only difference was I had new sources. Reflog shows me that there is a new change coming in post 5.8 kernel that is about zstd support in initramfs (or something like that). I tried changing kernel config, without any success. So I restored my original setup (which is that git package I refered to earlier) and tried changing my mkinitcpio config to see if that helped. After reading a bit more I realized that there was a mention in the past about dracut vs mkinitcpio https://lists.archlinux.org/pipermail/a … 29570.html. So I won't be filing a bug report for mkinitcpio for now.

Fix for my issue today: I ended up keeping my already compiled kernel for 0803 and installing dracut per archwiki. The same kernel, when initramfs is changed (generated from mkinitcpio vs dracut), is booting smoothly.

FAQ:
1. Issue related to i915 in short is that since 5.7.x it appears we need to use intel_iommu=yes or something similar kernel parameter. In absence of this, stock archlinux kernel won't allow me to boot into graphical mode. Known issue. Thanks to awesome people here who dug deeper and identified the fix for 5.7.x kernel for arch.
2. I can't use linux-clear-bin kernel because I have been using apparmor and apparently this kernel doesn't come with apparmor precompiled (or the way it is right now, my apparmor doesn't work). So I will be required to compile my own custom kernel anyways.
3. Why do I compile my kernel these days? .. Earlier it was required to diagnose that i915 issue, then for apparmor for linux-clear-bin. Now I use it simply to keep learning and observing new kernel features to help me with my day job.
4. Why am I posting? I hope my trial and errors might help someone. I also hope I will get some ideas based on responses this post, which will be interesting to try. At last but not the least, I wanted to thank maintainers of dracut and all awesome people here smile

Offline

#2 2020-08-03 18:00:00

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 29,049
Website

Re: mkinitcpio vs dracut

Custom 5.8.0 boots with both dracut and mkinitcpio for me; no specific kernel parameters necessary.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2020-08-03 18:10:16

pk.gmp
Member
Registered: 2020-06-15
Posts: 44

Re: mkinitcpio vs dracut

Thank you @jsonwryan, would you mind sharing your kernel config file used during compilation? or diff with the linux-next.git version of config file? Just curious about what do I need to tweak in my set up.
For me custom 5.8.0 compilation has IOMMU related kernel param = "y" (this is to allow using i915). I also don't compile many modules these days. Perhaps I need some module/configuration that I don't know in order to keep using mkinitcpio.

Offline

#4 2020-08-03 18:34:11

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 29,049
Website

Re: mkinitcpio vs dracut


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2020-08-03 19:19:59

pk.gmp
Member
Registered: 2020-06-15
Posts: 44

Re: mkinitcpio vs dracut

Thank you @jasonwryan, I will go through this in details. It might need me some work at my end.

On a cursory look, you don't seem to compile apparmor - not that it would matter for my current issue. Number of modules I compile is very less as opposed to your config file. So there are many permutations to consider for me. I will try to post my config file some place safe.

It must be something in my set up that is different. I am now curious to know.

On a side note, you also have CONFIG_INTEL_IOMMU=y (which was fix for i915 issue for my MBP). This community helped me get past that issue during 5.7.x

I might go silent for a while to compare changes.

Offline

#6 2020-08-04 13:37:41

pk.gmp
Member
Registered: 2020-06-15
Posts: 44

Re: mkinitcpio vs dracut

Got pulled into major assignment. Won't get much time to debug this in next few days. Today as well I am able to use dracut and proceed with 0804 sources compiled kernel boot. At this time I intend to stick with what is working than trying to identify root cause.
Thank you @jasonwryan for your help. I will revisit this topic when I get some breather.

Offline

#7 2020-08-04 14:56:10

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 10,019
Website

Re: mkinitcpio vs dracut

Mod note: not an Arch Discussion, moving to kernel & hardware.


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB