Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I successfully installed a script to automatically launch in /etc/init.d on my new Raspberry Pi.

Unfortunately, it is a node.js app that never returns, and therefore hangs the device during boot (this is on Debian). Yes, I'm an idiot.

Is there a secret handshake I can do during boot to prevent it from running my init.d script so I can get to login and a shell to fix it?

share|improve this question
    
I don't know anything about raspberry pi, but can you just rename the script so that it can't find it and doesn't run it? –  unexpected62 Feb 23 '13 at 3:39
    
You can use a & to background the process, or use start-stop-daemon, which should handle things properly, even when the daemon doesn't really daemonize. –  jordanm Feb 23 '13 at 3:47
    
Try add init=/bin/bash to your boot parameters –  Ulrich Dangel Feb 23 '13 at 12:13

2 Answers 2

up vote 2 down vote accepted

Assuming that the node.js init script runs before sshd or any other external access script (otherwise, you could just login in remotely, disable the script, and then reboot), the easiest thing to do is to take your SD card to another computer and mount it there, find the init script, and move it out of the init directory. Yes, it requires an external system, but you needed an external system to prepare the flash disk anyway, so I hope you still have one around.

There's also a safe mode for Raspbian, but it sounds like you aren't running that. Here are relevant forum links in case they might help:

share|improve this answer

Check the offending script carefully. make sure init is trying to start it when its dependecies are running, and that they are configured to start. Compare the script to start your service with the scripts for similar services, writing those scripts is sort of a black art. Before commiting on it starting automatically, start it by hand (something like service mydaemon start might be available) and check what happens, if it works, and if something shows up in the logs. Check similarly that it shuts down cleanly. If the above points are satisfied, try enabling it automatically again.

Good luck!

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.