I am using a dual boot setup of Arch Linux and Ubuntu. GRUB is installed on the Ubuntu partition and this leads to unwanted changes to grub.cfg after installing updates from within Ubuntu (specifically loosing Intel microcode initrd specifications). Currently I fix this manually by editing the grub.cfg file now and then.
I want to automate this and therefore wrote a python script that reads in grub.cfg and edits the appropriate lines. This python script shall be executed from within a shell script after each boot of Arch. For this I wrote the shell script and made it executable. I am now wondering what would be the best way to start this script automatically. For example are there any pros and cons between cron or systemd services? To edit the grub.cfg file I need to mount and umount the Ubuntu root partition where the file exists.