You are not logged in.

#1 2014-07-22 20:15:55

Theoretician
Member
Registered: 2014-07-22
Posts: 2

[SOLVED] mkinitcpio fails. Config file Missing

So this is a somewhat urgent problem for me. I'm not a beginner per se, but I've hit some dead ends here. First time posting and all that.

I went to update today, which went fine, save I saw that mkinitcpio failed, so I went to run it manually.

INSERT  will  ~  mkinitcpio -p linux
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> ERROR: Invalid config: No hooks found
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> ERROR: Invalid config: No hooks found

So I go and try looking at /etc/mkinitcpio.conf and see that it has one line:

# MODULES

I'm 90% sure this is why it's failing, but I don't know A) why this happened, B) how to fix it, or C) how to make sure this never happens again.

(I'm also using btrfs, but I failed to make a snapshot before)

Last edited by Theoretician (2014-07-22 21:42:10)

Offline

#2 2014-07-22 20:22:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] mkinitcpio fails. Config file Missing

Post your whole /etc/mkinitcpio.conf.

Offline

#3 2014-07-22 20:26:00

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED] mkinitcpio fails. Config file Missing

@karol:

He did! And as he surmised, that's the problem.

A) You'll probably never know, but chances are it was PEBKAC.
B) Extract the default mkinitcpio.conf from the mkinitcpio package.
C) It probably won't happen again. If you customize it, you could back it up just in case.

Last edited by alphaniner (2014-07-22 20:34:41)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#4 2014-07-22 20:32:54

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] mkinitcpio fails. Config file Missing

A) Look through your shell history and see if you overwrote the file
B) Copy your backed up version across or grab a new one and modify to your needs
C) See A.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-07-22 20:39:28

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] mkinitcpio fails. Config file Missing

Try replacing your /etc/mkinitcpio.conf with the original...

https://raw.githubusercontent.com/falco … tcpio.conf

Last edited by Slithery (2014-07-22 20:40:01)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#6 2014-07-22 21:40:38

Theoretician
Member
Registered: 2014-07-22
Posts: 2

Re: [SOLVED] mkinitcpio fails. Config file Missing

slithery, thank you, that solution worked. I had to modify it with the right hooks for btrfs, but just flat out replacing was the correct solution.

Attempting to mark as SOLVED.

Offline

#7 2024-08-24 19:05:13

archisfun
Member
Registered: 2024-08-24
Posts: 1

Re: [SOLVED] mkinitcpio fails. Config file Missing

thank you Slithery, this worked for me as well.

Offline

#8 2024-08-26 16:43:13

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,208

Re: [SOLVED] mkinitcpio fails. Config file Missing

Please don't necro 10 year old threads

Closing this old solved thread.

Offline

Board footer

Powered by FluxBB