TurnKey Linux Virtual Appliance Library

TurnKey Lamp on VMware ESX 4.0.0 server now fails to boot. drops into initramfs how do I fix file system

help. I have two systems that are virtual lamp appliances running on a VMware ESX server 4.0.0, they have been running for the past 6 months with no issues. Today I shutdown the appliances via the console, and  they will not reboot. The last message on the console boot screen is no init found try passing init = bootarg.

It then drops into BusyBox v1.13.3 shell.

How can I fix??

Thanks in advance

Nick

This has been happening to me

This has been happening to me quite a lot with TKL VMs running on mdadm raid drives after power cuts.


the solution that works for me....

1. attach a live cd iso to the virtual machine

gparted is useful, http://sourceforge.net/projects/gparted/files/gparted-live-stable/OldFiles/0.9.0-6/gparted-live-0.9.0-6.iso/download, or a i386 ubutnu live iso will also work

2. boot the VM to the live cd

3. at the command prompt

fsck -y /dev/mapper/turnkey-root  

[sometimes helps to run it twice]

4. reboot the VM without the cd iso

5. should be working now.

hey,   i have the same

hey,

 

i have the same problem but can't repair via fsck. /dev/mapper/turnkey-root cannot be found and if i use "fsck -y /dev/sda2" it says "error 2 while executing fsck.LVM2_member for /dev/sda2"...

what can i do?

thanks,
aeno

Jeremy's picture

I suspect you'll need to run fsck on the LVM itself first

You'll need to find out what the LVM is called. OTTOMH I think it's called something like dm-0, perhaps try something like:

fsck -t ext4 /dev/dm-0

If that doesn't work then my memory isn't as good as I'd hoped and you'll need to do some research. I think the lvscan command should tell you the name of any LVMs.

There's a pretty cool (although a little dated) LVM tutorial on HowToForge here which may be helpful (don't just blindly type commands in though unless you understand them or you can destroy your data). There should also be plenty of info found on the Ubuntu forums and/or google.

FSCK - LVM

Here is how I ran fsck:

 

vgchange --ignorelockingfailure -ay

-- This will activate the lv

lvscan --ignorelockingfailure (this command should now work) 

You should now see both lv's as active

   active   '/dev/turnkey/root'

   active   '/dev/turnkey/swap_1'

 

Now run fsck:

      fsck /dev/turnkey/root

 

Thanks, now it worked. But

Thanks, now it worked. But another problem arose: When I start the appliance I cannot configure networking anymore. I get the error:

Errno 30 - Read-only file system:
'/etc/network/interfaces'

aeno

Jeremy's picture

You may also need to fsck sdx

ie what you were trying to do intially. Hopefully that should fix it... Otherwise I'm all out of ideas.

Similar issue but unfixable?

I have a similar issue. When running a fsck command though, I get the note I have no access rights to do so.

My VM chrashed when power was cut off. 

I have a LAMP stack with manually redmine installed. 

I run backups so I should be able to restore this. But since Webmin is not coming up, nor a normal command interface, how could I restore the backup?

Or fix this problem?

 

Thanks for your suggestions.

Jeremy's picture

2 things...

Firstly fsck needs to be run without the filesystem mounted. Generally this is done via a live CD or similar. I suspect that is your issue. I think it can be scheduled to run on boot (similar to how Win runs chkdsk on boot) but OTTOMH I'm not sure how to do this, perhaps google will be your friend!? :) (or just use a live CD/ISO)

Secondly, assuming you are using TKLBAM, It is probably easier (and less prone to error) to just launch a fresh VM and restore your data there. Don't destroy your old instance though until you are 100% sure that all your data is there and it all works as expected.

Turnkey VM, LVM und Lucid Ubuntu

Hi together

i have also this problems with the turnkey vms (redmine, mysql): after only some weeks i get a "initramfs" or a "busybox". All time i shutdown the vms correctly. So actually i think LVM is not reliable inside a vm. How can be fix this? 

Greetings 

L. Arnold's picture

Been running 4.0 ESXI without problems.

I don't know about the difference between ESX and ESXI but I have been running 4.0 ESXI without problems.

When you create a new Server from withing VSphere Client you need to ultimately get through the install and either first be able to get a DHCP IP, or go to Network Settings and configure a STATIC IP manually.  This can be a little tricky if you have multiple Network adapters but my experience is to simply configure the first Network adapter with all the gateway and dns settings you need.

