Avatar of jason2302
jason2302

asked on 

Linux Lamp Web Server won't boot after hard power off

Hi, have absolutely no linux skills. Had to hardpower our Turnkey Lamp server off and now it hangs on boot. I think this might be that a process wasn't shutdown properly? Attached a screen shot. Complaining about can't open /scripts/functions and 'init not tainted'. Our linux guy is currently travelling so kinda stuck. If anyone can advise what i need to do it would be appreciated. Lamp-Error.docx
Linux

Avatar of undefined
Last Comment
Roy
Avatar of farzanj
farzanj
Flag of Canada image

For Ubuntu
update-rc.d apache defaults

For Redhat/Fedora/CentOS/Scientific
chkconfig httpd on
Avatar of jason2302
jason2302

ASKER

Hi, the server i have is http://www.turnkeylinux.org/lampstack
How do i enter these commands? I really have zero experience of linux...do i need to interup the boot up? thanks
Avatar of farzanj
farzanj
Flag of Canada image

This is your server management software not your Linux server.

You need to boot up the machine.  You may have terminal access through your management software or otherwise where you could issue these commands.
Avatar of jason2302
jason2302

ASKER

lamp server is apparently a stripped down version of ubuntu
Avatar of jason2302
jason2302

ASKER

the server is running on vsphere. I have console access to the screen. Can you please describe the steps i need to do to enter the commands.? Sorry...im not understanding your previous post
Avatar of farzanj
farzanj
Flag of Canada image

Issue the following two commands in the terminal after booting.

update-rc.d apache defaults
invoke-rc.d apache start


Or try to find option in your management software that allows you to manage services on your machine.
Avatar of jason2302
jason2302

ASKER

i cannot type anything into the console. It is stuck as per the screenshot. How do i bring a cursor up?
Avatar of farzanj
farzanj
Flag of Canada image

In your management software, you should have some option to manage services.  You need to turn on Apache Web Server service.  It would be just a few clicks.
Avatar of jason2302
jason2302

ASKER

what management software are you referring to? I am not aware of any. The server normally boots at which point you can either login on the console window (shown via vsphere), or access via web interfaces for Apache, PHP, Mysql, etc. The server is not getting far enough to logon. Per the screenshot, the screen is black with no ability to type.
Avatar of farzanj
farzanj
Flag of Canada image

You can access interfaces for Apache?

Just make it start and make it persist after reboot.  You should have those options if you try.
Avatar of jason2302
jason2302

ASKER

the server is not getting that far. It hangs as per screenshot after 5 secs. Apache is down...all websites are down. How do i make it persist? How do i get these options. Let me confirm the following:
1) i power the lamp server on.
2) viewing from the console window, it runs through the initialization
3) it hangs (as per screenshot) compaling it cannot find scripts/functions and init not tainted.
4) I am unable to type anything on the console
5) the server is not started properly
6) i do not know ANYTHING about linux so 'persist after reboot' is not something i know how to do.

the above problem i believe is down to a hard power off. Linux requires that processes are shutdown cleanly? I therefore need to run some commands to reset\restore\kill the orphaned process (i believe)

thanks
Avatar of farzanj
farzanj
Flag of Canada image

Did you do a hard reboot?  If you have not, it may help.

I thought that the system was basically Ok and just one service was not coming up.  This is a whole different level of problem.  If it doesn't start by itself after hard reboot, you would need to start at different run levels and perhaps put it on recovery, check partitions, etc.  But I feel you would not be able to follow the instructions.

If it doesn't recover after a hard reboot, the best thing I can think of is to get someone who knows Linux very well.
Avatar of jason2302
jason2302

ASKER

it won't start after a hard reboot...that is the problem. If anyone can assist then please email me at jason 'at' oxygen 'dot' bm. Happy to pay for this work as currently we have sites down
Avatar of Roy
Roy
Flag of United States of America image

Hello Jason, I have seen this problem before. Kinda issue you are facing is the scariest issue on linux "kernel panic". But not to worry we can roam around a bit and try to figure out the exact issue with your system.
As you mentioned that your system is not at all booting. So the first step is to boot the system in rescue mode:
1. your server is running under vSphere. You can mount the OS DVD from from VM "setting" tab. go to settings and click on ISO image and chose the OS ISO and also check connect check box as wel.

=> Start Computer / reboot computer
=> Put your Ubuntu install CD
=> Make sure BIOS is set to boot from CD
=> Now booting will start from Ubuntu install CD
=> You will see various option screen - select Recover a broken system

once it is booted up. You can actually check for things now. In My case the issue was with update-initramsfs which caused the above errors. The created initrd images were broken.
Something was wrong with findutils, so I just reinstalled the package (as well as initramfs-tools) and the problem is gone.

Hope this helps :)
Avatar of jason2302
jason2302

ASKER

Hi, thankyou for your post. I booted off a gparted live disk and ran fsck. This reported that it fixed some issues...disk now reporting 'clean'. However, still stuck on the same error after a restart. I will download the ubuntu cd and try the above. thanks...will get back to you v shortly
Avatar of jason2302
jason2302

ASKER

Hi, i downloaded 11.04 ubuntu. Booted, gives me the option to try or install...can't see an option for "recover a broken system"? Do i need a different CD? This one was 600mb+. If you have a link to the correct one that would be great
Avatar of Roy
Roy
Flag of United States of America image

To access rescue mode, type rescue at the boot: prompt, or boot with the rescue/enable=true boot parameter. You'll be shown the first few screens of the installer, with a note in the corner of the display to indicate that this is rescue mode, not a full installation.

There is this http://ubuntu-rescue-remix.org/ you can try to download it has ability to identify the issue with broken system and also have latest update with a lot of packages.
Avatar of jason2302
jason2302

ASKER

hi, downloading the remix iso. Im sorry if im being really stupid here but i don't see any boot prompt? It just boots off the ubuntu ISO and presents the install\run gui
Avatar of jason2302
jason2302

ASKER

Hi, i booted off the rescue ISO. Now at the welcome to ubuntu prompt. Could you advise what commands to run? thanks
Avatar of Roy
Roy
Flag of United States of America image

Try holding shift or ECS key while system booting..otherwise it will directly go to the main menu.
Avatar of Roy
Roy
Flag of United States of America image

try rescue and then when the system boots up properly then in shell try "sudo update-initramfs"
Avatar of jason2302
jason2302

ASKER

managed to get the 'boot:' prompt on the main Ubuntu 11.04 CD. When i type 'resuce' it says the kernel image resuce cannot be found. This is frustrating
Avatar of jason2302
jason2302

ASKER

typo...was typing 'rescue' not 'resuce'...kernel image not found on both the rescue CD and ubuntu 11.04 CD. Any ideas? Appreciated
Avatar of Roy
Roy
Flag of United States of America image

Jason, I am sorry it was typo it should "rescue"
Avatar of jason2302
jason2302

ASKER

yes...i typed rescue...says the image not found:rescue. Is there anyway we could liaise directly on this? Server is production and currently have a number of client websites down...including our own! jason at oxygen dot bm
Avatar of jason2302
jason2302

ASKER

ok...my lack of linux knowledge is causing issues here. I have now started up booting off the hard drive with ESC pressed and i get the recovery mode options. There are a number of versions to choose from. The 'lastest' version won't start...in normal or recovery. The version below does boot...and everything appears ok. So have i rolled back to a previous backup\version?
ASKER CERTIFIED SOLUTION
Avatar of Roy
Roy
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Linux
Linux

Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.

71K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo