More of a debugging step, but have you tried running lsinitrd on the initramfs afterwards to verify your script actually got added?
You theoretically could decompress the entire image to look around as well. I don’t know the specifics for alpine, but presumably there would be a file present somewhere that should be calling your custom script.
EDIT: Could it also be failing because the folder you are trying to mount to does not exist? Don’t you need a mkdir somewhere in your script?
More of a debugging step, but have you tried running
lsinitrd
on the initramfs afterwards to verify your script actually got added?You theoretically could decompress the entire image to look around as well. I don’t know the specifics for alpine, but presumably there would be a file present somewhere that should be calling your custom script.
EDIT: Could it also be failing because the folder you are trying to mount to does not exist? Don’t you need a
mkdir
somewhere in your script?