Pi Zero 1.3 FDE with LUKS - hangs during boot

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Pi Zero 1.3 FDE with LUKS - hangs during boot

Postby lsfxz » Thu May 04, 2017 9:50 am

I've been trying to setup my Pi Zero with FDE with LUKS for a few weeks now (I hoped it might be an issue that magically goes away with kernel or other updates, but nope), and whatever I try, it always just hangs during relatively early boot (before I could have a chance to unlock the encrypted partition).

And by "just hangs" I mean exactly that: No errors, no progress, just hangs there. Increasing log level didn't help either, still no error or other new output.

I've tried two different Pi Zeroes, three different SD cards, several tutorials (from here, places on github, and non-archlinuxarm-related guides), crypttab, no crypttab, uuids, no uuids, deprecated ways to load the initramfs, generating the initramfs myself or with the recently added preset, different hook orders in mkinitcpio.conf.. and now I'm somewhat out of ideas. So here are examples of one of the many configuration variants that, well, didn't work:

One example of a HOOKS line that didn't work:
Code: Select all
HOOKS="base udev autodetect modconf block keyboard keymap encrypt filesystems fsck"


One example of a cmdline.txt that didn't work:
Code: Select all
cryptdevice=/dev/mmcblk0p2:cryptarch root=/dev/mapper/cryptarch rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop


One example of a config.txt that didn't work:
Code: Select all
# See /boot/overlays/README for all available options

gpu_mem=64
initramfs initramfs-linux.img followkernel


One example of an fstab that didn't work:
Code: Select all
#
# /etc/fstab: static file system information
#
# <file system>   <dir>   <type>   <options>   <dump>   <pass>
/dev/mapper/cryptarch   /            ext4         rw,defaults,noatime,discard   0 0
/dev/mmcblk0p1  /boot   vfat    defaults        0       0


One example of a crypttab hat didn't work:
Code: Select all
cryptarch      /dev/mmcblk0p2                               none   luks


One example of fdisk -l and cryptsetup luksDump output that didn't work:
Code: Select all
Disk /dev/sdd: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x059c8a27

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sdd1         2048   206847   204800  100M  c W95 FAT32 (LBA)
/dev/sdd2       206848 15523839 15316992  7.3G 83 Linux

Code: Select all
LUKS header information for /dev/sdd2

Version:        1
Cipher name:    aes
Cipher mode:    xts-plain64
Hash spec:      sha512
Payload offset: 4096
MK bits:        512
MK digest:      f5 14 6e 45 77 a7 b4 7f 26 0e 67 14 f0 a7 37 0e c6 1e 90 dd
MK salt:        bf 86 ce 1a a5 23 dc d0 c7 75 d6 0c 10 ec 35 af
                6b 01 87 d9 b7 e4 bf 81 46 b7 b9 66 17 0b a4 91
MK iterations:  137000
UUID:           a1cf6619-3ba7-4d0d-b014-c20e0bc43a0a

Key Slot 0: ENABLED
        Iterations:             1024000
        Salt:                   ea d0 0d c8 87 ef 18 be 4b 50 08 cd 53 e3 ba e9
                                16 1e 86 3d 2c 7c eb ea f6 dd 46 d3 05 c6 38 18
        Key material offset:    8
        AF stripes:             4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED



And here's the output:

