Help - Search - Members - Calendar
Full Version: config script hangs linux on startup
Linuxhelp > Support > Technical Support
JoshS
Hi everyone,

I'm running FC4 on daul boot winXP/Linux laptop. I recently added a shell script of my own making under:

/etc/profile.d/

The script is meant to initialize some environment variables and start a license server for an app I run often. Unfortunately I made a typo in the script and it craps out on startup. The boot process continues running a few more commands after some error messages related to this script then the screen goes blank and I can't do anything else. My setup was fine just before adding this new script so it seems that if I can somehow delete or edit this bad file all will be well again. Does anyone have any advice on getting to this file or booting in some way that might get me around this hang up long enough to correct the file?

Thanks,
-josh
markjr
QUOTE (JoshS @ Jul 27 2006, 09:33 AM) *
The script is meant to initialize some environment variables and start a license server for an app I run often. Unfortunately I made a typo in the script and it craps out on startup. The boot process continues running a few more commands after some error messages related to this script then the screen goes blank and I can't do anything else. My setup was fine just before adding this new script so it seems that if I can somehow delete or edit this bad file all will be well again. Does anyone have any advice on getting to this file or booting in some way that might get me around this hang up long enough to correct the file?


Try booting into single-user mode and start by taking the script out.
JoshS
QUOTE (markjr @ Jul 27 2006, 02:03 PM) *
Try booting into single-user mode and start by taking the script out.


Thanks for the reply! I've got linux booted in single user mode. The boot sequence hangs on the bad commands from my incorrect script as it did before. It seems to be stuck at a shell prompt so I type exit and the boot continues. After the rest of the boot commands are completed, the system prompts me for my login. At this point I try typing my login password but the login prompt remains. I've tried typing my user name, root, my user password, and my root password but each only returns a new prompt for my login. I seem to be stuck again unable to access and edit / delete the broken script. Does anyone have any advice on what I might be missing or what I should try next?

Thanks
michaelk
boot up to rescue mode using the 1st install CD. Your / partition will be mounted at /mnt/sysimage. This is going to be console mode only. You can use the vi text editor to fix your script.
JoshS
Thanks for the help everybody! This was the first time I've had to go into single user mode to fix a mistake before, so I was a little slow to pick up on the fact that the shell prompt that I mentioned exiting out of in my last post was in fact A SHELL!!! I am dense sometimes. Anyway, I just deleted the script from there and my system booted fine. After a bit of tinkering I got the script to play nice and I learned a few things along the way. Cheers!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.