Bug#807600: [pkg-cryptsetup-devel] Bug#807600: Boot hangs

2015-12-18 Thread Jonas Meurer
Hi John,

Am 17.12.2015 um 17:02 schrieb John Talbut:
> On 17/12/15 11:22, Jonas Meurer wrote:
>>> Is there anything else I can do to help diagnose the problem?
>>
>> In the initramfs emergency shell that starts, please run the following
>> commands and send us the result:
>>
>> # ls -al /dev/mapper/
> # No such file or directory
> 
> But
> # ls /dev/mapper/
> 
> drwxr-xr-x  2 0 0 60 .
> drwxr-xr-x 13 0 0   3060 ..
> crw---  1 0 0 10,236 control
> 
>> # dmsetup table
> # No devices found

Ok, so during initramfs stage, no device-mapper device is created until
the point that it drops into the emergency shell.

>> # sed -i -e 's#/bin/sh#/bin/sh -x#g' /scripts/local-top/cryptroot
>> # /scripts/local-top/cryptroot>
> # Syntax error: newline unexpected
> 
> but if I put a file name (on a mounted data stick) after this, the file
> contained:

The sed command is supposed to append a '-x' to the shebang (first line)
of the script /scripts/local-top/cryptroot, so that it becomes
'#!/bin/sh -x'. This enables the debug mode in the shell script.

The second command had a typo at the end: The '>' was not supposed to be
there. *If* you want to redirect output of the script to a file, you'll
need to redirect STDOUT *and* STDERR:

# /scripts/local-top/cryptroot >/mnt/initramfs_cryptroot.log 2>&1

>   Reading all physical volumes.  This may take a while...
> Begin: Waiting for encrypted source device... ...   Reading all physical
> volumes.  This may take a while...
> [...]

Unfortunately, this is only the STDOUT output of the script, without the
debug logs to STDERR. But see below.

>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
>   Reading all physical volumes.  This may take a while...
> done.
>   ALERT! /dev/disk/by-uuid/48537739-1f62-4c12-8bf1-9d662d8cc74f does not
> exist.
> Check cryptopts=source= bootarg: cat /proc/cmdline
> or missing modules, devices: cat /proc/modules; ls /dev
> -r Dropping to a shell. Will skip
> /dev/disk/by-uuid/48537739-1f62-4c12-8bf1-9d662d8cc74f if you can't fix.

Your sda2_crypt device is not unlocked by the cryptroot script in
initramfs stage for a simple reason: The UUID that you defined as the
UUID for the source device is not found.

Your /etc/crypttab contains the following:

sda2_crypt UUID=48537739-1f62-4c12-8bf1-9d662d8cc74f none luks

This means, that the initramfs cryptroot script will search for a device
with UUID '48537739-1f62-4c12-8bf1-9d662d8cc74f' and try to unlock it.
Obviously, that device does not exist (at least not initramfs stage).

What do the following commands in the initramfs emergency shell give:

# cat /conf/conf.d/cryptroot
# ls /dev/disk/by-uuid/
# ls /dev/sd*
# blkid /dev/sd*

My current guess is, that your problem is simply a wrong UUID defined in
crypttab. Most likely, correcting the UUID in /etc/crypttab and
recreating the initramfs afterwards will fix your issue.

Also, as a sidenode: it seems like you have the same line repeated three
times in /etc/crypttab. You can safely remove all but one.

Cheers
 jonas




signature.asc
Description: OpenPGP digital signature


Bug#807600: [pkg-cryptsetup-devel] Bug#807600: Boot hangs

2015-12-17 Thread John Talbut

Hi Jonas

On 17/12/15 11:22, Jonas Meurer wrote:

Hi John,

For some reason, the volume group is not activated by the cryptroot
script during initramfs stage. From the debug log it looks like
sda2_crypt is not unlocked. Is this correct or are you asked for a
passphrase during initramfs?


