# Problem with vmlinuz-5.4.60-gentoo-x86_64

## davidbryant

I've been running Gentoo pretty happily since the end of June. I upgraded my kernel from 5.4.38 to 5.4.48 about a month ago without any trouble.

Yesterday when I updated my system Portage found a new set of kernel sources (5.4.60). So this morning I followed the procedure outlined in the wiki ("Kernel/Upgrade") to update my configuration file, and then compiled the new kernel, generated a new initramfs with "genkernel", and updated my grub.cfg file. All of that went smoothly.

But now, when I boot the new kernel it dies in about 3 seconds: kernel panic, can't locate root file system. I tried re-generating the initramfs file ... it was a little bit bigger the second time, but boot still fails with the same error.

I went through the "kern.log" file for the latest boot with 5.4.48, and I do see some messages I hadn't noticed before.

```
Aug 24 06:53:49 localhost kernel: [    3.080530] ahci 0000:00:17.0: Found 1 remapped NVMe devices.

Aug 24 06:53:49 localhost kernel: [    3.080532] ahci 0000:00:17.0: Switch your BIOS from RAID to AHCI mode to use them.

Aug 24 06:53:49 localhost kernel: [    3.080541] ahci 0000:00:17.0: controller can't do SNTF, turning off CAP_SNTF
```

People tell me I don't really need an initramfs if I compile all the right stuff into the kernel. I guess I'll hunt around in the BIOS to see if changing that RAID setting helps me get there (when I remove the "initrd" command from the grub entry for 5.4.48, it dies with the same "kernel panic" message).

Anyway, that's my problem. Any available help is deeply appreciated. No rush. My old kernel is working just fine, so long as I also use the initramfs. Thanks!

----------

## Whissi

The shown message seems to be unrelated to me.

Please always post exact error message genkernel/initramfs is showing you.

In case root cannot be found, please show us used kernel command-line and output of the following command: 

```
lsblk --output NAME,KNAME,FSTYPE,PARTUUID,UUID
```

----------

## davidbryant

 *Whissi wrote:*   

> Please always post exact error message genkernel/initramfs is showing you.

 

I presume you mean when the system dies at bootup.

```
VFS: Cannot open root device "UUID=95358233-7da4-47b7-9f5a-72d0da20830d" or unknown block(0,0): error -6

Please append a correct "root=" boot option: here are the available partitions:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(0,0)
```

There was a litttle more traceback stuff, but it didn't appear to be relevant. I'll post it here if you like ... it's just sort of tedious writing it down from the terminal, and then transcribing it manually.

 *Whissi wrote:*   

> In case root cannot be found, please show us used kernel command-line and output of the following command: 
> 
> ```
> lsblk --output NAME,KNAME,FSTYPE,PARTUUID,UUID
> ```
> ...

 

From the grub.cfg file:

```
echo   'Loading Linux 5.4.60-gentoo-x86_64 ...'

linux   /boot/vmlinuz-5.4.60-gentoo-x86_64 root=UUID=95358233-7da4-47b7-9f5a-72d0da20830d ro  

echo   'Loading initial ramdisk ...'

initrd   /boot/initramfs-5.4.60-gentoo-x86_64.img
```

And here's the "lsblk" command output.

```
localhost ~ # lsblk --output NAME,KNAME,FSTYPE,PARTUUID,UUID

NAME    KNAME FSTYPE  PARTUUID                             UUID

sda     sda                                                

├─sda1  sda1  swap    fc7961be-2e04-4364-99dc-b8186c50acf0 7ed68fc6-ca62-4c51-80f6-cfc717a3b31f

├─sda2  sda2  vfat    04b986da-f129-4c67-90db-fd3d4a04cf2d 1E07-DA7C

├─sda3  sda3  ext4    a9f4576d-a938-487b-ab81-2899e8170a4c 1ab4b739-6c10-4135-8f56-95a15f722de3

├─sda4  sda4  ext4    8757a62d-5750-4b94-ac64-fd14bc5061fb 6a06c8d3-ea48-43d4-ac68-6862e9239bc8

├─sda5  sda5  ext4    c84bfc81-5dbf-4bf5-9c94-3d226535ca72 1b5dc2c6-380c-4436-a31c-a09b330173e1

├─sda6  sda6  ext4    b98701d5-a560-4ad8-bc6a-dca96dcf1fb2 eeafa653-1868-40e9-b7cf-8a8664625a2c

├─sda7  sda7  ext4    4e140e4c-437c-4972-8ec2-8a1fb48d02d5 07c3728f-5bc4-4a58-a939-4aa719b8adde

├─sda8  sda8  ext4    6562ffac-f720-4bd7-8c2b-a3ebd3fe55bc 6b179e2b-3d00-4604-a31e-4b65338a6e18

├─sda9  sda9  ext4    00a6358f-87b4-4d1d-96aa-106d3b9c87b0 3f769870-f951-4e3f-9dc7-7f287f1333de

├─sda10 sda10 ext4    5ce05049-fae1-49a1-b185-310a62536157 ebcdeab3-4c60-4c09-8ef7-58347a8becc3

├─sda11 sda11 ext4    7bea4561-251b-4f3a-bd34-d9e4ad21fbe0 1a6b7a84-e85b-49e6-9ec0-692b8ccd67aa

├─sda12 sda12 ext4    74396d3e-f857-45f1-8773-50a84e16d96a ea13afa5-fb10-432f-9060-b6d12a6bbdf6

├─sda13 sda13 ext4    5846e8a1-aa2f-4ef2-9000-e7108d9f928b 286a14dd-7149-4a0e-a602-8d9e85b5491f

├─sda14 sda14 ext4    0abaa833-bbcc-4d7d-bf2d-26c4a83ee1b1 b027ef8f-5fc2-40e5-9c47-2b53a17fc8fb

├─sda15 sda15 ext4    020ff590-1592-44af-9a75-c23ddaff6ff9 e54ed9b9-1c1e-4543-874b-6c54b50be045

├─sda16 sda16 vfat    025b430b-ff9d-a74a-9f59-e007f33980c7 EE20-AE7E

├─sda17 sda17 ext4    dbe8b6b5-c626-0942-b000-79fdfae39216 feabc236-0a5f-4767-bde5-5b3e6c4991a1

├─sda18 sda18 ext4    9a94b5be-8fa8-744d-b9e5-9fb05e897822 95358233-7da4-47b7-9f5a-72d0da20830d

├─sda19 sda19 ext4    be63d09b-7cef-1e40-94ae-d1200db7446c e84675fd-3ea5-469f-bb8c-7e7bef17a896

├─sda20 sda20 ext4    8eac0426-c6fd-2343-bcf5-04444065b0da 26c26c34-ced2-4a8d-bea6-a6571ae3b6ea

└─sda21 sda21 ext4    00f958c8-47a6-a543-ace7-e831d2874016 15f62210-7096-4e0e-968b-9d77b07eb9d6
```

