[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#735496: initramfs-tools fails because of missing keyutils package



Package: initramfs-tools
Version: 0.115~bpo70+1
Severity: normal

I am using wheezy mostyle stable and also backports packages (such as
initramfs-tools)
I have multiple volumes encrypted using dm_crypt (3 LVM Physical Volumes) using
the same passphrase
I do not want to type the passphrase three times hence I am using the following
option in /etc/crypttab
"luks,keyscript=decrypt_keyctl"

The problem is update-initramfs fails because /bin/keyctl is required but it is
not installed.
It works after I installed keyutils but I had to debug the script to figure out
what had to be installed.
A package dependency should make sure this program is already installed to
avoid this problem.

# cat /etc/crypttab
luks-0d020ecb-9fae-40fb-9ddf-8a75c8830d9c UUID=0d020ecb-9fae-40fb-9ddf-
8a75c8830d9c none luks,keyscript=decrypt_keyctl
luks-182a31c7-38da-4c7f-9bf6-3568c0dbf1d4 UUID=182a31c7-38da-4c7f-
9bf6-3568c0dbf1d4 none luks,keyscript=decrypt_keyctl
luks-d1c60f39-a178-46f9-824d-6353b97158c3 UUID=d1c60f39-a178-46f9-824d-
6353b97158c3 none luks,keyscript=decrypt_keyctl

# cat /etc/debian_version
7.3

The main "update-initramfs" command fails:

# update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-3.2.0-4-amd64
E: /usr/share/initramfs-tools/hooks/cryptkeyctl failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.2.0-4-amd64 with 1.

The internal commands which fails:

# mkinitramfs -o /boot/initrd.img-3.2.0-4-amd64.new 3.2.0-4-amd64
E: /usr/share/initramfs-tools/hooks/cryptkeyctl failed with return 1.

# bash -x /usr/share/initramfs-tools/hooks/cryptkeyctl
+ set -e
+ PREREQ=cryptroot
+ case $1 in
+ . /usr/share/initramfs-tools/hook-functions
+ '[' '!' -x /lib/cryptsetup/scripts/decrypt_keyctl ']'
+ copy_exec /bin/keyctl
+ local src target x nonoptlib
+ local libname dirname
+ src=/bin/keyctl
+ target=/bin/keyctl
+ '[' -f /bin/keyctl ']'
+ return 1

The missing program is /bin/keyctl:

# ls -lh /bin/keyctl
ls: cannot access /bin/keyctl: No such file or directory

The solution is to install the missing package:

# apt-get install keyutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  keyutils
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 36.2 kB of archives.
After this operation, 86.0 kB of additional disk space will be used.
Get:1 http://ftp.uk.debian.org/debian/ wheezy/main keyutils amd64 1.5.5-3 [36.2
kB]
Fetched 36.2 kB in 0s (125 kB/s)
Selecting previously unselected package keyutils.
(Reading database ... 125426 files and directories currently installed.)
Unpacking keyutils (from .../keyutils_1.5.5-3_amd64.deb) ...
Processing triggers for man-db ...
Setting up keyutils (1.5.5-3) ...

Finally it works:

# update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-3.2.0-4-amd64



-- Package-specific info:
-- initramfs sizes
-rw-r--r-- 1 root root 12M Jan 15 19:18 /boot/initrd.img-3.2.0-4-amd64
-rw-r--r-- 1 root root 12M Jan 12 17:58 /boot/initrd.img-3.2.0-4-amd64-20140112-1800
-rw-r--r-- 1 root root 12M Jan 15 19:23 /boot/initrd.img-3.2.0-4-amd64-20140115-1918
-- /proc/cmdline
root=/dev/vgmain/sys_debian07 ro quiet

-- /proc/filesystems
	btrfs
	ext4
	xfs
	ext3

