Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to mount a partition on the hard drive that somehow is also scanned along with rc.local (or wherever the appropriate startup files go)? I want to boot a live image and have something automatically run but I can't change any files in the Live Image. Is that at all possible?

share|improve this question
up vote 0 down vote accepted

It is possible if and only if the live CD explicitly supports it. You could have rc.local on the iso always look for a file on a predefined place on the hard drive; but that's dangerous (if you put the CD in a computer you don't know well, you have no idea what it's going to end up executing) and fragile (how are you going to choose which partitions to mount and so on?). You could also react to a kernel command line argument (i.e. something you'd type on the boot prompt). But there wouldn't be that much point when you could type the script name after booting instead.

I suspect the easiest approach would be to boot from USB instead of CD, and run a script on the USB drive.

share|improve this answer
Thanks for your answer. I would have to at least remaster to change rc.local though, right? The danger isn't an issue since it is only going to be run as a system to demo an app. That's also why I can't user the kernel command or script after booting - it's meant to run an app and do nothing else. – V_H Sep 21 '10 at 0:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .