PDA

View Full Version : Knoppix 3.9 noprompt cheatcode problems



g6con
08-24-2005, 08:51 PM
I need to be able to remotely reboot or poweroff knoppix. I want to use the noeject and noprompt cheat codes so that the computer can restart knoppix without using a keyboard and monitor. However, when I use these codes, it gets to the last message: Preparing for reboot... , and then it just stops. It doesn't reboot or do anything else. I don't know if I should change the /etc/init.d/koppix-reboot file, or what. (I'm pretty new to linux and knoppix!)

BTW - I have successfully remastered knoppix and added startup scripts so that ssh and some other code of mine runs on startup. This way, I can just send a reboot command over ssh. I am actually booting off USB - but that shouldn't be the issue. When I try the noprompt/ noeject in any combination on the original, unchanged knoppix 3.9 CD it hangs like I described.

Thanks for your help!

g6con
08-25-2005, 03:47 PM
I fixed it... I just got the latest version of sysvinit, modified halt.c and remade init.

abeverley
09-14-2005, 09:53 AM
I've also got this problem. Which sysvinit did you download? The 'real' one or the knoppix version? What was the actual version you compiled?

Even better, can you just email me the re-compiled 'init'?

Cheers,

Andy
andy@andybev.com

g6con
09-26-2005, 10:12 PM
Sorry I took so long to reply. I stopped watching this topic.

Anyway, I donwloaded sysvinit-knoppix-2.84, which was the latest version I could find. I edited halt.c in the src folder:



if(umount("/cdrom")==0)
{
// write(2,msg1,strlen(msg1));
// tcflush(1,TCIFLUSH);
// getchar();
write(2,msg2,strlen(msg2)); usleep(250000);}
break;
}

All I did was comment out those lines and then do make to build a new version of init.

However, i have a new problem. I had been doing remote reboots that were working, but the keyboard was still attached to the remote computer even though I wasn't using it. Now I've found that if I detach the keyboard and try the same exact thing, Knoppix goes through reboot as it should but then never actually reboots at the end.

Does anyone know a way around this?