-- lsmod
Module                  Size  Used by
dm_mirror              17707  1 
dm_region_hash         13502  1 dm_mirror
dm_log                 13528  3 dm_region_hash,dm_mirror
ip6table_filter        12540  0 
ebtable_nat            12580  0 
ebtables               26235  1 ebtable_nat
parport_pc             22364  0 
ppdev                  12763  0 
lp                     17149  0 
parport                31858  3 lp,ppdev,parport_pc
bnep                   17567  2 
rfcomm                 33700  10 
binfmt_misc            12957  1 
act_police             12654  1 
cls_basic              12966  1 
cls_flow               17351  0 
cls_fw                 12965  4 
cls_u32                13071  0 
sch_tbf                12964  0 
sch_prio               13163  0 
sch_htb                17923  1 
sch_hfsc               22230  0 
sch_ingress            12744  1 
sch_sfq                13172  4 
xt_statistic           12519  0 
xt_CT                  12507  0 
xt_time                12459  0 
xt_connlimit           12622  0 
xt_realm               12423  0 
xt_addrtype            12557  4 
iptable_raw            12524  0 
xt_comment             12427  9 
xt_recent              13188  0 
xt_policy              12506  0 
ipt_ULOG               16833  0 
ipt_REJECT             12502  4 
ipt_REDIRECT           12471  0 
ipt_NETMAP             12465  0 
ipt_MASQUERADE         12594  3 
ipt_ECN                12456  0 
ipt_ecn                12456  0 
ipt_CLUSTERIP          13045  0 
ipt_ah                 12453  0 
xt_set                 12989  0 
ip_set                 26649  1 xt_set
nf_nat_tftp            12422  0 
nf_nat_snmp_basic      16995  0 
nf_conntrack_snmp      12443  1 nf_nat_snmp_basic
nf_nat_sip             12923  0 
nf_nat_pptp            12603  0 
nf_nat_proto_gre       12517  1 nf_nat_pptp
nf_nat_irc             12454  0 
nf_nat_h323            12918  0 
nf_nat_ftp             12460  0 
nf_nat_amanda          12424  0 
ts_kmp                 12569  5 
nf_conntrack_amanda    12437  1 nf_nat_amanda
nf_conntrack_sane      12428  0 
nf_conntrack_tftp      12433  1 nf_nat_tftp
nf_conntrack_sip       26054  1 nf_nat_sip
nf_conntrack_proto_udplite    12655  0 
nf_conntrack_proto_sctp    12941  0 
nf_conntrack_pptp      12769  1 nf_nat_pptp
nf_conntrack_proto_gre    12974  1 nf_conntrack_pptp
nf_conntrack_netlink    23101  0 
nf_conntrack_netbios_ns    12445  0 
nf_conntrack_broadcast    12365  2 nf_conntrack_netbios_ns,nf_conntrack_snmp
nf_conntrack_irc       12427  1 nf_nat_irc
nf_conntrack_h323      42413  1 nf_nat_h323
nf_conntrack_ftp       12605  1 nf_nat_ftp
xt_TPROXY              12907  0 
nf_defrag_ipv6         12832  1 xt_TPROXY
ip6_tables             22175  2 xt_TPROXY,ip6table_filter
nf_tproxy_core         12404  1 xt_TPROXY
xt_tcpmss              12425  0 
xt_pkttype             12427  0 
xt_physdev             12468  59 
xt_owner               12423  0 
xt_NFQUEUE             12544  0 
xt_NFLOG               12462  0 
nfnetlink_log          17212  1 xt_NFLOG
xt_multiport           12548  15 
xt_mark                12453  5 
xt_mac                 12419  0 
xt_limit               12638  0 
xt_length              12460  0 
xt_iprange             12504  0 
xt_helper              12507  0 
xt_hashlimit           13172  0 
xt_DSCP                12643  0 
xt_dscp                12523  0 
xt_dccp                12498  0 
xt_conntrack           12681  71 
xt_connmark            12698  0 
xt_CLASSIFY            12429  0 
xt_AUDIT               12646  0 
ipt_LOG                12605  25 
xt_tcpudp              12570  13 
xt_state               12503  0 
iptable_nat            12928  1 
nf_nat                 18242  12 iptable_nat,nf_nat_amanda,nf_nat_ftp,nf_nat_h323,nf_nat_irc,nf_nat_proto_gre,nf_nat_pptp,nf_nat_sip,nf_nat_tftp,ipt_MASQUERADE,ipt_NETMAP,ipt_REDIRECT
nf_conntrack_ipv4      14078  74 nf_nat,iptable_nat
nf_defrag_ipv4         12483  2 nf_conntrack_ipv4,xt_TPROXY
nf_conntrack           52720  34 nf_conntrack_ipv4,nf_nat,iptable_nat,xt_state,xt_connmark,xt_conntrack,xt_helper,nf_conntrack_ftp,nf_conntrack_h323,nf_conntrack_irc,nf_conntrack_broadcast,nf_conntrack_netbios_ns,nf_conntrack_netlink,nf_conntrack_proto_gre,nf_conntrack_pptp,nf_conntrack_proto_sctp,nf_conntrack_proto_udplite,nf_conntrack_sip,nf_conntrack_tftp,nf_conntrack_sane,nf_conntrack_amanda,nf_nat_amanda,nf_nat_ftp,nf_nat_h323,nf_nat_irc,nf_nat_pptp,nf_nat_sip,nf_conntrack_snmp,nf_nat_snmp_basic,nf_nat_tftp,ipt_CLUSTERIP,ipt_MASQUERADE,xt_connlimit,xt_CT
iptable_mangle         12536  1 
nfnetlink              12906  3 nfnetlink_log,nf_conntrack_netlink,ip_set
iptable_filter         12536  1 
ip_tables              22042  4 iptable_filter,iptable_mangle,iptable_nat,iptable_raw
x_tables               19118  52 ip_tables,iptable_filter,iptable_mangle,iptable_nat,xt_state,xt_tcpudp,ipt_LOG,xt_AUDIT,xt_CLASSIFY,xt_connmark,xt_conntrack,xt_dccp,xt_dscp,xt_DSCP,xt_hashlimit,xt_helper,xt_iprange,xt_length,xt_limit,xt_mac,xt_mark,xt_multiport,xt_NFLOG,xt_NFQUEUE,xt_owner,xt_physdev,xt_pkttype,xt_tcpmss,ip6_tables,xt_TPROXY,xt_set,ipt_ah,ipt_CLUSTERIP,ipt_ecn,ipt_ECN,ipt_MASQUERADE,ipt_NETMAP,ipt_REDIRECT,ipt_REJECT,ipt_ULOG,xt_policy,xt_recent,xt_comment,iptable_raw,xt_addrtype,xt_realm,xt_connlimit,xt_time,xt_CT,xt_statistic,ebtables,ip6table_filter
bridge                 70564  0 
stp                    12437  1 bridge
ext3                  162072  2 
jbd                    56902  1 ext3
dm_raid                17012  10 
raid456                48356  1 dm_raid
async_raid6_recov      12574  1 raid456
async_memcpy           12387  2 async_raid6_recov,raid456
async_pq               12605  2 async_raid6_recov,raid456
raid6_pq               82624  2 async_pq,async_raid6_recov
raid1                  30714  11 dm_raid
md_mod                 87742  3 raid1,raid456,dm_raid
async_xor              12422  3 async_pq,async_raid6_recov,raid456
xor                    12605  1 async_xor
async_tx               12604  5 async_xor,async_pq,async_memcpy,async_raid6_recov,raid456
loop                   22641  0 
xts                    12645  8 
gf128mul               13048  1 xts
kvm_intel             121968  0 
kvm                   287749  1 kvm_intel
snd_usb_audio          84836  2 
snd_usbmidi_lib        23369  1 snd_usb_audio
snd_hwdep              13186  1 snd_usb_audio
snd_seq_midi           12848  0 
snd_seq_midi_event     13316  1 snd_seq_midi
snd_rawmidi            23060  2 snd_seq_midi,snd_usbmidi_lib
snd_pcm                68083  1 snd_usb_audio
snd_page_alloc         13003  1 snd_pcm
snd_seq                45126  2 snd_seq_midi_event,snd_seq_midi
snd_seq_device         13176  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              22917  2 snd_seq,snd_pcm
snd                    52889  12 snd_timer,snd_seq_device,snd_seq,snd_pcm,snd_rawmidi,snd_hwdep,snd_usbmidi_lib,snd_usb_audio
joydev                 17266  0 
soundcore              13065  1 snd
btusb                  17502  2 
bluetooth             119455  23 btusb,rfcomm,bnep
radeon                718093  0 
ttm                    53664  1 radeon
i915                  378445  2 
drm_kms_helper         31370  2 i915,radeon
drm                   183952  5 drm_kms_helper,i915,ttm,radeon
acpi_cpufreq           12935  0 
mperf                  12453  1 acpi_cpufreq
eeepc_wmi              12564  0 
asus_wmi               18726  1 eeepc_wmi
sparse_keymap          12760  1 asus_wmi
mxm_wmi                12515  0 
power_supply           13475  1 radeon
wmi                    13243  2 mxm_wmi,asus_wmi
evdev                  17562  15 
video                  17683  1 i915
processor              28157  1 acpi_cpufreq
psmouse                69265  0 
pcspkr                 12579  0 
rfkill                 19012  3 asus_wmi,bluetooth
serio_raw              12931  0 
coretemp               12898  0 
thermal_sys            18040  2 processor,video
i2c_algo_bit           12841  2 i915,radeon
i2c_i801               16870  0 
iTCO_wdt               17081  0 
i2c_core               23876  6 i2c_i801,i2c_algo_bit,drm,drm_kms_helper,i915,radeon
iTCO_vendor_support    12704  1 iTCO_wdt
button                 12937  1 i915
dm_snapshot            32737  3 
microcode              30126  0 
xfs                   590943  3 
ext4                  350763  4 
crc16                  12343  2 ext4,bluetooth
jbd2                   62115  1 ext4
mbcache                13114  2 ext4,ext3
btrfs                 505636  0 
libcrc32c              12426  1 btrfs
zlib_deflate           25638  1 btrfs
sha256_generic         16797  4 
dm_crypt               22586  3 
dm_mod                 63645  237 dm_crypt,dm_snapshot,dm_raid,dm_log,dm_mirror
usbhid                 36418  0 
hid                    81328  1 usbhid
sr_mod                 21899  0 
sg                     25874  0 
cdrom                  35401  1 sr_mod
sd_mod                 36136  9 
crc_t10dif             12348  1 sd_mod
xhci_hcd               73434  0 
crc32c_intel           12747  1 
ghash_clmulni_intel    13173  0 
aesni_intel            50667  80 
aes_x86_64             16843  1 aesni_intel
aes_generic            33026  2 aes_x86_64,aesni_intel
cryptd                 14517  26 aesni_intel,ghash_clmulni_intel
e1000                  86156  0 
ahci                   24997  5 
libahci                22860  1 ahci
libata                140630  2 libahci,ahci
scsi_mod              162269  4 libata,sd_mod,sg,sr_mod
ehci_hcd               40215  0 
usbcore               128741  7 ehci_hcd,xhci_hcd,usbhid,btusb,snd_usbmidi_lib,snd_usb_audio
e1000e                120822  0 
usb_common             12354  1 usbcore

