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

I have a small script which runs a few commands on a client. until now i need to go with my usb drive to the pc, run my live image and then run the script. now i want to use pxe for this.

so the plan is: start a really really small kernel with the required ressources like network, disks, ... in it. then start the script and reboot the machine.

so i can build a kernel, that should be no problem, but hwo can i start my script and stuff afterwards? i mean i could take a debian live or whatever and put the script into /etc/rc.local but thats way too much for that. and i would need nfs for that, which i dont want to use...

share|improve this question
up vote 1 down vote accepted

the answer is really simple:

create a kernel as you like, or just use one you just have lying around. then create an initram like described here: http://blog.mybox.ro/2010/05/12/how-to-change-files-in-a-initrd-image/

inside the initram you spawn instead of a shell the script you need.

share|improve this answer

You must log in to answer this question.

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