jrtaylor Posted May 31, 2018 Posted May 31, 2018 Tried following this guide https://forum.armbian.com/topic/4174-full-root-filesystem-encryption-on-an-armbianorange-pi-pc-2-system/ to encrypt the root file system of a OPI R1. The system would boot to starting kernel and then just stay there. Any Ideas???
Igor Posted June 1, 2018 Posted June 1, 2018 9 hours ago, jrtaylor said: The system would boot to starting kernel and then just stay there. Any Ideas??? Well, first try to boot with more verbosity, check where is default boot log going ... and paste what you get.
jrtaylor Posted June 8, 2018 Author Posted June 8, 2018 This is all I get. U-Boot SPL 2017.11-armbian (Jan 25 2018 - 07:59:18) DRAM: 256 MiB Trying to boot from MMC1 U-Boot 2017.11-armbian (Jan 25 2018 - 07:59:18 +0100) Allwinner Technology CPU: Allwinner H3 (SUN8I 1680) Model: Xunlong Orange Pi Zero DRAM: 256 MiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: phy interface0 eth0: ethernet@1c30000 starting USB... USB0: USB EHCI 1.00 USB1: USB OHCI 1.0 scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Autoboot in 1 seconds, press <Space> to stop switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot.scr 3763 bytes read in 93 ms (39.1 KiB/s) ## Executing script at 43100000 U-boot loaded from SD Boot script loaded from mmc 179 bytes read in 50 ms (2.9 KiB/s) 7411708 bytes read in 850 ms (8.3 MiB/s) 6968976 bytes read in 851 ms (7.8 MiB/s) Found legacy kernel configuration ** File not found /script.bin ** ## Loading init Ramdisk from Legacy Image at 43300000 ... Image Name: uInitrd Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 7411644 Bytes = 7.1 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Loading Ramdisk to 498ee000, end 49fff7bc ... OK Starting kernel ...
jrtaylor Posted June 8, 2018 Author Posted June 8, 2018 This is what is in /boot root@orangepi:/# ls -al /boot total 24731 drwxr-xr-x 5 root root 1024 Jun 8 16:02 . drwxr-xr-x 22 root root 4096 Jun 8 00:42 .. -rw-rw-r-- 1 root root 209 Jun 8 16:02 armbianEnv.txt -rw-rw-r-- 1 root root 1624 Jan 27 19:04 armbian_first_run.txt.template lrwxrwxrwx 1 root root 1 Jun 8 00:18 boot -> . -rw-rw-r-- 1 root root 230454 Jan 27 19:04 boot.bmp -rw-rw-r-- 1 root root 3746 Jun 8 16:02 boot.cmd -rw-rw-r-- 1 root root 4882 Jan 27 19:04 boot-desktop.png -rw-rw-r-- 1 root root 3804 Jun 8 15:40 boot.scr -rw-r--r-- 1 root root 157956 Jan 25 11:22 config-4.14.14-sunxi lrwxrwxrwx 1 root root 17 Jan 27 19:03 dtb -> dtb-4.14.14-sunxi drwxr-xr-x 3 root root 8192 Jan 27 19:03 dtb-4.14.14-sunxi -rw------- 1 root root 7412871 Jun 8 01:36 initrd.img-4.14.14-sunxi drwx------ 2 root root 12288 Jun 8 00:16 lost+found drwxrwxr-x 2 root root 1024 Jan 27 19:04 overlay-user -rw-r--r-- 1 root root 3093830 Jan 25 11:22 System.map-4.14.14-sunxi lrwxrwxrwx 1 root root 21 Jun 8 01:36 uInitrd -> uInitrd-4.14.14-sunxi -rw-r--r-- 1 root root 7412935 Jun 8 01:36 uInitrd-4.14.14-sunxi -rwxr-xr-x 1 root root 6968976 Jan 25 11:22 vmlinuz-4.14.14-sunxi lrwxrwxrwx 1 root root 21 Jan 27 19:03 zImage -> vmlinuz-4.14.14-sunxi I never see anything after Satrting kernel.... It looks like the kernel never loads.
martinayotte Posted June 8, 2018 Posted June 8, 2018 15 hours ago, jrtaylor said: 6968976 bytes read in 851 ms (7.8 MiB/s) It is loaded as shown above, but it probably doesn't start due to issue with device-tree or the encryption itself ...
jrtaylor Posted June 8, 2018 Author Posted June 8, 2018 root@orangepi:/# gunzip -c /boot/initrd.img* | cpio --quiet -t | grep dropbear etc/dropbear etc/dropbear/dropbear_ecdsa_host_key etc/dropbear/dropbear_rsa_host_key etc/dropbear/dropbear_dss_host_key sbin/dropbear scripts/init-premount/dropbear scripts/init-bottom/dropbear root@orangepi:/# gunzip -c /boot/initrd.img* | cpio --quiet -t | grep authorized_keys root-Er9DIz/.ssh/authorized_keys root@orangepi:/# gunzip -c /boot/initrd.img* | cpio --quiet -t | grep cryptsetup lib/arm-linux-gnueabihf/libcryptsetup.so.4 lib/arm-linux-gnueabihf/libcryptsetup.so.4.6.0 lib/cryptsetup lib/cryptsetup/askpass sbin/cryptsetup conf/conf.d/cryptsetup
zador.blood.stained Posted June 8, 2018 Posted June 8, 2018 16 hours ago, jrtaylor said: Found legacy kernel configuration ** File not found /script.bin ** It tries to boot with the legacy kernel configuration (/boot/.next is missing) 56 minutes ago, jrtaylor said: lrwxrwxrwx 1 root root 21 Jan 27 19:03 zImage -> vmlinuz-4.14.14-sunxi ... but you are using the mainline kernel
jrtaylor Posted June 8, 2018 Author Posted June 8, 2018 The guide listed above is what I used. Not sure were to go from here.
jrtaylor Posted June 8, 2018 Author Posted June 8, 2018 Created an empty .next in /boot like on the original image that I downloaded. Now it goes to starting kernel and after 30 sec it reboots. Does this mean it could not mount the rootfs? U-Boot 2017.11-armbian (Jan 25 2018 - 07:59:18 +0100) Allwinner Technology CPU: Allwinner H3 (SUN8I 1680) Model: Xunlong Orange Pi Zero DRAM: 256 MiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: phy interface0 eth0: ethernet@1c30000 starting USB... USB0: USB EHCI 1.00 USB1: USB OHCI 1.0 scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Autoboot in 1 seconds, press <Space> to stop switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot.scr 3764 bytes read in 93 ms (39.1 KiB/s) ## Executing script at 43100000 U-boot loaded from SD Boot script loaded from mmc 209 bytes read in 46 ms (3.9 KiB/s) 7412851 bytes read in 865 ms (8.2 MiB/s) 6968976 bytes read in 858 ms (7.7 MiB/s) Found mainline kernel configuration 31935 bytes read in 1151 ms (26.4 KiB/s) 504 bytes read in 1474 ms (0 Bytes/s) Applying kernel provided DT overlay sun8i-h3-usbhost2.dtbo 504 bytes read in 1629 ms (0 Bytes/s) Applying kernel provided DT overlay sun8i-h3-usbhost3.dtbo 4179 bytes read in 1494 ms (2 KiB/s) Applying kernel provided DT fixup script (sun8i-h3-fixup.scr) ## Executing script at 44000000 ## Loading init Ramdisk from Legacy Image at 43300000 ... Image Name: uInitrd Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 7412787 Bytes = 7.1 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 43000000 Booting using the fdt blob at 0x43000000 Loading Ramdisk to 498ee000, end 49fffc33 ... OK reserving fdt memory region: addr=43000000 size=6e000 Loading Device Tree to 4987d000, end 498edfff ... OK Starting kernel ...
jrtaylor Posted June 8, 2018 Author Posted June 8, 2018 OK got it working. Part of the problem is I commented out the serial line. So after it booted there was no console output. Next questions is how can I get it to boot without unlocking the rootfs?
Recommended Posts