Code: Select all
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.25-1-ARCH (builduser@leming) (gcc version 6.3.1 20170306 (GCC) ) #1 SMP Sat Apr 29 01:35:42 UTC 2017
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] OF: fdt:Machine model: Raspberry Pi Zero Rev 1.3
[    0.000000] cma: Reserved 8 MiB at 0x1b000000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] percpu: Embedded 14 pages/cpu @9bb33000 s25612 r8192 d23540 u57344
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 113680
[    0.000000] Kernel command line: bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  cryptdevice=UUID=cb1303b5-5b45-4d72-b0f6-38a08d300a9c:cryptarch root=/dev/mapper/cryptarch rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 425408K/458752K available (9216K kernel code, 667K rwdata, 2936K rodata, 1024K init, 810K bss, 25152K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0x9c800000 - 0xff800000   (1584 MB)
[    0.000000]     lowmem  : 0x80000000 - 0x9c000000   ( 448 MB)
[    0.000000]     modules : 0x7f000000 - 0x80000000   (  16 MB)
[    0.000000]       .text : 0x80008000 - 0x80a00000   (10208 kB)
[    0.000000]       .init : 0x80e00000 - 0x80f00000   (1024 kB)
[    0.000000]       .data : 0x80f00000 - 0x80fa6e8c   ( 668 kB)
[    0.000000]        .bss : 0x80fa8000 - 0x81072a50   ( 811 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]    Build-time adjustment of leaf fanout to 32.
[    0.000000]    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000029] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.000068] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.000152] bcm2835: system timer (irq = 27)
[    0.000686] Console: colour dummy device 80x30
[    0.001571] console [tty1] enabled
[    0.001633] Calibrating delay loop... 697.95 BogoMIPS (lpj=3489792)
[    0.060346] pid_max: default: 32768 minimum: 301
[    0.060797] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060865] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.062023] Disabling cpuset control group subsystem
[    0.062346] CPU: Testing write buffer coherency: ok
[    0.062944] missing device node for CPU 0
[    0.063025] CPU0: thread -1, cpu 0, socket -1, mpidr 410fb767
[    0.063128] Setting up static identity map for 0x100000 - 0x10004c
[    0.065735] Brought up 1 CPUs
[    0.065821] SMP: Total of 1 processors activated (697.95 BogoMIPS).
[    0.065868] CPU: All CPU(s) started in SVC mode.
[    0.066964] devtmpfs: initialized
[    0.079659] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    0.080242] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.080351] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.081703] xor: measuring software checksum speed
[    0.180747]    arm4regs  :   974.400 MB/sec
[    0.280978]    8regs     :   492.400 MB/sec
[    0.381203]    32regs    :   616.800 MB/sec
[    0.381265] xor: using function: arm4regs (974.400 MB/sec)
[    0.381557] pinctrl core: initialized pinctrl subsystem
[    0.383092] NET: Registered protocol family 16
[    0.392697] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.402968] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    0.403063] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.403394] Serial: AMBA PL011 UART driver
[    0.406269] bcm2835-mbox 2000b880.mailbox: mailbox enabled
[    0.623413] raid6: int32x1  gen()    46 MB/s
[    0.793418] raid6: int32x1  xor()    38 MB/s
[    0.963620] raid6: int32x2  gen()    77 MB/s
[    1.134260] raid6: int32x2  xor()    57 MB/s
[    1.304995] raid6: int32x4  gen()   108 MB/s
[    1.475431] raid6: int32x4  xor()    77 MB/s
[    1.646321] raid6: int32x8  gen()   117 MB/s
[    1.816696] raid6: int32x8  xor()    79 MB/s
[    1.816769] raid6: using algorithm int32x8 gen() 117 MB/s
[    1.816815] raid6: .... xor() 79 MB/s, rmw enabled
[    1.816856] raid6: using intx1 recovery algorithm
[    1.817434] bcm2835-dma 20007000.dma: DMA legacy API manager at 9c80d000, dmachans=0x1
[    1.820156] SCSI subsystem initialized
[    1.820697] usbcore: registered new interface driver usbfs
[    1.820867] usbcore: registered new interface driver hub
[    1.821133] usbcore: registered new device driver usb
[    1.826529] raspberrypi-firmware soc:firmware: Attached to firmware from 2017-05-01 20:23
[    1.829301] clocksource: Switched to clocksource timer
[    1.924358] VFS: Disk quotas dquot_6.6.0
[    1.924572] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.925030] FS-Cache: Loaded
[    1.925449] CacheFiles: Loaded
[    1.947069] NET: Registered protocol family 2
[    1.948596] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    1.948765] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    1.948913] TCP: Hash tables configured (established 4096 bind 4096)
[    1.949048] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    1.949120] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    1.949628] NET: Registered protocol family 1
[    1.950642] RPC: Registered named UNIX socket transport module.
[    1.950726] RPC: Registered udp transport module.
[    1.950769] RPC: Registered tcp transport module.
[    1.950810] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.951336] Trying to unpack rootfs image as initramfs...
[    2.549363] random: fast init done
[    2.608272] Freeing initrd memory: 4736K (9bb50000 - 9bff0000)
[    2.622526] hw perfevents: enabled with armv6_1176 PMU driver, 3 counters available
[    2.627748] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    2.647881] FS-Cache: Netfs 'nfs' registered for caching
[    2.649916] NFS: Registering the id_resolver key type
[    2.650041] Key type id_resolver registered
[    2.650090] Key type id_legacy registered
[    2.650154] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.651331] JFS: nTxBlock = 3424, nTxLock = 27396
[    2.653420] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.670911] jitterentropy: Initialization failed with host not compliant with requirements: 2
[    2.671022] async_tx: api initialized (async)
[    2.671628] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    2.672170] io scheduler noop registered (default)
[    2.672246] io scheduler deadline registered
[    2.672736] io scheduler cfq registered
[    2.679799] BCM2708FB: allocated DMA memory 5b100000
[    2.680040] BCM2708FB: allocated DMA channel 0 @ 9c80d000
[    2.687693] Console: switching to colour frame buffer device 82x26
[    2.697787] vc-cma: Videocore CMA driver
[    2.700603] vc-cma: vc_cma_base      = 0x00000000
[    2.703145] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    2.705578] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    2.708443] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
[    2.742001] brd: module loaded
[    2.758741] loop: module loaded
[    2.761353] Loading iSCSI transport class v2.0-870.
[    2.765104] libphy: Fixed MDIO Bus: probed
[    2.767735] usbcore: registered new interface driver ax88179_178a
[    2.770400] usbcore: registered new interface driver smsc95xx
[    2.772732] usbcore: registered new interface driver cdc_ncm
[    2.774759] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    3.003337] Core Release: 2.80a
[    3.005370] Setting default values for core params
[    3.007360] Finished setting default values for core params
[    3.210168] Using Buffer DMA mode
[    3.212298] Periodic Transfer Interrupt Enhancement - disabled
[    3.214451] Multiprocessor Interrupt Enhancement - disabled
[    3.216585] OTG VER PARAM: 0, OTG VER FLAG: 0
[    3.218759] Dedicated Tx FIFOs mode
[    3.221713] WARN::dwc_otg_hcd_init:1055: FIQ DMA bounce buffers: virt = 0x9b114000 dma = 0x5b114000 len=9024
[    3.226296] FIQ FSM acceleration enabled for :
[    3.226296] Non-periodic Split Transactions
[    3.226296] Periodic Split Transactions
[    3.226296] High-Speed Isochronous Endpoints
[    3.226296] Interrupt/Control Split Transaction hack enabled
[    3.237598] WARN::hcd_init_fiq:459: FIQ on core 0 at 0x807bbb38
[    3.239916] WARN::hcd_init_fiq:460: FIQ ASM at 0x807bbea0 length 36
[    3.242156] WARN::hcd_init_fiq:486: MPHI regs_base at 0x9cbc1000
[    3.244632] dwc_otg 20980000.usb: DWC OTG Controller
[    3.247088] dwc_otg 20980000.usb: new USB bus registered, assigned bus number 1
[    3.249655] dwc_otg 20980000.usb: irq 56, io mem 0x00000000
[    3.252079] Init: Port Power? op_state=1
[    3.254405] Init: Power Port (0)
[    3.257152] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.259649] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.262046] usb usb1: Product: DWC OTG Controller
[    3.264373] usb usb1: Manufacturer: Linux 4.9.25-1-ARCH dwc_otg_hcd
[    3.266727] usb usb1: SerialNumber: 20980000.usb
[    3.270347] hub 1-0:1.0: USB hub found
[    3.272789] hub 1-0:1.0: 1 port detected
[    3.276449] usbcore: registered new interface driver uas
[    3.278950] usbcore: registered new interface driver usb-storage
[    3.281497] usbcore: registered new interface driver ums-alauda
[    3.283771] usbcore: registered new interface driver ums-cypress
[    3.285958] usbcore: registered new interface driver ums-datafab
[    3.288068] usbcore: registered new interface driver ums_eneub6250
[    3.290271] usbcore: registered new interface driver ums-freecom
[    3.292282] usbcore: registered new interface driver ums-isd200
[    3.294247] usbcore: registered new interface driver ums-jumpshot
[    3.296118] usbcore: registered new interface driver ums-karma
[    3.297905] usbcore: registered new interface driver ums-onetouch
[    3.299875] usbcore: registered new interface driver ums-realtek
[    3.301574] usbcore: registered new interface driver ums-sddr09
[    3.303197] usbcore: registered new interface driver ums-sddr55
[    3.304707] usbcore: registered new interface driver ums-usbat
[    3.306769] mousedev: PS/2 mouse device common for all mice
[    3.310310] bcm2835-wdt 20100000.watchdog: Broadcom BCM2835 watchdog timer
[    3.311935] md: linear personality registered for level -1
[    3.313339] md: raid0 personality registered for level 0
[    3.314729] md: raid1 personality registered for level 1
[    3.316085] md: raid10 personality registered for level 10
[    3.317990] md: raid6 personality registered for level 6
[    3.319609] md: raid5 personality registered for level 5
[    3.321026] md: raid4 personality registered for level 4
[    3.322394] md: multipath personality registered for level -4
[    3.323823] md: faulty personality registered for level -5
[    3.325887] device-mapper: uevent: version 1.0.3
[    3.328477] device-mapper: ioctl: 4.35.0-ioctl (2016-06-23) initialised: dm-devel@redhat.com
[    3.333444] device-mapper: multipath round-robin: version 1.2.0 loaded
[    3.335505] device-mapper: multipath queue-length: version 0.2.0 loaded
[    3.337508] device-mapper: multipath service-time: version 0.3.0 loaded
[    3.339721] device-mapper: raid: Loading target version 1.9.1
[    3.342245] bcm2835-cpufreq: min=700000 max=1000000
[    3.345230] sdhci: Secure Digital Host Controller Interface driver
[    3.347557] sdhci: Copyright(c) Pierre Ossman
[    3.350476] sdhost-bcm2835 20202000.sdhost: could not get clk, deferring probe
[    3.353160] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.356232] ledtrig-cpu: registered to indicate activity on CPUs
[    3.358738] hidraw: raw HID events driver (C) Jiri Kosina
[    3.362090] usbcore: registered new interface driver usbhid
[    3.363934] usbhid: USB HID core driver
[    3.368001] vchiq: vchiq_init_state: slot_zero = 0x9b180000, is_master = 0
[    3.372386] Initializing XFRM netlink socket
[    3.374974] NET: Registered protocol family 17
[    3.377519] Key type dns_resolver registered
[    3.381135] Registering SWP/SWPB emulation handler
[    3.384446] registered taskstats version 1
[    3.388556] Btrfs loaded, crc32c=crc32c-generic
[    3.424441] Key type encrypted registered
[    3.426538] vc-sm: Videocore shared memory driver
[    3.428243] [vc_sm_connected_init]: start
[    3.431242] [vc_sm_connected_init]: end - returning 0
[    3.438724] 20201000.serial: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2
[    4.647042] console [ttyAMA0] enabled
[    4.654410] sdhost: log_buf @ 9b113000 (5b113000)
[    4.739395] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    4.747459] of_cfs_init
[    4.772736] of_cfs_init: OK
[    4.781791] Freeing unused kernel memory: 1024K (80e00000 - 80f00000)
[    4.920529] mmc0: host does not support reading read-only switch, assuming write-enable
[    4.955411] mmc0: new high speed SDHC card at address aaaa
[    4.980226] mmcblk0: mmc0:aaaa SU08G 7.40 GiB
[    4.991445]  mmcblk0: p1 p2
[    0.062616] missing device node for CPU 0
[    2.963668] Core Release: 2.80a
[    2.963821] Setting default values for core params
[    2.963996] Finished setting default values for core params
[    3.164780] Using Buffer DMA mode
[    3.164924] Periodic Transfer Interrupt Enhancement - disabled
[    3.165096] Multiprocessor Interrupt Enhancement - disabled
[    3.165261] OTG VER PARAM: 0, OTG VER FLAG: 0
[    3.165512] Dedicated Tx FIFOs mode
[    3.166420] WARN::dwc_otg_hcd_init:1055: FIQ DMA bounce buffers: virt = 0x9b114000 dma = 0x5b114000 len=9024
[    3.166752] FIQ FSM acceleration enabled for :
[    3.166752] Non-periodic Split Transactions
[    3.166752] Periodic Split Transactions
[    3.166752] High-Speed Isochronous Endpoints
[    3.166752] Interrupt/Control Split Transaction hack enabled
[    3.167507] WARN::hcd_init_fiq:459: FIQ on core 0 at 0x807bbb38
[    3.167703] WARN::hcd_init_fiq:460: FIQ ASM at 0x807bbea0 length 36
[    3.167903] WARN::hcd_init_fiq:486: MPHI regs_base at 0x9cbc1000
[    3.168355] Init: Port Power? op_state=1
[    3.168492] Init: Power Port (0)
[    3.590214] mmc0: host does not support reading read-only switch, assuming write-enable
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.25-1-ARCH (builduser@leming) (gcc version 6.3.1 20170306 (GCC) ) #1 SMP Sat Apr 29 01:35:42 UTC 2017
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] OF: fdt:Machine model: Raspberry Pi Zero Rev 1.3
[    0.000000] cma: Reserved 8 MiB at 0x1b000000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] percpu: Embedded 14 pages/cpu @9bb33000 s25612 r8192 d23540 u57344
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 113680
[    0.000000] Kernel command line: bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  cryptdevice=UUID=cb1303b5-5b45-4d72-b0f6-38a08d300a9c:cryptarch root=/dev/mapper/cryptarch rw rootwait console=ttyAMA0,115200 loglevel=7 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 425408K/458752K available (9216K kernel code, 667K rwdata, 2936K rodata, 1024K init, 810K bss, 25152K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0x9c800000 - 0xff800000   (1584 MB)
[    0.000000]     lowmem  : 0x80000000 - 0x9c000000   ( 448 MB)
[    0.000000]     modules : 0x7f000000 - 0x80000000   (  16 MB)
[    0.000000]       .text : 0x80008000 - 0x80a00000   (10208 kB)
[    0.000000]       .init : 0x80e00000 - 0x80f00000   (1024 kB)
[    0.000000]       .data : 0x80f00000 - 0x80fa6e8c   ( 668 kB)
[    0.000000]        .bss : 0x80fa8000 - 0x81072a50   ( 811 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]    Build-time adjustment of leaf fanout to 32.
[    0.000000]    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000029] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.000069] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.000156] bcm2835: system timer (irq = 27)
[    0.000690] Console: colour dummy device 80x30
[    0.001575] console [tty1] enabled
[    0.001635] Calibrating delay loop... 697.95 BogoMIPS (lpj=3489792)
[    0.060353] pid_max: default: 32768 minimum: 301
[    0.060804] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060876] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.062029] Disabling cpuset control group subsystem
[    0.062349] CPU: Testing write buffer coherency: ok
[    0.062947] missing device node for CPU 0
[    0.063028] CPU0: thread -1, cpu 0, socket -1, mpidr 410fb767
[    0.063130] Setting up static identity map for 0x100000 - 0x10004c
[    0.065742] Brought up 1 CPUs
[    0.065827] SMP: Total of 1 processors activated (697.95 BogoMIPS).
[    0.065874] CPU: All CPU(s) started in SVC mode.
[    0.066973] devtmpfs: initialized
[    0.079766] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    0.080352] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.080560] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.081814] xor: measuring software checksum speed
[    0.180826]    arm4regs  :   974.400 MB/sec
[    0.281061]    8regs     :   492.400 MB/sec
[    0.381290]    32regs    :   616.800 MB/sec
[    0.381354] xor: using function: arm4regs (974.400 MB/sec)
[    0.381646] pinctrl core: initialized pinctrl subsystem
[    0.383169] NET: Registered protocol family 16
[    0.392811] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.403134] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    0.403230] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.403562] Serial: AMBA PL011 UART driver
[    0.406438] bcm2835-mbox 2000b880.mailbox: mailbox enabled
[    0.623492] raid6: int32x1  gen()    46 MB/s
[    0.793531] raid6: int32x1  xor()    38 MB/s
[    0.964394] raid6: int32x2  gen()    77 MB/s
[    1.134401] raid6: int32x2  xor()    57 MB/s
[    1.305155] raid6: int32x4  gen()   108 MB/s
[    1.475619] raid6: int32x4  xor()    77 MB/s
[    1.645979] raid6: int32x8  gen()   117 MB/s
[    1.816809] raid6: int32x8  xor()    79 MB/s
[    1.816883] raid6: using algorithm int32x8 gen() 117 MB/s
[    1.816929] raid6: .... xor() 79 MB/s, rmw enabled
[    1.816970] raid6: using intx1 recovery algorithm
[    1.817545] bcm2835-dma 20007000.dma: DMA legacy API manager at 9c80d000, dmachans=0x1
[    1.820274] SCSI subsystem initialized
[    1.820814] usbcore: registered new interface driver usbfs
[    1.820981] usbcore: registered new interface driver hub
[    1.821251] usbcore: registered new device driver usb
[    1.826670] raspberrypi-firmware soc:firmware: Attached to firmware from 2017-05-01 20:23
[    1.829485] clocksource: Switched to clocksource timer
[    1.924568] VFS: Disk quotas dquot_6.6.0
[    1.924783] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.925244] FS-Cache: Loaded
[    1.925672] CacheFiles: Loaded
[    1.947252] NET: Registered protocol family 2
[    1.948785] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    1.948954] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    1.949103] TCP: Hash tables configured (established 4096 bind 4096)
[    1.949238] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    1.949316] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    1.949824] NET: Registered protocol family 1
[    1.950829] RPC: Registered named UNIX socket transport module.
[    1.950913] RPC: Registered udp transport module.
[    1.950957] RPC: Registered tcp transport module.
[    1.950998] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.951526] Trying to unpack rootfs image as initramfs...
[    2.549548] random: fast init done
[    2.608429] Freeing initrd memory: 4736K (9bb50000 - 9bff0000)
[    2.622707] hw perfevents: enabled with armv6_1176 PMU driver, 3 counters available
[    2.627932] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    2.648062] FS-Cache: Netfs 'nfs' registered for caching
[    2.650109] NFS: Registering the id_resolver key type
[    2.650232] Key type id_resolver registered
[    2.650281] Key type id_legacy registered
[    2.650347] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.651526] JFS: nTxBlock = 3424, nTxLock = 27396
[    2.653616] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.671129] jitterentropy: Initialization failed with host not compliant with requirements: 2
[    2.671240] async_tx: api initialized (async)
[    2.671844] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    2.672382] io scheduler noop registered (default)
[    2.672457] io scheduler deadline registered
[    2.672940] io scheduler cfq registered
[    2.680021] BCM2708FB: allocated DMA memory 5b100000
[    2.680260] BCM2708FB: allocated DMA channel 0 @ 9c80d000
[    2.687917] Console: switching to colour frame buffer device 82x26
[    2.697947] vc-cma: Videocore CMA driver
[    2.700750] vc-cma: vc_cma_base      = 0x00000000
[    2.703284] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    2.705733] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    2.708605] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
[    2.742196] brd: module loaded
[    2.758910] loop: module loaded
[    2.761482] Loading iSCSI transport class v2.0-870.
[    2.765213] libphy: Fixed MDIO Bus: probed
[    2.767850] usbcore: registered new interface driver ax88179_178a
[    2.770519] usbcore: registered new interface driver smsc95xx
[    2.772885] usbcore: registered new interface driver cdc_ncm
[    2.774931] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    3.003458] Core Release: 2.80a
[    3.005511] Setting default values for core params
[    3.007535] Finished setting default values for core params
[    3.210313] Using Buffer DMA mode
[    3.212420] Periodic Transfer Interrupt Enhancement - disabled
[    3.214573] Multiprocessor Interrupt Enhancement - disabled
[    3.216713] OTG VER PARAM: 0, OTG VER FLAG: 0
[    3.218894] Dedicated Tx FIFOs mode
[    3.221864] WARN::dwc_otg_hcd_init:1055: FIQ DMA bounce buffers: virt = 0x9b114000 dma = 0x5b114000 len=9024
[    3.226464] FIQ FSM acceleration enabled for :
[    3.226464] Non-periodic Split Transactions
[    3.226464] Periodic Split Transactions
[    3.226464] High-Speed Isochronous Endpoints
[    3.226464] Interrupt/Control Split Transaction hack enabled
[    3.237742] WARN::hcd_init_fiq:459: FIQ on core 0 at 0x807bbb38
[    3.240100] WARN::hcd_init_fiq:460: FIQ ASM at 0x807bbea0 length 36
[    3.242347] WARN::hcd_init_fiq:486: MPHI regs_base at 0x9cbc1000
[    3.244774] dwc_otg 20980000.usb: DWC OTG Controller
[    3.247231] dwc_otg 20980000.usb: new USB bus registered, assigned bus number 1
[    3.249801] dwc_otg 20980000.usb: irq 56, io mem 0x00000000
[    3.252228] Init: Port Power? op_state=1
[    3.254550] Init: Power Port (0)
[    3.257351] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.259822] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.262183] usb usb1: Product: DWC OTG Controller
[    3.264506] usb usb1: Manufacturer: Linux 4.9.25-1-ARCH dwc_otg_hcd
[    3.266857] usb usb1: SerialNumber: 20980000.usb
[    3.270470] hub 1-0:1.0: USB hub found
[    3.272940] hub 1-0:1.0: 1 port detected
[    3.276596] usbcore: registered new interface driver uas
[    3.279077] usbcore: registered new interface driver usb-storage
[    3.281622] usbcore: registered new interface driver ums-alauda
[    3.283895] usbcore: registered new interface driver ums-cypress
[    3.286079] usbcore: registered new interface driver ums-datafab
[    3.288196] usbcore: registered new interface driver ums_eneub6250
[    3.290448] usbcore: registered new interface driver ums-freecom
[    3.292460] usbcore: registered new interface driver ums-isd200
[    3.294386] usbcore: registered new interface driver ums-jumpshot
[    3.296252] usbcore: registered new interface driver ums-karma
[    3.298040] usbcore: registered new interface driver ums-onetouch
[    3.300013] usbcore: registered new interface driver ums-realtek
[    3.301717] usbcore: registered new interface driver ums-sddr09
[    3.303352] usbcore: registered new interface driver ums-sddr55
[    3.304865] usbcore: registered new interface driver ums-usbat
[    3.306971] mousedev: PS/2 mouse device common for all mice
[    3.310499] bcm2835-wdt 20100000.watchdog: Broadcom BCM2835 watchdog timer
[    3.312110] md: linear personality registered for level -1
[    3.313528] md: raid0 personality registered for level 0
[    3.314920] md: raid1 personality registered for level 1
[    3.316294] md: raid10 personality registered for level 10
[    3.318210] md: raid6 personality registered for level 6
[    3.319835] md: raid5 personality registered for level 5
[    3.321267] md: raid4 personality registered for level 4
[    3.322663] md: multipath personality registered for level -4
[    3.324126] md: faulty personality registered for level -5
[    3.326190] device-mapper: uevent: version 1.0.3
[    3.328742] device-mapper: ioctl: 4.35.0-ioctl (2016-06-23) initialised: dm-devel@redhat.com
[    3.333725] device-mapper: multipath round-robin: version 1.2.0 loaded
[    3.335787] device-mapper: multipath queue-length: version 0.2.0 loaded
[    3.337803] device-mapper: multipath service-time: version 0.3.0 loaded
[    3.340052] device-mapper: raid: Loading target version 1.9.1
[    3.342600] bcm2835-cpufreq: min=700000 max=1000000
[    3.345544] sdhci: Secure Digital Host Controller Interface driver
[    3.347878] sdhci: Copyright(c) Pierre Ossman
[    3.350800] sdhost-bcm2835 20202000.sdhost: could not get clk, deferring probe
[    3.353492] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.356604] ledtrig-cpu: registered to indicate activity on CPUs
[    3.359139] hidraw: raw HID events driver (C) Jiri Kosina
[    3.362463] usbcore: registered new interface driver usbhid
[    3.364301] usbhid: USB HID core driver
[    3.368379] vchiq: vchiq_init_state: slot_zero = 0x9b180000, is_master = 0
[    3.372782] Initializing XFRM netlink socket
[    3.375432] NET: Registered protocol family 17
[    3.377942] Key type dns_resolver registered
[    3.381569] Registering SWP/SWPB emulation handler
[    3.384842] registered taskstats version 1
[    3.388943] Btrfs loaded, crc32c=crc32c-generic
[    3.424467] Key type encrypted registered
[    3.426541] vc-sm: Videocore shared memory driver
[    3.428227] [vc_sm_connected_init]: start
[    3.431226] [vc_sm_connected_init]: end - returning 0
[    3.438693] 20201000.serial: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2
[    4.648006] console [ttyAMA0] enabled
[    4.655357] sdhost: log_buf @ 9b113000 (5b113000)
[    4.739578] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    4.747690] of_cfs_init
[    4.772959] of_cfs_init: OK
[    4.782021] Freeing unused kernel memory: 1024K (80e00000 - 80f00000)
[    4.920726] mmc0: host does not support reading read-only switch, assuming write-enable
[    4.954930] mmc0: new high speed SDHC card at address aaaa
[    4.980396] mmcblk0: mmc0:aaaa SU08G 7.40 GiB
[    4.991621]  mmcblk0: p1 p2
[  208.889554] random: crng init done


