Welcome! Log In Create A New Profile

Advanced

encrypted root not boot'n with 5.7.1

Posted by rray 
encrypted root not boot'n with 5.7.1
July 05, 2020 08:18AM
i set up my nsa320 in 2013 with an encrypted root on the hard drives use'n kernel 3.4.4 and debian wheezy. it has served well for many years. i thought i would bring it up to date so i upgraded to stretch. still use'n the 3.4.4 kernel everything works ok. i thought i would push my luck and upgrade the kernel. i followed the instructions at
Quote
https://forum.doozan.com/read.php?2,12096
for the 5.7.1 kernel. the ramdisk runs ok and it finds all of the disk devices but never prompts for a password to decrypt the devices. it returns
Quote
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
i have tried too many options to list and none help.
Re: encrypted root not boot'n with 5.7.1
July 05, 2020 04:22PM
rray,

Do you have serial console? if you do, please post the entire serial boot log.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: encrypted root not boot'n with 5.7.1
July 06, 2020 07:19AM
i reset everything, i think, and loaded your 5.7.1 package
Attachments:
open | download - nsa320_5.7.1_boot_20200706071500 (21.9 KB)
Re: encrypted root not boot'n with 5.7.1
July 07, 2020 12:02AM
> i reset everything, i think, and loaded your 5.7.1
> package

When you said reset everything, what did you do? can you see this device before reboot?

/dev/mapper/md2_crypt

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: encrypted root not boot'n with 5.7.1
July 07, 2020 12:51AM
i have 2 drives. on both drives partition 1 is boot, 2 is root, 3 is swap, and 4 is data. they are raid 1 and encrypted. md2_crypt is root, md3_crypt is swap, and md4_crypt is data. for some reason dur'n the upgrade from wheezy to stretch the system decided to make the first raid md125 and the second raid md126 but they still get mapped as md2 and md3.
md2_crypt will only be created after i am prompted for a password to decrypt the raid filesystem. i never get a password prompt. i attached a good boot log.

root@nsa320:~# cat /proc/mdstat
Personalities : [raid1]
md125 : active raid1 sda2[1]
19573696 blocks [2/1] [_U]

md126 : active raid1 sda3[1]
975808 blocks [2/1] [_U]

md4 : active (auto-read-only) raid1 sda4[1]
1932713920 blocks [2/1] [_U]

unused devices: <none>



root@nsa320:~# ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Jul 7 00:34 control
lrwxrwxrwx 1 root root 7 Jul 7 00:34 md2_crypt -> ../dm-0
lrwxrwxrwx 1 root root 7 Jul 7 00:34 md3_crypt -> ../dm-1
lrwxrwxrwx 1 root root 7 Jul 7 00:34 md4_crypt -> ../dm-2



root@nsa320:~# cat /etc/crypttab
md2_crypt UUID=acffb534-303a-4e9f-b4ac-eb2842f1cd84 none luks
md3_crypt UUID=6e6cc04c-11cd-4315-bc1a-4314c6251d1c none luks,swap
md4_crypt UUID=0690ac66-4ceb-4924-8ba4-acef3eeda4f3 none luks



root@nsa320:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 10M 0 10M 0% /dev
tmpfs 101M 1.7M 99M 2% /run
/dev/mapper/md2_crypt 19G 6.5G 13G 35% /
tmpfs 251M 0 251M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 251M 0 251M 0% /sys/fs/cgroup
/dev/sda1 237M 87M 150M 37% /boot
tmpfs 51M 0 51M 0% /run/user/500


update: i just noticed near the top of the boot log when i boot with your 5.7.1 package
Quote
[ 0.000000][ T0] INITRD: 0x01100000+0x008ed000 overlaps in-use memory region - disabling initrd



Edited 1 time(s). Last edit at 07/07/2020 10:42AM by rray.
Attachments:
open | download - nsa320_3.4.4_boot_20200707014500 (31.6 KB)
Re: encrypted root not boot'n with 5.7.1
July 07, 2020 05:02PM
Quote

[ 0.000000][ T0] INITRD: 0x01100000+0x008ed000 overlaps in-use memory region - disabling initrd

Ah. That should be easy to solve. It explains why the rootfs was not found. Let me look at the log.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: encrypted root not boot'n with 5.7.1
July 07, 2020 05:11PM
rray,

Because you are booting with a really old u-boot, you have this loading problem.

Quote

U-Boot 2012.07-rc1 (Jul 27 2012 - 10:07:17)
ZyXEL NSA320 2-Bay Power Media Server

NSA320> boot

## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.7.1-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9354182 Bytes = 8.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

At serial console, change the load initrd address above to 0x02100000. If you're not sure how, get the envs listing, and I'll help modifying it.

printenv

=============

Once you booted into Debian again, consider upgrading u-boot to avoid this problem in the future:

https://forum.doozan.com/read.php?3,12381

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: encrypted root not boot'n with 5.7.1
July 07, 2020 05:48PM
that did it
i've been chase'n my tail for nearly a week
thanks
Re: encrypted root not boot'n with 5.7.1
July 07, 2020 11:05PM
Cool!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: encrypted root not boot'n with 5.7.1
July 08, 2020 11:08AM
it might save some other folks a bit of time if you added this to you installation instructions as something to look out for
thanks for all your work and help
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: