How to execute a script while booting Linux from flashdrive?
- by Usman Ajmal
I know i can make my script run at boot time in runlevel 2 by putting it in /etc/init.d/ and creating a symbolic to it in /etc/rc2.d but thats when Linux is on hard drive.
I want to run my script from a flashdrive such that when a user plug in a flashdrive and powers ON the machine, it may start booting from the OS in flash drive and eventually executing my script.
How can I achieve such a functionality?
I have tried burning OS to flashdrive but I never succeeded in booting OS from flashdrive.