You are not logged in.

#1 2018-09-22 13:52:59

4lic3
Member
Registered: 2018-09-22
Posts: 2

[SOLVED] issues with mkinitcpio after update

Hello my lovely Arch users,
I did a system upgrade yesterday (and I messed up) and I ran into a problem, but it might need some context first.

I'm trying to run parallel Linux installations inside a LVM container, two of which are Arch systems sharing the same boot partition (UEFI/GPT).
This led to conflicts regarding the kernel on the ESP root, so I tried changing the secondary kernel filename... Which kinda worked, but was a major pain because whenever I wanted to boot the secondary system I had to rename both kernel files before restarting, and then change them again to return to the main system.
That was a few months ago, since then I had to install Windows, which for a noob like me, means wiping the HD for good and then reinstalling everything.

I reinstalled Arch this week, and I decided to try keeping both kernels in parallel. I've only installed the primary system so far, and I named it 'Outer', and prefixed the name of vmlinuz, initramfs and fallback initramfs with 'outer-[filename]'. I also changed mkinitcpio default preset to both recognize the 'outer-vmlinuz-linux' as the kernel and to generate images with the prefix.
That seemed to work well, until I upgraded yesterday and had to regenerate my initramfs with the up-to-date kernel. I ran into this error:

==> ERROR: '/lib/modules/4.18.8-arch1-1-ARCH' is not a valid kernel module directory

which I assume has to do with me messing up /etc/mkinitcpio.d/linux.preset, but setting kver back to 'vmlinuz-linux' (was 'outer-vmlinuz-linux') in that file did not fix it.

So here I am. I want help in understanding what is happening and how can I regenerate my initramfs. I'd also be very happy to hear some input on managing different kernels and initram images, since I can't understand the wiki articles about them.

Thanks for your attention. Although I've been using Arch for a while now, this is my first post on the forums, so please give me feedback if something's wrong.
Att,
Alice.

Here is the output of the update after which I couldn't generate images anymore:

% sudo pacman -Syu                                                 :(
:: Synchronizing package databases...
 core                       134.3 KiB   376K/s 00:00 [############################] 100%
 extra                     1635.1 KiB   520K/s 00:03 [############################] 100%
 community                    4.6 MiB   520K/s 00:09 [############################] 100%
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (35) akonadi-18.08.1-2  boost-libs-1.68.0-1  cairo-1.15.14-1  ffmpeg-1:4.0.2-3
              gdbm-1.18-1  ghostscript-9.25-3  gtk-update-icon-cache-3.24.1-1
              gtk3-3.24.1-1  kig-18.08.1-2  kopete-18.08.1-3  libkolabxml-1.1.6-9
              librsvg-2:2.44.3-1  libsoup-2.64.0+10+g263fb57d-1  libssh-0.8.3-1
              linux-4.18.9.arch1-1  lz4-1:1.8.3-1  mkinitcpio-busybox-1.29.3-1
              qt5-base-5.11.2-1  qt5-declarative-5.11.2-1
              qt5-graphicaleffects-5.11.2-1  qt5-location-5.11.2-1
              qt5-multimedia-5.11.2-1  qt5-quickcontrols-5.11.2-1
              qt5-quickcontrols2-5.11.2-1  qt5-script-5.11.2-1  qt5-sensors-5.11.2-1
              qt5-speech-5.11.2-1  qt5-svg-5.11.2-1  qt5-tools-5.11.2-1
              qt5-webchannel-5.11.2-1  qt5-webengine-5.11.2-1
              qt5-webkit-5.212.0alpha2-20  qt5-x11extras-5.11.2-1
              qt5-xmlpatterns-5.11.2-1  spectacle-18.08.1-2

Total Download Size:   194.36 MiB
Total Installed Size:  604.83 MiB
Net Upgrade Size:       -0.61 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 lz4-1:1.8.3-1-x86_64        98.2 KiB   346K/s 00:00 [############################] 100%
 gdbm-1.18-1-x86_64         160.0 KiB   505K/s 00:00 [############################] 100%
 mkinitcpio-busybox-1....   232.5 KiB   474K/s 00:00 [############################] 100%
 linux-4.18.9.arch1-1-...    66.1 MiB   519K/s 02:10 [############################] 100%
 qt5-base-5.11.2-1-x86_64    11.9 MiB   521K/s 00:23 [############################] 100%
 qt5-script-5.11.2-1-x...   967.6 KiB   522K/s 00:02 [############################] 100%
 qt5-x11extras-5.11.2-...    12.9 KiB   757K/s 00:00 [############################] 100%
 cairo-1.15.14-1-x86_64     715.8 KiB   522K/s 00:01 [############################] 100%
 qt5-multimedia-5.11.2...   761.3 KiB   523K/s 00:01 [############################] 100%
 qt5-speech-5.11.2-1-x...    50.8 KiB  57.8K/s 00:01 [############################] 100%
 qt5-svg-5.11.2-1-x86_64    133.0 KiB   304K/s 00:00 [############################] 100%
 qt5-xmlpatterns-5.11....  1177.0 KiB   519K/s 00:02 [############################] 100%
 qt5-declarative-5.11....     3.5 MiB   519K/s 00:07 [############################] 100%
 akonadi-18.08.1-2-x86_64     2.5 MiB   519K/s 00:05 [############################] 100%
 boost-libs-1.68.0-1-x...     2.3 MiB   520K/s 00:05 [############################] 100%
 libssh-0.8.3-1-x86_64      189.6 KiB   521K/s 00:00 [############################] 100%
 ffmpeg-1:4.0.2-3-x86_64      8.2 MiB   519K/s 00:16 [############################] 100%
 ghostscript-9.25-3-x86_64   12.5 MiB   521K/s 00:25 [############################] 100%
 librsvg-2:2.44.3-1-x86_64  986.8 KiB   522K/s 00:02 [############################] 100%
 gtk-update-icon-cache...    14.0 KiB   608K/s 00:00 [############################] 100%
 libsoup-2.64.0+10+g26...   493.3 KiB   525K/s 00:01 [############################] 100%
 gtk3-3.24.1-1-x86_64        10.5 MiB   521K/s 00:21 [############################] 100%
 kig-18.08.1-2-x86_64         3.7 MiB   521K/s 00:07 [############################] 100%
 kopete-18.08.1-3-x86_64      9.6 MiB   521K/s 00:19 [############################] 100%
 libkolabxml-1.1.6-9-x...   593.9 KiB   523K/s 00:01 [############################] 100%
 qt5-graphicaleffects-...    68.2 KiB  69.8K/s 00:01 [############################] 100%
 qt5-location-5.11.2-1...     2.6 MiB   506K/s 00:05 [############################] 100%
 qt5-quickcontrols-5.1...   813.3 KiB   521K/s 00:02 [############################] 100%
 qt5-quickcontrols2-5....  1728.4 KiB   522K/s 00:03 [############################] 100%
 qt5-sensors-5.11.2-1-...   159.9 KiB   424K/s 00:00 [############################] 100%
 qt5-tools-5.11.2-1-x86_64    5.6 MiB   521K/s 00:11 [############################] 100%
 qt5-webchannel-5.11.2...    58.3 KiB  57.7K/s 00:01 [############################] 100%
 qt5-webengine-5.11.2-...    33.3 MiB   519K/s 01:06 [############################] 100%
 qt5-webkit-5.212.0alp...    11.7 MiB   521K/s 00:23 [############################] 100%
 spectacle-18.08.1-2-x...  1120.9 KiB   521K/s 00:02 [############################] 100%
(35/35) checking keys in keyring                     [############################] 100%
(35/35) checking package integrity                   [############################] 100%
(35/35) loading package files                        [############################] 100%
(35/35) checking for file conflicts                  [############################] 100%
(35/35) checking available disk space                [############################] 100%
warning: could not get file information for boot/vmlinuz-linux
:: Processing package changes...
( 1/35) upgrading lz4                                [############################] 100%
( 2/35) upgrading gdbm                               [############################] 100%
( 3/35) upgrading qt5-base                           [############################] 100%
( 4/35) upgrading qt5-script                         [############################] 100%
( 5/35) upgrading qt5-x11extras                      [############################] 100%
( 6/35) upgrading cairo                              [############################] 100%
( 7/35) upgrading qt5-multimedia                     [############################] 100%
( 8/35) upgrading qt5-speech                         [############################] 100%
( 9/35) upgrading qt5-svg                            [############################] 100%
(10/35) upgrading qt5-xmlpatterns                    [############################] 100%
(11/35) upgrading qt5-declarative                    [############################] 100%
(12/35) upgrading akonadi                            [############################] 100%
(13/35) upgrading boost-libs                         [############################] 100%
(14/35) upgrading libssh                             [############################] 100%
(15/35) upgrading ffmpeg                             [############################] 100%
(16/35) upgrading ghostscript                        [############################] 100%
(17/35) upgrading librsvg                            [############################] 100%
(18/35) upgrading gtk-update-icon-cache              [############################] 100%
(19/35) upgrading libsoup                            [############################] 100%
(20/35) upgrading gtk3                               [############################] 100%
(21/35) upgrading kig                                [############################] 100%
(22/35) upgrading kopete                             [############################] 100%
(23/35) upgrading libkolabxml                        [############################] 100%
(24/35) upgrading mkinitcpio-busybox                 [############################] 100%
(25/35) upgrading linux                              [############################] 100%
(26/35) upgrading qt5-graphicaleffects               [############################] 100%
(27/35) upgrading qt5-location                       [############################] 100%
(28/35) upgrading qt5-quickcontrols                  [############################] 100%
(29/35) upgrading qt5-quickcontrols2                 [############################] 100%
(30/35) upgrading qt5-sensors                        [############################] 100%
(31/35) upgrading qt5-tools                          [############################] 100%
(32/35) upgrading qt5-webchannel                     [############################] 100%
(33/35) upgrading qt5-webengine                      [############################] 100%
(34/35) upgrading qt5-webkit                         [############################] 100%
(35/35) upgrading spectacle                          [############################] 100%
:: Running post-transaction hooks...
( 1/10) Updating linux module dependencies...
( 2/10) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/outer-vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/outer-initramfs-linux.img
==> ERROR: '/lib/modules/4.18.8-arch1-1-ARCH' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/outer-vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/outer-initramfs-linux-fallback.img -S autodetect
==> ERROR: '/lib/modules/4.18.8-arch1-1-ARCH' is not a valid kernel module directory
error: command failed to execute correctly
( 3/10) Probing GDK-Pixbuf loader modules...
( 4/10) Compiling GSettings XML schema files...
( 5/10) Probing GTK3 input method modules...
( 6/10) Updating icon theme caches...
( 7/10) Arming ConditionNeedsUpdate...
( 8/10) Updating the info directory file...
( 9/10) Updating the desktop file MIME type cache...
(10/10) Updating the MIME type database...
sudo pacman -Syu  24.48s user 7.66s system 2% cpu 21:35.87 total

As you can see, there's a warning just before pacman starts processing package changes, I wonder if it's just due to my renaming of the kernel and there's nothing more to worry about...

Last edited by 4lic3 (2018-09-27 07:08:11)

Offline

#2 2018-09-23 02:00:34

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] issues with mkinitcpio after update

You moved the vmlinuz-linux file somewhere else, but when pacman updated the linux package, it updated the original vmlinuz-linux file (after a, yes, very meaningful error that the previous version of the file is missing).

Now, your outer-vmlinuz-linux file still exists, but it's completely useless since it is an old kernel and the modules directory it needs and corresponds to, no longer exists.

There are two correct solutions to this problem, and the latter solution is the right correct solution:

  • Add the kernel to IgnorePkg in your pacman.conf, then `pacman -S linux` only when you know you can do so on both OS partitions at the same time.

  • Redefine the problem. Don't have both OSes share the same boot partition. IMHO sharing the boot partition is the great evil which UEFI inflicted upon the world. Also it's a completely unnecessary, pointless evil, since the only people who need to share the boot partition are people using inferior bootloaders like systemd-boot. rEFInd and grub both support a bunch of filesystem drivers including, say, ext4. This means they can mount your main OS partition and read your kernel off of there, and aren't crippled by the truly abominable UEFI spec which chose, of all things, the immensely stupid vfat to standardize upon as the *only* filesystem which UEFI vendors need to implement support for.

Last edited by eschwartz (2018-09-23 02:01:09)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2018-09-27 07:07:46

4lic3
Member
Registered: 2018-09-22
Posts: 2

Re: [SOLVED] issues with mkinitcpio after update

okay, done, everything's working.
I had to reinstall linux and mkinitcpio after changing the presets and kernel for the modules to load properly, but it worked perfectly when I did that, so I'm marking this as solved.
I'm thinking of adding an alias so whenever I do a system upgrade a script is run that updates both systems (via chroot), hope that solves it.
anyway, thank you a lot for the help. smile

Offline

Board footer

Powered by FluxBB