How start a script on startup automatically on PXE booting linux

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-1
down vote

favorite












I have a virtual machine that is PXE booted. How can I start a script to run as a background on startup without having to manually start it?



I have tried the following things, and they do not work.



  1. Modifying the /etc/rc.local

  2. Adding it to the /etc/init.d and updating the update-rc.d

  3. I cannot install any packages, so upstart won't be an option.

When I modify the rc.local, the virtual machine crashes. Also update-rc.d is not available.



Please help. Thanks in advance.







share|improve this question




















  • Why you cannot install any of packages? Which form of your system image? Is it unpacked on NFS server or in image file?
    – Yurij Goncharuk
    Apr 3 at 8:50










  • Well I am a newbie so I don't really know. But I guess it's sort of a minimalistic VMkernel. It doesn't even recognize sudo or apt-get for any reason.
    – Taylor Hutt
    Apr 3 at 9:13










  • Your VM machine is booting. Loader (I assume that this is pxelinux) loads kernel and initrd from TFTP servers. So Where remain system (root folder with /bin /etc ...) is located and what form of it (directory, iso image, archive)?
    – Yurij Goncharuk
    Apr 3 at 9:19










  • The root folder is present locally inside the VM only. It is a directory.
    – Taylor Hutt
    Apr 3 at 9:24










  • You can chroot to this directory from working system and install all needed packages. Is it appropriate solution for you?
    – Yurij Goncharuk
    Apr 3 at 9:29














up vote
-1
down vote

favorite












I have a virtual machine that is PXE booted. How can I start a script to run as a background on startup without having to manually start it?



I have tried the following things, and they do not work.



  1. Modifying the /etc/rc.local

  2. Adding it to the /etc/init.d and updating the update-rc.d

  3. I cannot install any packages, so upstart won't be an option.

When I modify the rc.local, the virtual machine crashes. Also update-rc.d is not available.



Please help. Thanks in advance.







share|improve this question




















  • Why you cannot install any of packages? Which form of your system image? Is it unpacked on NFS server or in image file?
    – Yurij Goncharuk
    Apr 3 at 8:50










  • Well I am a newbie so I don't really know. But I guess it's sort of a minimalistic VMkernel. It doesn't even recognize sudo or apt-get for any reason.
    – Taylor Hutt
    Apr 3 at 9:13










  • Your VM machine is booting. Loader (I assume that this is pxelinux) loads kernel and initrd from TFTP servers. So Where remain system (root folder with /bin /etc ...) is located and what form of it (directory, iso image, archive)?
    – Yurij Goncharuk
    Apr 3 at 9:19










  • The root folder is present locally inside the VM only. It is a directory.
    – Taylor Hutt
    Apr 3 at 9:24










  • You can chroot to this directory from working system and install all needed packages. Is it appropriate solution for you?
    – Yurij Goncharuk
    Apr 3 at 9:29












up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I have a virtual machine that is PXE booted. How can I start a script to run as a background on startup without having to manually start it?



I have tried the following things, and they do not work.



  1. Modifying the /etc/rc.local

  2. Adding it to the /etc/init.d and updating the update-rc.d

  3. I cannot install any packages, so upstart won't be an option.

When I modify the rc.local, the virtual machine crashes. Also update-rc.d is not available.



Please help. Thanks in advance.







share|improve this question












I have a virtual machine that is PXE booted. How can I start a script to run as a background on startup without having to manually start it?



I have tried the following things, and they do not work.



  1. Modifying the /etc/rc.local

  2. Adding it to the /etc/init.d and updating the update-rc.d

  3. I cannot install any packages, so upstart won't be an option.

When I modify the rc.local, the virtual machine crashes. Also update-rc.d is not available.



Please help. Thanks in advance.









share|improve this question











share|improve this question




share|improve this question










asked Apr 3 at 7:24









Taylor Hutt

1




1











  • Why you cannot install any of packages? Which form of your system image? Is it unpacked on NFS server or in image file?
    – Yurij Goncharuk
    Apr 3 at 8:50










  • Well I am a newbie so I don't really know. But I guess it's sort of a minimalistic VMkernel. It doesn't even recognize sudo or apt-get for any reason.
    – Taylor Hutt
    Apr 3 at 9:13










  • Your VM machine is booting. Loader (I assume that this is pxelinux) loads kernel and initrd from TFTP servers. So Where remain system (root folder with /bin /etc ...) is located and what form of it (directory, iso image, archive)?
    – Yurij Goncharuk
    Apr 3 at 9:19










  • The root folder is present locally inside the VM only. It is a directory.
    – Taylor Hutt
    Apr 3 at 9:24










  • You can chroot to this directory from working system and install all needed packages. Is it appropriate solution for you?
    – Yurij Goncharuk
    Apr 3 at 9:29
















  • Why you cannot install any of packages? Which form of your system image? Is it unpacked on NFS server or in image file?
    – Yurij Goncharuk
    Apr 3 at 8:50










  • Well I am a newbie so I don't really know. But I guess it's sort of a minimalistic VMkernel. It doesn't even recognize sudo or apt-get for any reason.
    – Taylor Hutt
    Apr 3 at 9:13










  • Your VM machine is booting. Loader (I assume that this is pxelinux) loads kernel and initrd from TFTP servers. So Where remain system (root folder with /bin /etc ...) is located and what form of it (directory, iso image, archive)?
    – Yurij Goncharuk
    Apr 3 at 9:19










  • The root folder is present locally inside the VM only. It is a directory.
    – Taylor Hutt
    Apr 3 at 9:24










  • You can chroot to this directory from working system and install all needed packages. Is it appropriate solution for you?
    – Yurij Goncharuk
    Apr 3 at 9:29















Why you cannot install any of packages? Which form of your system image? Is it unpacked on NFS server or in image file?
– Yurij Goncharuk
Apr 3 at 8:50




Why you cannot install any of packages? Which form of your system image? Is it unpacked on NFS server or in image file?
– Yurij Goncharuk
Apr 3 at 8:50












Well I am a newbie so I don't really know. But I guess it's sort of a minimalistic VMkernel. It doesn't even recognize sudo or apt-get for any reason.
– Taylor Hutt
Apr 3 at 9:13




Well I am a newbie so I don't really know. But I guess it's sort of a minimalistic VMkernel. It doesn't even recognize sudo or apt-get for any reason.
– Taylor Hutt
Apr 3 at 9:13












Your VM machine is booting. Loader (I assume that this is pxelinux) loads kernel and initrd from TFTP servers. So Where remain system (root folder with /bin /etc ...) is located and what form of it (directory, iso image, archive)?
– Yurij Goncharuk
Apr 3 at 9:19




Your VM machine is booting. Loader (I assume that this is pxelinux) loads kernel and initrd from TFTP servers. So Where remain system (root folder with /bin /etc ...) is located and what form of it (directory, iso image, archive)?
– Yurij Goncharuk
Apr 3 at 9:19












The root folder is present locally inside the VM only. It is a directory.
– Taylor Hutt
Apr 3 at 9:24




The root folder is present locally inside the VM only. It is a directory.
– Taylor Hutt
Apr 3 at 9:24












You can chroot to this directory from working system and install all needed packages. Is it appropriate solution for you?
– Yurij Goncharuk
Apr 3 at 9:29




You can chroot to this directory from working system and install all needed packages. Is it appropriate solution for you?
– Yurij Goncharuk
Apr 3 at 9:29










1 Answer
1






active

oldest

votes

















up vote
0
down vote













If you can use crontab, you can add :



@reboot your_script.sh





share|improve this answer




















  • I can't use that as well :/
    – Taylor Hutt
    Apr 3 at 7:44










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435219%2fhow-start-a-script-on-startup-automatically-on-pxe-booting-linux%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













If you can use crontab, you can add :



@reboot your_script.sh





share|improve this answer




















  • I can't use that as well :/
    – Taylor Hutt
    Apr 3 at 7:44














up vote
0
down vote













If you can use crontab, you can add :



@reboot your_script.sh





share|improve this answer




















  • I can't use that as well :/
    – Taylor Hutt
    Apr 3 at 7:44












up vote
0
down vote










up vote
0
down vote









If you can use crontab, you can add :



@reboot your_script.sh





share|improve this answer












If you can use crontab, you can add :



@reboot your_script.sh






share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 3 at 7:42









Charles

113




113











  • I can't use that as well :/
    – Taylor Hutt
    Apr 3 at 7:44
















  • I can't use that as well :/
    – Taylor Hutt
    Apr 3 at 7:44















I can't use that as well :/
– Taylor Hutt
Apr 3 at 7:44




I can't use that as well :/
– Taylor Hutt
Apr 3 at 7:44












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435219%2fhow-start-a-script-on-startup-automatically-on-pxe-booting-linux%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)