Once you do that you should be able to access your WebShell or Webmin from a browser.

If this is not working see if you can install a Windows Instance from an ISO  (You can build an ISO with ISODisk, then upload that to your ESX Datastore via VSphere Client.  If you can get Windows Running with an appropriate IP you can get TKL running.  If you cannot then your issue is within your ESX setup, which I think, generally, is the case here.

Good Luck.

hmm .... :-( turnkey vm is not reliable, sry

Hi, 

i get to many fs errors other the last months. Actualy i get the bootmessage: VFS: cannot open root device "mapper/turnkey-root" or unknown block (0,0) and i can't use this vm again. Other the last month this costs me much time ...

 

Any solutions please ? 

 

Greetings Steve

same problem

Hi everyone, I have same problem, " No init found.Try passing init=bootarg." . fsck not works ( /bin/sh:fsck: not found) and solution with live cd  ( bfsck -y /dev/mapper/turnkey-root ) not helps, i get an error fsck.ext2: No such file or directory while tryint go open /dev/mapper/turnkey-root

The superblock could not be read or does not describle a corect ext2 ....after goes offer to run e2fck

...

fsck -t ext4 /dev/dm-0 not helped too

Is there is any chance to fix it without spending a month to lear all about  LVM,Ibuntu and deki?

screenshot

(No subject)

workaround

if you get a busybox root access, you can use this to start the full vm:

 

#! /bin/sh #workaround wg. Ubuntu Bug #https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/516684

mount -n -o remount,rw /

mkdir /var/run/network /etc/init.d/networking restart

mkdir /dev/pts

mount /dev/pts

/etc/init.d/ssh restart

mkdir /dev/shm

mount /dev/shm

Greetings

I have same problem see my

I have same problem see my post

http://www.turnkeylinux.org/forum/support/20120808/lamp-joomla-hacked-re...

I am getting error after second line

mount -n -o remount,rw /

mkdir /var/run/network /etc/init.d/networking restart

cannot create directory /etc/init.d/networking

Any Ideas

Thanks

PAul


Tim u are a life saver :)

The solution worked perfectly. thank you so much

I have a similar problem. The

I have a similar problem. The system had to run windows update so i shutdown the server, then rebooted the windows pc. When the system started i wanted to run the server again and i get this error.

error

I have no idea what to do next, can somebody point me in the right direction?

Solution for this issue

Boot from CentOS 6 disk into rescue mode. 

Once you get the shell.

 

Verify the "root" partition by running

#df -h

It should be "/dev/mapper/turnkey-root

 

# nano /boot/grub/grub.cfg

Search for the menu entry :

copy,paste, and comment the line starts with :

linux /vmlinux-2.6.32-5-amd64 root=UUID=XXXXXXXXXXXXXXXXXXXXXX

Update the uncommented line :

linux /vmlinux-2.6.32-5-amd64 root=/dev/mapper/turnkey-root

Save & Exit

Reboot the server and hopefully it shoould work.

Thanks,

Manmeet Bhatnagar

 

similar problems here running sugarcrm on esx 5.1

Starting web server: apache2(30)Read-only file system: apache2: could not open error log file /var/log/apache3/error.log.

Unable to open logs

Action 'start' failed.

...

Starting periodic command scheduler: cron/usr/sbin/cron: can't open or create/var/run/crond.pid" Read-only file system

 failed!

[same with mysqld, acpid apache2 mysqld postfix ... all failed]

 

Jeremy's picture

You need to run the repairs on the FS as posted above

The vHDD is corrupted (common when not shut down properly, also seems to be quite common when the underlaying FS (on the host) is a RAID config... My inclination would be to install (from ISO - rather than VM image) and avoid LVM (whilst it is a great thing IMO it adds an extra layer and increase possibility/probability of issues...).

TBH I'm not sure whether it's just because ESX/ESXi is so popular, whether it is closed source/proprietry, whether it's just not totally compatible with Linux/Debian/LVM or whether it is just a bit flakey (or a combo of above) but users seem to have a disproportionate experience of issues with TKL combined with ESX/ESXi.

Personally my solution would be to ditch it and go for a (IMO) better hypervisor such as Proxmox... :p I have been using Proxmox in multiple locations for years and had little to no issues with TKL (and I can run servers as OVZ containers where they run like bare metal - ~5% loss to hardware abstraction...)

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)