Correct, I am not asked for a passphrase.



Is there anything else I can do to help diagnose the problem?


In the initramfs emergency shell that starts, please run the following
commands and send us the result:

# ls -al /dev/mapper/

# No such file or directory

But
# ls /dev/mapper/

drwxr-xr-x  2 0 0 60 .
drwxr-xr-x 13 0 0   3060 ..
crw---  1 0 0 10,236 control


# dmsetup table

# No devices found



and

# sed -i -e 's#/bin/sh#/bin/sh -x#g' /scripts/local-top/cryptroot
# /scripts/local-top/cryptroot>

# Syntax error: newline unexpected

but if I put a file name (on a mounted data stick) after this, the file 
contained:


  Reading all physical volumes.  This may take a while...
Begin: Waiting for encrypted source device... ...   Reading all physical 
volumes.  This may take a while...

  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
  Reading all physical volumes.  This may take a while...
done.
  ALERT! /dev/disk/by-uuid/48537739-1f62-4c12-8bf1-9d662d8cc74f does 
not exist.

Check cryptopts=source= bootarg: cat /proc/cmdline
or missing modules, devices: cat /proc/modules; ls /dev
-r Dropping to a shell. Will skip 
/dev/disk/by-uuid/48537739-1f62-4c12-8bf1-9d662d8cc74f if you can't fix.


There were other messages repeated on the screen.

I hope this helps.

John



Bug#807600: [pkg-cryptsetup-devel] Bug#807600: Boot hangs

2015-12-17 Thread Jonas Meurer
Hi John,

Am 13.12.2015 um 19:27 schrieb John Talbut:
> OK, so it seems that his may be a problem with cryptsetup.  Is this a
> known problem?  Is there a workaround?

apparently, something is wrong with your lvm processing during initramfs
stage. Obviously, you have an LVM volume group 'dk' on top of the
encrypted luks device /dev/sda2.

> I have tried a boot with debug on.  Trace attached.

For some reason, the volume group is not activated by the cryptroot
script during initramfs stage. From the debug log it looks like
sda2_crypt is not unlocked. Is this correct or are you asked for a
passphrase during initramfs?

> Is there anything else I can do to help diagnose the problem?

In the initramfs emergency shell that starts, please run the following
commands and send us the result:

# ls -al /dev/mapper/
# dmsetup table

and

# sed -i -e 's#/bin/sh#/bin/sh -x#g' /scripts/local-top/cryptroot
# /scripts/local-top/cryptroot>

Cheers
 jonas



signature.asc
Description: OpenPGP digital signature


Bug#807600: Boot hangs

2015-12-13 Thread John Talbut

Attached.
+ readonly=y
+ [ -z  ]
+ BOOT=local
+ [ -n  ]
+ resume=/dev/mapper/dk-sw
+ maybe_break top
+ [  = top ]
+ run_scripts /scripts/init-top
+ initdir=/scripts/init-top
+ [ ! -d /scripts/init-top ]
+ shift
+ . /scripts/init-top/ORDER
+ /scripts/init-top/all_generic_ide
+ [ -e /conf/param.conf ]
+ /scripts/init-top/blacklist
+ [ -e /conf/param.conf ]
+ /scripts/init-top/keymap
+ [ -e /conf/param.conf ]
+ /scripts/init-top/udev
calling: trigger
device-enumerator: scan all dirs
  device-enumerator: scanning /sys/bus
  device-enumerator: scanning /sys/class
calling: settle
+ [ -e /conf/param.conf ]
+ maybe_break modules
+ [  = modules ]
+ [ n != y ]
+ log_begin_msg Loading essential drivers
+ _log_msg Begin: Loading essential drivers ... 
+ [ n = y ]
+ printf Begin: Loading essential drivers ... 
Begin: Loading essential drivers ... + load_modules
+ [ -e /conf/modules ]
+ read m
+ cat /conf/modules
+ [ -z microcode ]
+ printf %.1s microcode
+ com=m
+ [ m = # ]
+ modprobe microcode
+ read m
+ [ n != y ]
+ log_end_msg
+ _log_msg done.\n
+ [ n = y ]
+ printf done.\n
done.
+ [ -n  ]
+ maybe_break premount
+ [  = premount ]
+ [ n != y ]
+ log_begin_msg Running /scripts/init-premount
+ _log_msg Begin: Running /scripts/init-premount ... 
+ [ n = y ]
+ printf Begin: Running /scripts/init-premount ... 
Begin: Running /scripts/init-premount ... + run_scripts /scripts/init-premount
+ initdir=/scripts/init-premount
+ [ ! -d /scripts/init-premount ]
+ shift
+ . /scripts/init-premount/ORDER
+ /scripts/init-premount/amd64_microcode
/scripts/init-premount/amd64_microcode: 36: 
/scripts/init-premount/amd64_microcode: cannot open /proc/modules: No such file
+ [ -e /conf/param.conf ]
+ [ n != y ]
+ log_end_msg
+ _log_msg done.\n
+ [ n = y ]
+ printf done.\n
done.
+ maybe_break mount
+ [  = mount ]
+ log_begin_msg Mounting root file system
+ _log_msg Begin: Mounting root file system ... 
+ [ n = y ]
+ printf Begin: Mounting root file system ... 
Begin: Mounting root file system ... + . /scripts/local
+ . /scripts/nfs
+ . /scripts/local
+ parse_numeric /dev/mapper/dk-rt
+ return
+ maybe_break mountroot
+ [  = mountroot ]
+ mount_top
+ local_top
+ [  != yes ]
+ [ n != y ]
+ log_begin_msg Running /scripts/local-top
+ _log_msg Begin: Running /scripts/local-top ... 
+ [ n = y ]
+ printf Begin: Running /scripts/local-top ... 
Begin: Running /scripts/local-top ... + run_scripts /scripts/local-top
+ initdir=/scripts/local-top
+ [ ! -d /scripts/local-top ]
+ shift
+ . /scripts/local-top/ORDER
+ /scripts/local-top/cryptopensc
+ [ -e /conf/param.conf ]
+ /scripts/local-top/lvm2
  lvmetad is not active yet, using direct activation during sysinit
  Volume group "dk" not found
  Cannot process volume group dk
  lvmetad is not active yet, using direct activation during sysinit
  Volume group "dk" not found
  Cannot process volume group dk
+ [ -e /conf/param.conf ]
+ /scripts/local-top/cryptroot
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Reading all physical volumes.  This may take a while...
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
Begin: Waiting for encrypted source device... ...   /run/lvm/lvmetad.socket: 
connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Reading all physical volumes.  This may take a while...
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Reading all physical volumes.  This may take a while...
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Reading all physical volumes.  This may take a while...
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Reading all physical volumes.  This may take a while...
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Reading all physical volumes.  This may take a while...
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to 

Bug#807600: Boot hangs

2015-12-13 Thread John Talbut
OK, so it seems that his may be a problem with cryptsetup.  Is this a 
known problem?  Is there a workaround?


I have tried a boot with debug on.  Trace attached.

Is there anything else I can do to help diagnose the problem?

John


initramfs debug.odt
Description: application/vnd.oasis.opendocument.text


Bug#807600: [pkg-cryptsetup-devel] Bug#807600: Boot hangs

2015-12-13 Thread Guilhem Moulin
Hi John,

On Sun, 13 Dec 2015 at 18:27:33 +, John Talbut wrote:
> OK, so it seems that his may be a problem with cryptsetup.  Is this a known
> problem?  Is there a workaround?

AFAIK not.

> I have tried a boot with debug on.  Trace attached.

Could you attach a text file instead, along with your /etc/fstab?

Cheers,
-- 
Guilhem.


signature.asc
Description: PGP signature