-- /etc/initramfs-tools/modules
dm-crypt
dm-mod
sha256
btrfs
ext4
xfs

-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
do_bootloader = no
do_initrd = yes
link_in_boot = no

-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
DEVICE=
NFSROOT=auto

-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no

-- /etc/crypttab
luks-0d020ecb-9fae-40fb-9ddf-8a75c8830d9c UUID=0d020ecb-9fae-40fb-9ddf-8a75c8830d9c none luks,keyscript=decrypt_keyctl
luks-182a31c7-38da-4c7f-9bf6-3568c0dbf1d4 UUID=182a31c7-38da-4c7f-9bf6-3568c0dbf1d4 none luks,keyscript=decrypt_keyctl
luks-d1c60f39-a178-46f9-824d-6353b97158c3 UUID=d1c60f39-a178-46f9-824d-6353b97158c3 none luks,keyscript=decrypt_keyctl

-- /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4] 
unused devices: <none>

-- mkinitramfs hooks
/etc/initramfs-tools/hooks/:

/usr/share/initramfs-tools/hooks:
amd64_microcode
btrfs
busybox
cryptgnupg
cryptkeyctl
cryptopenct
cryptopensc
cryptpassdev
cryptroot
dmsetup
fuse
intel_microcode
keymap
klibc
kmod
lvm2
ntfs_3g
resume
thermal
udev


-- System Information:
Debian Release: 7.3
  APT prefers stable
  APT policy: (990, 'stable'), (900, 'stable-updates'), (100, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages initramfs-tools depends on:
ii  cpio               2.11+dfsg-0.1
ii  klibc-utils        2.0.1-3.1
ii  kmod               9-3
ii  module-init-tools  9-3
ii  udev               175-7.2

Versions of packages initramfs-tools recommends:
ii  busybox  1:1.20.0-7

Versions of packages initramfs-tools suggests:
ii  bash-completion  1:2.0-1

-- no debconf information


Reply to: