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

Bug#555676: initramfs-tools: initram image fails to boot crypto disks because of wrong quotes

Package: initramfs-tools
Version: 0.93.4
Severity: normal

Hi, I am using luks encryption on my whole filesystem, debian squeeze
on an Acer Aspire One.

After upgrading packages this evening, I booted from the new kernel
(2.6.30-2-686): the system did not ask for
the luks passphrase, saying "unterminated quotes error in
(absolute path for script included in initram image).

I checked the syntax of the script (original path
/usr/share/initramfs-tools/scripts/local-top/cryptroot) with "bash
and found out that the new script version fails to correctly bash-expand
the kernel cryptopts option you can see below
the syntax {$x%=*} in the script gives

$PARAM: "target (uncorrect param because of leading ", correct VALUE)
$PARAM: source (correct PARAM, correct VALUE)
$PARAM: lvm
$VALUE: wudangshan-root" (correct PARAM, uncorrect VALUE because of trailing ").

I stress that the syntax of the kernel command line option did not
cause any problem with previous releases, so
it should be correct, as far as I know.

I made a workaround by adding

                if [ "$PARAM" = "lvm" ]; then
                elif [ "$PARAM" = "\"target" ]; then
before line 130 (i.e. before eval export CRYPTTAB_OPTION......)

I recreated the initram image for this kernel and rebooted the system:
the system now boots without any problem.

This works for me because I have this certain order of cryptopts in
the kernel cmdline.: a generic patch
 that strips quotes from all the cryptopts is needed, I think.

As far as I know (I checked in the squeeze packages list), the script
I modified is included in initramfs-tools.
I also read the package buglist to check if this bug has been already
submitted, but I did not found anything.
I apologize if I failed to notice a previous bug report concerning this issue.

Best regards,

P.S. In the following I cut the lsmod info, that seemed to me to be
uncorrelated with the issue.

-- Package-specific info:
-- /proc/cmdline
root=/dev/mapper/wudangshan-root ro

-- /etc/crypttab
# <target name>	<source device>		<key file>	<options>
wudangshan-root	/dev/sda2	none	luks,lvm=wudangshan-root

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages initramfs-tools depends on:
ii  cpio                          2.10-1     GNU cpio -- a program to manage ar
ii  findutils                     4.4.2-1    utilities for finding files--find,
ii  klibc-utils                   1.5.15-1   small utilities built with klibc f
ii  module-init-tools             3.11-1     tools for managing Linux kernel mo
ii  udev                          146-5      /dev/ and hotplug management daemo

Versions of packages initramfs-tools recommends:
ii  busybox                       1:1.14.2-2 Tiny utilities for small and embed

initramfs-tools suggests no packages.

-- no debconf information

It is better to be a warrior in a garden than to be a gardener in a war.
If you have to write your ethics rules down, you've already lost.

Reply to: