во время загрузки initramfs не монтирует /boot. если вы хотите использовать файл в /boot, вы можете монтировать /boot вручную. можете добавить следующие команды в скрипт passphrase-from-usb.
mkdir -p /tmp-boot
mount /tmp-boot -t ext4
dd if=/tmp-boot/myKeyfile.key bs=1 count=256 2>/dev/null
umount /tmp-boot
Также очень полезным будет этот http://wejn.org/how-to-make-passwordless-cryptsetup.html.
Citar puede ser algo cableado en bash.
Debe tener en cuenta que una comilla simple no interpreta nada. A $
se interpreta como un ASCII $
y no como el comienzo de una variable.
Puede combinar diferentes formas de cotizaciones para alcanzar diferentes objetivos. Recomendaría consultar el siguiente enlace y leer la sección "Citas fuertes".http://wiki.bash-hackers.org/syntax/quoting
Como dijo @allemtura, la forma correcta es usar comillas dobles para interpretar las variables correctamente.
Решение: мне нужны двойные кавычки:
rename "s/${fileh264}/${filemp4}/" ${mediapath}/*${fileh264}*