metro2012 Posted July 30, 2012 Share Posted July 30, 2012 how do i make a autorun usb that executes a shell script? this would be only for my system so if there is something i have to enable, no problem (i imagine sumthing like this disabled for security reasons) i believe the shell used wud be either ash or busybox. i think its busybox but cant confirm. thank u. Link to comment https://www.neowin.net/forum/topic/1094779-make-a-autorun-usb-that-executes-a-shell-script-on-the-usb-drive/ Share on other sites More sharing options...
metro2012 Posted August 3, 2012 Author Share Posted August 3, 2012 is there a forum dedicated to linux that might have the answer to how to do this? Link to comment https://www.neowin.net/forum/topic/1094779-make-a-autorun-usb-that-executes-a-shell-script-on-the-usb-drive/#findComment-595056389 Share on other sites More sharing options...
Nick H. Supervisor Posted August 3, 2012 Supervisor Share Posted August 3, 2012 Ok, I'm no expert by any means, but surely creating an autorun.inf script on the USB stick will mean that when you plug it in to a computer the script will run? EDIT: I should probably specify that the file needs to be called "autorun.inf" if you want it to automatically run. Any other name won't do the same thing. EDIT 2: Whoops, I forgot to check the forum. autorun.inf may not work on Linux. Let me check it out. EDIT 3: Ok. Apparently by default Linux doesn't come with an autorun option. You can download an application that will create the autorun command though. Look here. Link to comment https://www.neowin.net/forum/topic/1094779-make-a-autorun-usb-that-executes-a-shell-script-on-the-usb-drive/#findComment-595056399 Share on other sites More sharing options...
ichi Posted August 3, 2012 Share Posted August 3, 2012 You can place a file named "autorun" on the root of the usb stick and you'll be prompted when you plug the usb drive. I didn't get it to actually run though, it craps with an "error autorunning" (maybe I'm doing something wrong). Anyway you won't get the script to start automatically that way. If you need a script to run from the USB when plugged without prompting you'll have to define udev rules, something like what's explained here: http://www.panticz.de/node/629 Link to comment https://www.neowin.net/forum/topic/1094779-make-a-autorun-usb-that-executes-a-shell-script-on-the-usb-drive/#findComment-595056463 Share on other sites More sharing options...
Recommended Posts