Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 0 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.