(Why so many partitions? I have installed 10 different "flavors" of Linux on this hard disk, mainly so I can learn something about a lot of different distros. One of the installed systems ("Solus") is sort of an oddball because it doesn't support grub2. That's why there are two vfat / efi partitions. Gentoo is on /dev/sda18 because it's a lot harder to get going than the other distros. Most of the systems are set up with / and /home on separate partitions.)

Thanks for looking at it. Let me know if you need more information.

----------

## Whissi

This error message is coming from kernel, not from genkernel's initramfs.

Do you actually see anything genkernel-related on boot? Like "Genkernel 4.1.0 (<your build date>), Linux 5.4.60-gentoo-x86_64"? At the moment I would assume that for some reason, initramfs isn't used.

----------

## davidbryant

 *Whissi wrote:*   

> This error message is coming from kernel, not from genkernel's initramfs.
> 
> Do you actually see anything genkernel-related on boot? Like "Genkernel 4.1.0 (<your build date>), Linux 5.4.60-gentoo-x86_64"? At the moment I would assume that for some reason, initramfs isn't used.

 

On a hunch, I used a different program to build the initramfs file, and now my new kernel boots OK. I'm running 5.4.60 right now. I didn't have to regenerate the grrub.cfg; I merely replaced the initramfs.

```
localhost ~ # emerge --ask sys-kernel/dracut

(Compiled & installed Package:    sys-kernel/dracut-049-r3)

localhost ~ # dracut --hostonly --kver 5.4.60-gentoo-x86_64 --force
```

When I updated the whole system yesterday (emerge --update --deep @world) portage installed a new version of "genkernel". Here is the portage log file.

```
(File name is sys-kernel:genkernel-4.1.0-r2:20200824-000851.log -- 1.4 KiB, created 08/23/2020 7:08 pm CDT)

[32;01m * [39;49;00mPackage:    sys-kernel/genkernel-4.1.0-r2

[32;01m * [39;49;00mRepository: gentoo

[32;01m * [39;49;00mMaintainer: genkernel@gentoo.org

[32;01m * [39;49;00mUSE:        abi_x86_64 amd64 elibc_glibc firmware kernel_linux userland_GNU

[32;01m * [39;49;00mFEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox

>>> Unpacking source...

>>> Unpacking genkernel-4.1.0.tar.xz to /var/tmp/portage/sys-kernel/genkernel-4.1.0-r2/work

>>> Source unpacked in /var/tmp/portage/sys-kernel/genkernel-4.1.0-r2/work

>>> Preparing source in /var/tmp/portage/sys-kernel/genkernel-4.1.0-r2/work/genkernel-4.1.0 ...

[32;01m*[0m Applying genkernel-4.1.0-post-release-fixes.patch ...

[A[149C [34;01m[ [32;01mok[34;01m ][0m

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/sys-kernel/genkernel-4.1.0-r2/work/genkernel-4.1.0 ...

>>> Source configured.

>>> Compiling source in /var/tmp/portage/sys-kernel/genkernel-4.1.0-r2/work/genkernel-4.1.0 ...

>>> Source compiled.

>>> Test phase [not enabled]: sys-kernel/genkernel-4.1.0-r2

>>> Install sys-kernel/genkernel-4.1.0-r2 into /var/tmp/portage/sys-kernel/genkernel-4.1.0-r2/image

>>> Completed installing sys-kernel/genkernel-4.1.0-r2 into /var/tmp/portage/sys-kernel/genkernel-4.1.0-r2/image

[32;01m*[0m Final size of build directory:   3968 KiB (  3.8 MiB)

[32;01m*[0m Final size of installed tree:  172316 KiB (168.2 MiB)
```

I looked at the two versions of initramfs-5.4.60-gentoo-x86_64.img in my /boot directory, and noticed that the "dracut" version is about 1 KiB smaller:

Dracut version -- 6,451,191 bytes

Genkernel version -- 6,452,304 bytes

I guess my immediate problem is resolved. But I think there must be something wrong with the binary package that got shipped as a tarball version of "genkernel". Maybe the "post-release-fixes-patch" isn't quite right? Whatever it is, it's probably going to bite somebody else sooner or later.

Let me know if you want any more information, Whissi. Thanks for the help.    :Very Happy: 

----------

## Whissi

You cannot compare dracut and genkernel initramfs by size. They don't share anything. They are completely different initramfs.

----------

## davidbryant

 *Whissi wrote:*   

> You cannot compare dracut and genkernel initramfs by size. They don't share anything. They are completely different initramfs.

 

Well, Whissi, you have piqued my curiosity. I reinstallled the previous version of genkernel (sys-kernel/genkernel-4.0.10) and used that to generate an iinitramfs file for the new kernel. So now I have three versions of the archive to compare.

```
Genkernel 4.1.0-r2  XZ archive  6,444,380 bytes  Kernel panic

Genkernel 4.0.10    GZ archive  7,116,374 bytes  Boots OK

Dracut              GZ archive  6,451,191 bytes  Boots OK
```

When I extract these archives, this is what I see.

```
Genkernel 4.1.0-r2  827 files   15,737,084 bytes  99 sub-folders

Genkernel 4.0.10    260 files   24,085,378 bytes  82 sub-folders

Dracut              827 files   15,737,084 bytes  99 sub-folders
```

But the archives contain some symlinks. When I remove those, I arrive at these statistics.

```
Genkernel 4.1.0-r2  782 files   15,737,084 bytes  98 sub-folders

Genkernel 4.0.10    204 files   24,085,378 bytes  78 sub-folders

Dracut              782 files   15,737,084 bytes  98 sub-folders
```

So it certainly looks as if the old (4.0.10) version of genkernel builds an initramfs file that is  "completely different" from the one created by "dracut". But the new version of genkernel generates exactly the same archive as dracut does, except for the compression method (xz versus gz.).

I went back and checked the .config file I used to compile the new kernel. I have these flags set.

```
CONFIG_HAVE_KERNEL_XZ=y

CONFIG_SQUASHFS_XZ=y

CONFIG_XZ_DEC=y

CONFIG_XZ_DEC_X86=y

CONFIG_XZ_DEC_POWERPC=y

CONFIG_XZ_DEC_IA64=y

CONFIG_XZ_DEC_ARM=y

CONFIG_XZ_DEC_ARMTHUMB=y

CONFIG_XZ_DEC_SPARC=y

CONFIG_XZ_DEC_BCJ=y
```

I also notice that there's a flag CONFIG_DECOMPRESS_GZIP=y.  But I can't find "CONFIG_DECOMPRESS_XZ=y" anywhere . I guess I'll go fiddle with make xconfig ... I see that I did in fact select the option "Include support for XZ compressed file systems" (this set CONFIG_SQUASHFS_XZ=y as shown above -- apparently there is no "decompress" option for XZ) .  

I guess I need to read up about XZ compression, because that certainly looks like the cause of this problem.

----------

## Banana

Does the UUID of a device change with different kernel options?

----------

## Whissi

 *davidbryant wrote:*   

> 
> 
> ```
> Genkernel 4.1.0-r2  782 files   15,737,084 bytes  98 sub-folders
> 
> ...

 Don't get me wrong but that's the proof that you are not using genkernel's initramfs  :Smile: 

Genkernel has *nothing* in common with dracut. Because even the bytes are the same I am very sure you get fooled by the fact that dracut command will generate an initramfs which is named like genkernel's one, i.e. you have overwritten genkernel's initramfs with dracut's initramfs.

----------

## NeddySeagoon

davidbryant,

Compare the sha512sum of the two files.

----------

## davidbryant

Thanks for the suggestion, Neddy.

```
localhost /boot # sha512sum initramfs-5.4.60-gentoo-x86_64.img

f7e2e9cf7a8256d54c3785c64af0074f627565265341df308613f466490486b07d34ef67815007ba14a5651d7f338bbe409d57e3addb90aa7ed9d9a51dffa8e5  initramfs-5.4.60-gentoo-x86_64.img

localhost /boot # sha512sum initramfs-5.4.60-gentoo-x86_64.xz

c640351bc22013846a39a7fc9e1e6468f26aed0c23c8d336a15d133bbf2215b372014379555c4a04d9bc43dfc7f3cd9fdc1a6249290e1167e220462715215002  initramfs-5.4.60-gentoo-x86_64.xz
```

The first file is gzip compressed, and was generated with dracut. The second file was created by genkernel 4.1.0-r2. I renamed it so both files could live in /boot. It is an xz archive.

The reason the second initramfs file won't work is because it has no CRC data. The Linux kernel will not accept an archive that cannot be verified by some sort of CRC check.

https://www.linuxquestions.org/questions/slackware-installation-40/booting-with-xz-compressed-initrd-4175599273/

```
localhost /boot # gzip --list --verbose *.gz

method  crc     date  time           compressed        uncompressed  ratio uncompressed_name

defla dd83e75d Aug 24 23:44             6451085            15469056  58.3% initramfs-5.4.60-gentoo-x86_64.img

localhost /boot # xz --list --verbose *.xz

initramfs-5.4.60-gentoo-x86_64.xz (1/1)

  Streams:            1

  Blocks:             1

  Compressed size:    6,293.3 KiB (6,444,380 B)

  Uncompressed size:  40.1 MiB (42,024,448 B)

  Ratio:              0.153

  Check:              None

  Stream padding:     0 B

  Streams:

    Stream    Blocks      CompOffset    UncompOffset        CompSize      UncompSize  Ratio  Check      Padding

         1         1               0               0       6,444,380      42,024,448  0.153  None             0

  Blocks:

    Stream     Block      CompOffset    UncompOffset       TotalSize      UncompSize  Ratio  Check

         1         1              12               0       6,444,340      42,024,448  0.153  None
```

The first file was generated with dracut. The second one came from genkernel 4.1.0-r2.

I'll get back to you in a little while, Whissi. I did not get confused about which file is which. I know what the problem is, now, and I know how to fix it. But at the moment I have work to do. Later, guys.

----------

## davidbryant

OK, I got some work done. I did all this at one sitting, Whissie. Here is some terminal output.

```
localhost /boot # emerge --search sys-kernel/genkernel

  

[ Results for search key : sys-kernel/genkernel ]

Searching...

*  sys-kernel/genkernel

      Latest version available: 4.1.0-r2

      Latest version installed: 4.1.0-r2

      Size of files: 167,624 KiB

      Homepage:      https://wiki.gentoo.org/wiki/Genkernel https://gitweb.gentoo.org/proj/genkernel.git/

      Description:   Gentoo automatic kernel building scripts

      License:       GPL-2

*  sys-kernel/gentoo-kernel

      Latest version available: 5.4.52

      Latest version installed: [ Not Installed ]

      Size of files: 108,795 KiB

      Homepage:      https://www.kernel.org/

      Description:   Linux kernel built with Gentoo patches

      License:       GPL-2

[ Applications found : 2 ]

localhost /boot # genkernel --install initramfs

* Gentoo Linux Genkernel; Version 4.1.0

* Using genkernel configuration from '/etc/genkernel.conf' ...

* Running with options: --install initramfs

* Working with Linux kernel 5.4.60-gentoo-x86_64 for x86_64

* Using kernel config file '/usr/share/genkernel/arch/x86_64/generated-config' ...

* initramfs: >> Initializing ...

*         >> Appending devices cpio data ...

*         >> Appending base_layout cpio data ...

*         >> Appending eudev cpio data ...

*         >> Appending devicemanager cpio data ...

*         >> Appending auxilary cpio data ...

*         >> Appending busybox cpio data ...

*         >> Appending blkid cpio data ...

*         >> Appending modprobed cpio data ...

*         >> Appending modules cpio data ...

*         >> Appending linker cpio data ...

*         >> Deduping cpio ...

*         >> Pre-generating initramfs' /etc/ld.so.cache ...

*         >> Compressing cpio data (.xz) ...

* 

* You will find the initramfs in '/boot/initramfs-5.4.60-gentoo-x86_64.img'.

* WARNING... WARNING... WARNING...

* Additional kernel parameters that *may* be required to boot properly:

* Do NOT report kernel bugs as genkernel bugs unless your bug

* is about the default genkernel configuration...

* 

* Make sure you have the latest ~arch genkernel before reporting bugs.

localhost /boot # xz --list --verbose initramfs-5.4.60-gentoo-x86_64.img

initramfs-5.4.60-gentoo-x86_64.img (1/1)

  Streams:            1

  Blocks:             1

  Compressed size:    6,294.7 KiB (6,445,788 B)

  Uncompressed size:  40.1 MiB (42,024,448 B)

  Ratio:              0.153

  Check:              None

  Stream padding:     0 B

  Streams:

    Stream    Blocks      CompOffset    UncompOffset        CompSize      UncompSize  Ratio  Check      Padding

         1         1               0               0       6,445,788      42,024,448  0.153  None             0

  Blocks:

    Stream     Block      CompOffset    UncompOffset       TotalSize      UncompSize  Ratio  Check

         1         1              12               0       6,445,748      42,024,448  0.153  None

localhost /boot # rename .img .xz initramfs-5.4.60-gentoo-x86_64.img

localhost /boot # mkdir ForWhissie

localhost /boot # cp initramfs-5.4.60-gentoo-x86_64.xz ForWhissie/

localhost /boot # dracut --hostonly --force

dracut: Executing: /usr/bin/dracut --hostonly --force

dracut: dracut module 'bootchart' will not be installed, because command '/sbin/bootchartd' could not be found!

dracut: dracut module 'dash' will not be installed, because command '/bin/dash' could not be found!

dracut: dracut module 'systemd' will not be installed, because command '/systemd' could not be found!

dracut: systemd-initrd needs systemd in the initramfs

dracut: systemd-networkd needs systemd in the initramfs

dracut: dracut module 'modsign' will not be installed, because command 'keyctl' could not be found!

dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!

dracut: dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!

dracut: dracut module 'btrfs' will not be installed, because command 'btrfs' could not be found!

dracut: dracut module 'dmraid' will not be installed, because command 'dmraid' could not be found!

dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!

dracut: dracut module 'mdraid' will not be installed, because command 'mdadm' could not be found!

dracut: dracut module 'stratis' will not be installed, because command 'stratisd-init' could not be found!

dracut: dracut module 'stratis' will not be installed, because command 'mkfs.xfs' could not be found!

dracut: dracut module 'stratis' will not be installed, because command 'xfs_admin' could not be found!

dracut: dracut module 'stratis' will not be installed, because command 'xfs_growfs' could not be found!

dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!

dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!

dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!

dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!

dracut: 95nfs: Could not find any command of 'rpcbind portmap'!

dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!

dracut: dracut module 'masterkey' will not be installed, because command 'keyctl' could not be found!

dracut: dracut-systemd needs systemd-initrd in the initramfs

dracut: dracut module 'dash' will not be installed, because command '/bin/dash' could not be found!

dracut: dracut module 'modsign' will not be installed, because command 'keyctl' could not be found!

dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!

dracut: dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!

dracut: dracut module 'btrfs' will not be installed, because command 'btrfs' could not be found!

dracut: dracut module 'dmraid' will not be installed, because command 'dmraid' could not be found!

dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!

dracut: dracut module 'mdraid' will not be installed, because command 'mdadm' could not be found!

dracut: dracut module 'stratis' will not be installed, because command 'stratisd-init' could not be found!

dracut: dracut module 'stratis' will not be installed, because command 'mkfs.xfs' could not be found!

dracut: dracut module 'stratis' will not be installed, because command 'xfs_admin' could not be found!

dracut: dracut module 'stratis' will not be installed, because command 'xfs_growfs' could not be found!

dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!

dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!

dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!

dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!

dracut: 95nfs: Could not find any command of 'rpcbind portmap'!

dracut: dracut module 'masterkey' will not be installed, because command 'keyctl' could not be found!

dracut: *** Including module: bash ***

dracut: *** Including module: i18n ***

dracut: i18n_vars not set!  Please set up i18n_vars in  configuration file.

dracut: No KEYMAP configured.

dracut: *** Including module: kernel-modules ***

dracut: *** Including module: kernel-modules-extra ***

dracut: *** Including module: resume ***

dracut: *** Including module: rootfs-block ***

dracut: *** Including module: terminfo ***

dracut: *** Including module: udev-rules ***

dracut: Skipping udev rule: 40-redhat.rules

dracut: Skipping udev rule: 50-firmware.rules

dracut: Skipping udev rule: 50-udev.rules

dracut: Skipping udev rule: 91-permissions.rules

dracut: Skipping udev rule: 80-drivers-modprobe.rules

dracut: *** Including module: usrmount ***

dracut: *** Including module: base ***

dracut: *** Including module: fs-lib ***

dracut: *** Including module: shutdown ***

dracut: *** Including modules done ***

dracut: *** Installing kernel module dependencies ***

dracut: *** Installing kernel module dependencies done ***

dracut: *** Resolving executable dependencies ***

dracut: *** Resolving executable dependencies done***

dracut: *** Stripping files ***

dracut: *** Stripping files done ***

dracut: *** Generating early-microcode cpio image ***

dracut: *** Store current command line parameters ***

dracut: Stored kernel commandline:

dracut:  resume=UUID=7ed68fc6-ca62-4c51-80f6-cfc717a3b31f

dracut:  root=UUID=95358233-7da4-47b7-9f5a-72d0da20830d rootfstype=ext4 rootflags=rw,noatime

dracut: *** Creating image file '/boot/initramfs-5.4.60-gentoo-x86_64.img' ***

dracut: *** Creating initramfs image file '/boot/initramfs-5.4.60-gentoo-x86_64.img' done ***

localhost /boot # rename .img .gz initramfs-5.4.60-gentoo-x86_64.img

localhost /boot # gzip --list --verbose initramfs-5.4.60-gentoo-x86_64.gz

method  crc     date  time           compressed        uncompressed  ratio uncompressed_name

defla 5a3b827c Aug 25 17:55             6409473            15321600  58.2% initramfs-5.4.60-gentoo-x86_64

localhost /boot # cp initramfs-5.4.60-gentoo-x86_64.gz ForWhissie/

localhost /boot # cd ForWhissie

localhost /boot/ForWhissie # ls -a

.  ..  initramfs-5.4.60-gentoo-x86_64.gz  initramfs-5.4.60-gentoo-x86_64.xz

localhost /boot/ForWhissie # sha512sum *.gz

1f79a20de17ce0932074fdd40f95483dd56cfe957f6036be153750a979ceac0b9a715ed21350d6d7a3f3de73303618245d6cdffba3a8d8877de2a0bd6a28bed6  initramfs-5.4.60-gentoo-x86_64.gz

localhost /boot/ForWhissie # sha512sum *.xz

ff4e243df79a290e66da83174bd031f457d3c2fd82b90811cd89b6f4a8ebe36de14d123ce3c2a2f881f30a82fa855e7e74a1b209f8489be1ccfc9ded2ae01ec1  initramfs-5.4.60-gentoo-x86_64.xz
```

Tomorrow I will extract the two archive files in /boot/ForWhissie and demonstrate that, when decompressed, they are substantially the same. Right now I have to feed the dogs anc cook dinner.

----------

## Whissi

I am really not understanding what you are trying to proof. See source code, genkernel's initramfs is created completely differently from dracut's initramfs.

Now that you have dracut installed, do "lsinitrd" on dracut's and genkernel's initramfs. This should be really obvious.

Also, I did a comparison for you, https://dev.gentoo.org/~whissi/initrd_comparison.txt

 *Quote:*   

> I know what the problem is, now, and I know how to fix it.

 I would appreciate if you could share your findings if there is anything.

----------

## telis

Hello.

Sorry to jump in, but I had exactly the same problem.

Although I followed the same procedure as always to manually build the kernel and generate an initramfs with genkernel, I got that kernel panic at bootup.

For some reason sys-kernel/genkernel-4.1.0-r2 generated an xz-compressed initramfs (I verified that all previous initramfs images were gzip-compressed, created with older genkernel versions), which the kernel couldn't handle.

I had to turn on CONFIG_RD_XZ in the kernel configuration to make it work.

It seems to me as a change in the default behavior of genkernel?

----------

## Whissi

Please create an own thread for your problem -- this has nothing to do with the discussed topic.

In genkernel-4.0.10, compression handling was fixed (see https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=944da1fc61bd64a47c2bc6415da5e5d5611b6ff5 / https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=0b5192921d06797c806bf908a0e88c1269f56794 and following commits). This maybe cause switching compression from gzip to xz because 

```
--compress-initramfs-type=best|fastest
```

 is now really honored/checked. If you run 

```
genkernel all
```

 you should end up with working kernel which is able to unpack compressed initramfs. If you only built initramfs and fooled genkernel by providing non-matching kernel config you can end up with problems. If you believe you did everything correct and used genkernel like it is supposed to work but still run into an error please file a bug so we can investigate.

----------

## telis

Thank you for the clarifications Whissi.

I understand that manually building the kernel and then using genkernel just to create an initramfs image may lead to incompatible configurations.

The procedure I've been always using to create a new kernel/initramfs pair just happened to work in the past and stopped working after my latest world update (on which genkernel got updated to 4.1.0-r2 and sys-kernel/gentoo-sources got updated to 5.4.60).

It resulted into a non-booting system, I searched for the symptom and the first hit was this thread -- the problem description in the first post matched my case. The discussion that followed triggered me to look at the type of the generated initramfs images and I was able to figure out what was going on. So I thought to report a solution for the next person that runs into the same problem as me and ends up here.

----------

## davidbryant

I may have created a monster.

I'm sorry to have stirred up so much controversy. When I went back and reviewed what I had done, I realized that I had made a mistake. I'm sorry, Whissi.

I think the real problem is in the "Handbook". It encourages newbies like me to work on kernel configuration, and also points to genkernel as a handy tool for creating an initramfs file. Maybe it ought to reference "dracut".

Here's a link to the chapter I'm talking about. I would gladly edit it, but it's write-protected. And most of the suggestions I have made on the talk pages have been ignored. So there's not much incentive to try to help improve the handbook.

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel

Anyway, it looks as if the bottom line is that one ought not use genkernel to create an initramfs file unless one has also used genkernel to generate the kernel configuration. I'll test that out later today, and post one final message here to let everybody know how it turned out.

----------

## NeddySeagoon

davidbryant,

```
VFS: Cannot open root device "UUID=95358233-7da4-47b7-9f5a-72d0da20830d" or unknown block(0,0): error -6
```

I'm somewhat late to this party but the error unknown block(0,0) means that the kernel and initrd between them cannot communicate with the block device where the root filesystem might be.

An initrd is required when user space tools are required to mount root, or kernel modules must be loaded to mount root.

The former can be avoided for most users by using  root=PARTUUID=. The kernel understands that.

root=UUID requires the userspace mount command.

The latter can be avoided by configuring all the options required to mount root as <*>.

In my case I have root in LVM on raid5, so my April 2009 initrd contains only userspace tools. That makes it kernel agnostic.

Hence I never need to update it.

----------

## davidbryant

Thank you for the information, Neddy. I'll give it a try.

I did regenerate the kernel and the initramfs file for 5.4.60 using "genkernel all".  It boots up fine. The kernel / initrd combination came out about 20% larger than my custom version (19.9 MiB vs. 16.0 MiB), and it takes about 20% longer to get to my sddm login screen (55 seconds vs. 47 seconds). So genkernel is really a very nice tool that saves a lot of work for people who don't want to spend time configuring a custom kernel.

Thanks for the discussion, y'all. I learned a few things.

----------

## Whissi

@davidbryant:

Don't worry, glad we sorted it. I updated handbook in the meanwhile to display a warning, https://wiki.gentoo.org/wiki/Handbook:Parts/Installation/Kernel#Optional:_Building_an_initramfs

----------

## davidbryant

@Whissi:

Looks good. Thank you.

----------

