So, I am working on some sort of bash script, that basically works as industrial PC installer. Basically, what it does is, it mounts HDD (or SSD), copy a working image template on it using dd, than modify its content matching exact device that needs to be installed. That includes creating directories, files, modifing configs, etc..
Than you unmount it, disconnect, put in new PC, start, and you have new PC ready to go.
One part of the process, is creating symlinks for some dierctories. Example: ln -s /mnt/custom/home/user/original/path/source/subfolder /mnt/custom/home/user/symlnk
HOWEVER, as you probably guessed. This symlink, does not work, after the hard drive is unmounted and run on its own. Symlink is like this: /home/user/original/path/source/subfolder -> /mnt/custom/home/user/symlnk
So, my question is, how to do it on mounted hard drive, to have this symlink: /home/user/original/path/source/subfolder -> /home/user/symlnk when the drive is unmounted and booted?
Is it even possible?