Even leaving it overnight doesn't give any more progress, just in case.


So, uh, does anyone know anything else to try, or maybe even something I've missed?
(I've setup LUKS FDE for several different devices in the past (servers, a cubietruck, several thinkpads and a few desktop machines) so I thought that this should actually work, but maybe past experience clouds my mind to something that's special with the Pi..)
lsfxz
 
Posts: 4
Joined: Fri Mar 17, 2017 12:46 pm

Re: Pi Zero 1.3 FDE with LUKS - hangs during boot

Postby WarheadsSE » Thu May 04, 2017 12:58 pm

I think you may be lacking enough entropy for the random, considering that it takes 208 seconds from boot to get to the last line.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6716
Joined: Mon Oct 18, 2010 2:12 pm

Re: Pi Zero 1.3 FDE with LUKS - hangs during boot

Postby lsfxz » Thu May 04, 2017 1:17 pm

I'll do some research down that route (as in: how to get more randomness generated so early), thanks.

But shouldn't a large amount of randomness be needed only after asking for the passphrase? At that point during the boot process there's no crypto-related processing going on yet, from my understanding of it at least
lsfxz
 
Posts: 4
Joined: Fri Mar 17, 2017 12:46 pm

Re: Pi Zero 1.3 FDE with LUKS - hangs during boot

