diff -urN archiso-43-a/archiso/initcpio/hooks/archiso archiso-43-b/archiso/initcpio/hooks/archiso --- archiso-43-a/archiso/initcpio/hooks/archiso 2021-12-31 23:32:15.547000000 +0000 +++ archiso-43-b/archiso/initcpio/hooks/archiso 2021-12-31 23:36:53.081000000 +0000 @@ -247,6 +247,23 @@ _mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.sfs" "/run/archiso/sfs/airootfs" + if [[ "${copytoram}" == "y" ]]; then + if ls -lh /run/archiso/bootmnt/autorun* >/dev/null 2>/dev/null; then + msg ":: Copying autorun scripts to RAM ..." + if ! cp -r /run/archiso/bootmnt/autorun* /run/archiso/copytoram/ ; then + echo "ERROR: failed to copy '/run/archiso/bootmnt/autorun*' to '/run/archiso/copytoram/'" + launch_interactive_shell + fi + fi + if ls -lh /run/archiso/bootmnt/sysrescue.d >/dev/null 2>/dev/null; then + msg ":: Copying configuration files to RAM ..." + if ! cp -r /run/archiso/bootmnt/sysrescue.d /run/archiso/copytoram/ ; then + echo "ERROR: failed to copy '/run/archiso/bootmnt/sysrescue.d' to '/run/archiso/copytoram/'" + launch_interactive_shell + fi + fi + fi + [[ "${loadsrm}" == "y" ]] && _mnt_srm "/run/archiso/bootmnt/${archisobasedir}" if [[ -f "/run/archiso/sfs/airootfs/airootfs.img" ]]; then @@ -328,6 +328,8 @@ if [[ "${copytoram}" == "y" ]]; then umount -d /run/archiso/bootmnt + # bind-mount bootmnt to create a stable path, for example for autorun scripts + mount --bind /run/archiso/copytoram /run/archiso/bootmnt fi }