• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 405
  • Last Modified:

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
0
jason2302
Asked:
jason2302
  • 15
  • 7
  • 6
1 Solution
 
farzanjCommented:
For Ubuntu
update-rc.d apache defaults

For Redhat/Fedora/CentOS/Scientific
chkconfig httpd on
0
 
jason2302Author Commented:
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
0
 
farzanjCommented:
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.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jason2302Author Commented:
lamp server is apparently a stripped down version of ubuntu
0
 
jason2302Author Commented:
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
0
 
farzanjCommented:
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.
0
 
jason2302Author Commented:
i cannot type anything into the console. It is stuck as per the screenshot. How do i bring a cursor up?
0
 
farzanjCommented:
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.
0
 
jason2302Author Commented:
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.
0
 
farzanjCommented:
0
 
farzanjCommented:
You can access interfaces for Apache?

Just make it start and make it persist after reboot.  You should have those options if you try.
0
 
jason2302Author Commented:
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
0
 
farzanjCommented:
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.
0
 
jason2302Author Commented:
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
0
 
RoyCommented:
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 :)
0
 
jason2302Author Commented:
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
0
 
jason2302Author Commented:
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
0
 
RoyCommented:
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.
0
 
jason2302Author Commented:
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
0
 
jason2302Author Commented:
Hi, i booted off the rescue ISO. Now at the welcome to ubuntu prompt. Could you advise what commands to run? thanks
0
 
RoyCommented:
Try holding shift or ECS key while system booting..otherwise it will directly go to the main menu.
0
 
RoyCommented:
try rescue and then when the system boots up properly then in shell try "sudo update-initramfs"
0
 
jason2302Author Commented:
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
0
 
jason2302Author Commented:
typo...was typing 'rescue' not 'resuce'...kernel image not found on both the rescue CD and ubuntu 11.04 CD. Any ideas? Appreciated
0
 
RoyCommented:
Jason, I am sorry it was typo it should "rescue"
0
 
jason2302Author Commented:
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
0
 
jason2302Author Commented:
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?
0
 
RoyCommented:
No you just rolled back the OS Kernel. Application should be same. You just booted your system with older kernel version.. Try to run you application for a while and see if it shows you any difference. You might miss some of the OS native update but not to worry they will prompt you soon for update.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 15
  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now