Postby lsfxz » Sat May 06, 2017 11:58 pm

So I've tried a few more things to get to the root of this:
- tried adding all the hooks to mkinitcpio without actually encrypting root: worked
- same config, same system, encrypted (+matching cmdline.txt, of course): didn't work
- used less intensive cryptsetup options: didn't work
- tried to get more output or a shell in initramfs (kernel params debug=.. or break=top [or modules, etc]): still nothing, neither more debug output nor an initramfs shell


Just in case it's important: I'm doing this via UART, currently, as I seem to have misplaced my HDMI cable.

/edit

Oh, yeah, I've also tried another power source.
lsfxz
 
Posts: 4
Joined: Fri Mar 17, 2017 12:46 pm

Re: Pi Zero 1.3 FDE with LUKS - hangs during boot

Postby lsfxz » Sun May 07, 2017 10:06 am

I've finally "solved" it:

The problem seemingly has neither been initramfs-, nor cryptsetup-related:
It's been this:
Code: Select all
console=ttyAMA0,115200 console=tty1


It seems like the password entry took place on tty1, while I've been (UART) on ttyAMA0.
Removing
Code: Select all
console=tty1
gave me a beautiful, innocent password prompt..
lsfxz
 
Posts: 4
Joined: Fri Mar 17, 2017 12:46 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 1 guest