You are not logged in.

#1 2020-09-08 20:56:28

AlterionX
Member
Registered: 2020-09-08
Posts: 4

[Solved] Can't create `initramfs-linux.img` in `/boot`

Title.

It's a fresh installation from a archiso on a newly formatted laptop.

Running mkinitcpio gives no output. Literally nothing.

I'm also setting up LUKS on two partitions (root and home), so it looks a bit like this:
1G /boot (FAT32) (EFI System Partition)
32G swap
512G / (EXT4) (under a LUKS partition)
approx 402G /home (XFS) (under a LUKS partition)

I've enabled crypto in grub, mkinitcpio.conf, and

The linux kernel image is present in /lib/modules.

The boot partition has a grub image, an intel-ucode image, a vmlinuz-linux file.

Everything seems to be in place, so I don't know where to go from here.

Last edited by AlterionX (2020-09-09 08:42:39)

Offline

#2 2020-09-08 21:07:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,733

Re: [Solved] Can't create `initramfs-linux.img` in `/boot`

Run mkinitcipo verbose ("-v") and post the complete in- and output.

Offline

#3 2020-09-08 21:13:08

AlterionX
Member
Registered: 2020-09-08
Posts: 4

Re: [Solved] Can't create `initramfs-linux.img` in `/boot`

That's the thing: there is no output. Here's the input, though

mkinitcpio -v -p linux

Last edited by AlterionX (2020-09-08 21:14:07)

Offline

#4 2020-09-08 21:16:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,733

Re: [Solved] Can't create `initramfs-linux.img` in `/boot`

ls -l /etc/mkinitcpio.d/
type mkinitcpio
pacman -Qikk mkinitcpio

Offline

#5 2020-09-08 21:40:52

AlterionX
Member
Registered: 2020-09-08
Posts: 4

Re: [Solved] Can't create `initramfs-linux.img` in `/boot`

> ls -l /etc/mkinitcpio.d/
total 0
-rw-r--r-- 1 root root 0 Sep 8 14:33 linux.preset
> type mkinitcpio
mkinitcpio is hashed (/usr/bin/mkinitcpio)
> pacman -Qikk mkinitcpio
Name            : mkinitcpio
Version         : 28-1
Description     : Modular initramfs image cration utility
Architecture    : any
URL             : https://projects.archlinux.org/mkinitcpio.git
Licenses        : GPL
Groups          : None
Provides        : initramfs
Depends On      : awk mkinitcpio-busybox>=1.19.4-2 kmod util-linux>=2.23 libarchive coreutils base diffutils findutils grep filesystems
Optional Deps   : xz: Use lzma or xz compression for the initramfs image [installed]
                  bzip2: Use bzip2 compresssion for the initramfs image [installed]
                  lzop: Use lzo compression for the initramfs image
                  lz4: Use lz4 compression for the initramfs image [installed]
                  mkinitcpio-nfs-utils: support for root filesystem on NFS
Required By     : linux
Optional For    : None
Conflicts With  : None
Replaces        : None
Intalled Size   : 102.45 KiB
Packager        : Giancario Razzolini <grazzolini@archlinux.org>
Build Date      : Thu 16 Jul 2020 09:16:12 AM CDT
Install Date    : Tue 08 Sep 2020 03:21:35 PM CDT
Install Reason  : Installed as a dependency for another package.
Install Script  : Yes
Validated By    : Signature

backup file: mkinitcpio: /etc/mkinitcpio.conf (Modification time mismatch)
backup file: mkinitcpio: /etc/mkinitcpio.conf (Size mismatch)
mkinitcpio: 81 total files, 0 altered files

Sorry that took so long; I had to type it out by hand.

Offline

#6 2020-09-08 21:52:44

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,733

Re: [Solved] Can't create `initramfs-linux.img` in `/boot`

I had to type it out by hand.

What? Why?
Don't do that (to yourself and you're prone to introduce typos)
If it's "because I've no GUI", see the first link in my signature.


So linux.preset is only 0 bytes (unless that's a typo ;-)

It will be created by /usr/share/libalpm/scripts/mkinitcpio-install which is invoked by /usr/share/libalpm/hooks/90-mkinitcpio-install.hook which runs it when pacman alters /usr/lib/modules/*/vmlinuz or /usr/lib/initcpio/*

pacman -Qs linux # in doubt post a link to a photo

And try to re-install the kernel package.

Offline

#7 2020-09-08 22:16:15

AlterionX
Member
Registered: 2020-09-08
Posts: 4

Re: [Solved] Can't create `initramfs-linux.img` in `/boot`

Alright, so fixed it.

I did the following:

> cp /etc/mkinitcpio.conf /etc/mkinitcpio.conf.bak
> pacman -Rscn linux # Probably not necessary, but I did it out of habit.
> rm /etc/mkinitcpio.d/linux.preset.pacsave
> pacman -Syu linux
> mv /etc/mkinitcpio.conf.bak /etc/mkinitcpio.conf
> mkinitcpio -p linux

And it worked! I didn't realize that pacman saved that config file, but now it's fixed.

I think it's because I forgot to include `base` when I ran `pacstrap` the first time. Whoops. (Ran `pacstrap linux linux-firmware` instead, lol. Then I ran `pacstrap base linux linux-firmware` but it was too late by then.)

Thanks for all the help!

Last edited by AlterionX (2020-09-08 22:16:33)

Offline

#8 2020-09-09 05:50:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,733

Re: [Solved] Can't create `initramfs-linux.img` in `/boot`

Great.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB