You are not logged in.

#1 2021-12-19 10:01:26

OLLYDOTDEV
Member
Registered: 2021-03-05
Posts: 4

mkinitcpio.conf hook Issue [SOLVED]

All right so just booted my linux install today and i saw my encrypt hook failing to unlock (plain dm-crypt is setup on my disk) so i went ahead and chroot'ed into the system via a live arch usb.
start with running some checks and ruled out that it was my key file.
Ended up running `mkinitcpio -P` to see if there was an issue with the initramfs.

something to note is that if i try to compile initramfs without udev the same errors happen.

```
/etc/mkinitcpio.conf
HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 filesystems fsck)
```

mkinitcpio -P

==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'default'
-> -k /boot/vmlinuz-linux-lts -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-lts.img
 ==> Starting build: 5.10.85-1-lts
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [keyboard]  
-> Running build hook: [modconf]       
-> Running build hook: [block]    
-> Running build hook: [encrypt]
 /usr/lib/initcpio/functions: line 196: add_udev_rule: command not found  
 /usr/lib/initcpio/functions: line 196: add_udev_rule: command not found
 /usr/lib/initcpio/functions: line 196: add_udev_rule: command not found                                                                                       
 /usr/lib/initcpio/functions: line 196: add_udev_rule: command not found
-> Running build hook: [lvm2]
 /usr/lib/initcpio/functions: line 196: add_udev_rule: command not found
 /usr/lib/initcpio/functions: line 196: add_udev_rule: command not found 
 /usr/lib/initcpio/functions: line 196: add_udev_rule: command not found   
 /usr/lib/initcpio/functions: line 196: add_udev_rule: command not found                                                                                       
 /usr/lib/initcpio/functions: line 196: add_udev_rule: command not found                                                                                       
 /usr/lib/initcpio/install/lvm2: line 33: add_udev_rule: command not found                                                                                       
-> Running build hook: [filesystems]                                                                                                                          
-> Running build hook: [fsck]                                                                                                                                 
-> Running build hook: [resume]                                                                                                                             
==> Generating module dependencies                                                                                                                            
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-lts.img
==> Image generation successful                                                                                                                               
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'fallback'       
-> -k /boot/vmlinuz-linux-lts -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-lts-fallback.img -S autodetect
==> Starting build: 5.10.85-1-lts
-> Running build hook: [base]
-> Running build hook: [udev]    
-> Running build hook: [keyboard]
-> Running build hook: [modconf]                                                                                                                              
-> Running build hook: [block]                                                                                                                                
-> Running build hook: [encrypt]                                                                                                                            
/usr/lib/initcpio/functions: line 196: add_udev_rule: command not found                                                                                       
/usr/lib/initcpio/functions: line 196: add_udev_rule: command not found                                                                                       
/usr/lib/initcpio/functions: line 196: add_udev_rule: command not found                                                                                       
/usr/lib/initcpio/functions: line 196: add_udev_rule: command not found                                                                                         
-> Running build hook: [lvm2]                                                                                                                               
/usr/lib/initcpio/functions: line 196: add_udev_rule: command not found                                                                                       
/usr/lib/initcpio/functions: line 196: add_udev_rule: command not found                                                                                       
/usr/lib/initcpio/functions: line 196: add_udev_rule: command not found                                                                                       
/usr/lib/initcpio/functions: line 196: add_udev_rule: command not found                                                                                       
/usr/lib/initcpio/functions: line 196: add_udev_rule: command not found                                                                                       
/usr/lib/initcpio/install/lvm2: line 33: add_udev_rule: command not found                                                                                       
-> Running build hook: [filesystems]                                                                                                                          
-> Running build hook: [fsck]                                                                                                                                 -
-> Running build hook: [resume]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful

TLDR
Looking to fix the fact encrypt hook is failed on boot.
Otherwise worst comes to worst I can still access the data and just take a copy of what I care about out of that encrypted drive.

Last edited by OLLYDOTDEV (2021-12-22 08:43:05)

Offline

#2 2021-12-19 10:32:21

frostschutz
Member
Registered: 2013-11-15
Posts: 1,097

Re: mkinitcpio.conf hook Issue [SOLVED]

it's odd because the add_udev_rule function is defined in the very same functions file that complains about it

but it's not used in line 196 for me... can you check if the file was modified or truncated or something?

Mayhap try reinstalling mkinitcpio?

https://github.com/archlinux/mkinitcpio … tions#L196

Offline

#3 2021-12-22 08:41:28

OLLYDOTDEV
Member
Registered: 2021-03-05
Posts: 4

Re: mkinitcpio.conf hook Issue [SOLVED]

Cheers, that worked.

Didn't know mkinitcpio was a standalone package so good to know

Offline

Board footer

Powered by FluxBB