[pkg-cryptsetup-devel] Bug#576488: cryptroot: boot script assumes to be run in initramfs

maximilian attems maks at debian.org
Mon Apr 5 05:29:34 UTC 2010


Package: cryptsetup
Version: 2:1.1.0-2
Severity: important
Tags: patch

initramfs-tools 0.94 will break cryptsetup cryptroot boot script.
The Ubuntu feature of pre-cached order got merged,
will add a versioned breaks on cryptsetup

their is a patch in Ubuntu cryptsetup for the situation,
including it here.

thanks for merging.

-- 
maks

From: Martin Pitt <martin.pitt at canonical.com>
Date: Fri 2009-12-18 17:06:55 +0100
Subject: debian/initramfs/cryptroot-script: Fix this to work with current initramfs-tools:

    - Source /scripts/functions after checking for prerequisites.
    - prereqs(): Do not assume we are running within initramfs, and calculate
      relative path correctly.

=== modified file 'debian/initramfs/cryptroot-script'
--- debian/initramfs/cryptroot-script	2009-12-15 02:10:28 +0000
+++ debian/initramfs/cryptroot-script	2009-12-18 16:06:55 +0000
@@ -1,15 +1,12 @@
 #!/bin/sh
 
-# source for log_*_msg() functions, see LP: #272301
-. /scripts/functions
-
 #
 # Standard initramfs preamble
 #
 prereqs()
 {
 	# Make sure that cryptroot is run last in local-top
-	for req in /scripts/local-top/*; do
+	for req in $(dirname $0)/*; do
 		script=${req##*/}
 		if [ $script != cryptroot ]; then
 			echo $script
@@ -24,6 +21,8 @@
 	;;
 esac
 
+# source for log_*_msg() functions, see LP: #272301
+. /scripts/functions
 
 #
 # Helper functions

-- Package-specific info:
-- /proc/cmdline
root=UUID=2b59880c-a82f-4f72-964d-497e143fee3e ro nosplash resume=/dev/mapper/dualvg0-swap 

-- lsmod
Module                  Size  Used by
usb_storage            39353  0 
uvcvideo               51695  0 
videodev               29881  1 uvcvideo
snd_usb_audio          64038  0 
v4l1_compat            11442  2 uvcvideo,videodev
v4l2_compat_ioctl32     8538  1 videodev
snd_usb_lib            13761  1 snd_usb_audio
iwlagn                123141  0 
acpi_cpufreq            5523  0 
cpufreq_conservative     5162  0 
cpufreq_powersave        902  0 
cpufreq_stats           2659  0 
cpufreq_userspace       1960  0 
uinput                  6376  2 
fuse                   49918  1 
sha256_generic          8692  2 
cryptd                  5334  0 
aes_x86_64              7340  3 
aes_generic            25698  1 aes_x86_64
cbc                     2539  2 
dm_crypt               10443  2 
snd_hda_codec_analog    64514  1 
snd_hda_intel          19763  1 
snd_hda_codec          54212  2 snd_hda_codec_analog,snd_hda_intel
snd_hwdep               5364  2 snd_usb_audio,snd_hda_codec
snd_pcm_oss            32591  0 
snd_mixer_oss          12606  1 snd_pcm_oss
snd_pcm                60439  4 snd_usb_audio,snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_seq_midi            4400  0 
snd_rawmidi            15483  2 snd_usb_lib,snd_seq_midi
snd_seq_midi_event      4628  1 snd_seq_midi
snd_seq                42689  2 snd_seq_midi,snd_seq_midi_event
btusb                   9785  0 
snd_timer              15470  2 snd_pcm,snd_seq
bluetooth              41731  1 btusb
arc4                    1274  2 
ecb                     1841  2 
snd_seq_device          4477  3 snd_seq_midi,snd_rawmidi,snd_seq
i915                  252928  2 
drm_kms_helper         20017  1 i915
pcmcia                 19426  0 
iwlcore               138835  1 iwlagn
snd                    46318  14 snd_usb_audio,snd_hda_codec_analog,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
drm                   141991  3 i915,drm_kms_helper
sdhci_pci               5549  0 
yenta_socket           19115  1 
sdhci                  13902  1 sdhci_pci
i2c_algo_bit            4225  1 i915
i2c_i801                7798  0 
rsrc_nonstatic          7294  1 yenta_socket
mac80211              135772  2 iwlagn,iwlcore
uhci_hcd               18441  0 
pcmcia_core            23990  3 pcmcia,yenta_socket,rsrc_nonstatic
mmc_core               45120  1 sdhci
i2c_core               15552  6 videodev,i915,drm_kms_helper,drm,i2c_algo_bit,i2c_i801
ata_generic             2983  0 
soundcore               4598  1 snd
thinkpad_acpi          50043  0 
cfg80211              100808  3 iwlagn,iwlcore,mac80211
e1000e                109567  0 
ehci_hcd               30594  0 
snd_page_alloc          6153  2 snd_hda_intel,snd_pcm
video                  17461  1 i915
evdev                   7336  28 
usbcore               121623  8 usb_storage,uvcvideo,snd_usb_audio,snd_usb_lib,btusb,uhci_hcd,ehci_hcd
pcspkr                  1699  0 
rfkill                 12948  3 bluetooth,thinkpad_acpi,cfg80211
ata_piix               20397  0 
nls_base                6377  1 usbcore
led_class               2401  3 iwlcore,sdhci,thinkpad_acpi
output                  1692  1 video
button                  4634  1 i915
battery                 4998  0 
processor              30135  3 acpi_cpufreq
thermal                11674  0 
ac                      2192  0 
psmouse                49489  0 
nvram                   5061  1 thinkpad_acpi
serio_raw               3752  0 
thermal_sys            11878  3 video,processor,thermal
ext3                  106134  9 
jbd                    36845  1 ext3
mbcache                 4970  1 ext3
dm_mod                 53466  46 dm_crypt
sd_mod                 29625  5 
crc_t10dif              1276  1 sd_mod
ahci                   32134  4 
libata                131911  3 ata_generic,ata_piix,ahci
scsi_mod              121685  3 usb_storage,sd_mod,libata


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

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

Versions of packages cryptsetup depends on:
ii  dmsetup                      2:1.02.45-1 The Linux Kernel Device Mapper use
ii  libc6                        2.10.2-6    Embedded GNU C Library: Shared lib
ii  libdevmapper1.02.1           2:1.02.45-1 The Linux Kernel Device Mapper use
ii  libpopt0                     1.15-1      lib for parsing cmdline parameters
ii  libuuid1                     2.16.2-0    Universally Unique ID library

cryptsetup recommends no packages.

Versions of packages cryptsetup suggests:
ii  dosfstools                    3.0.9-1    utilities for making and checking 
ii  initramfs-tools [linux-initra 0.94       tools for generating an initramfs
ii  udev                          151-3      /dev/ and hotplug management daemo

-- no debconf information





More information about the pkg-cryptsetup-devel mailing list