TurnKey Linux Virtual Appliance Library

broken fstab - app server won't boot!

Hi there,

I have a appserver turnkey appliance. I have added a line to the fstab (a smb mount point) that apparently was fat-fingered.  Now, it won't completely boot and I can't log in to it to edit the file! 

Is there any way to stop it from reading the fstab file so I can log in and fix it?

I have attached a screen capture from the host:

thanks,

Jordan

Kevin Cann's picture

Just a thought..

I'm relatively new to all of the following:
linux!, turnkey, amazon cloud..

If this is on an ebs volume, and you are familar with the amazon cloud aws management screen,
then you could do the following:

1) shutdown the instance in question.
2) create a new temp instance of the same or another type 

3) within amazon AWS interface, detatch the EBS from the original instance.
4) attach the EBS volume to the temp instance as a second volume (it will be a data volume)
5) edit fstab
6) detach the EBS volume from temp
7) Attach it back where it started.

But you'd have to be using EBS not S3 and be comfortable with the AWS menu.

I haven't done this, but this is the same concept you use in VMWARE, when you have to
do surgery on a non-booting C: partition.

I'd welcome someone with more experience on turnkey/aws chiming in.

Kevin Cann

It is an instance running on

It is an instance running on my vmware workstation.  It is trying to connect to a bad entry (looks like I missed the "\\" in front of the host name of a smb share.

Jeremy's picture

Boot with a LiveCD

Even the TKL one will do (but make sure you use the Live bit - don't accidentaly install over the top!!!)

Then mount your vHDD.

For future reference you can test fstab entries using mount (I learned this trick the same way you are!)

Say the fstab entry was:

/dev/sdx1 /some/dir defaults

IIRC you test it but mounting the 'device' you have added to fstab, eg

mount /dev/sdx1

If there is a problem it will let you know then and there. I get in the habit of testing them as soon as I add them to make sure I don't get any nasty suprises on reboot.

However you may still have an issue because AFAIK fstab runs before networking is up so the share won't be available (I've never had SMB shares in fstab). Perhaps the system knows how to work around that and all will be ok, but if the problems persist that could be worth checking out. Out of interest be great to hear whether that is an issue or not.

 

fixed it (sortof)

I found the problem... There is a setting in windows (registry) that needs to be set to at least 15 (mine was set a 15, but apparently it was not enough.)  I bumped it to 18 and it is now working.  Unfortunately, I didn't find this out until I had blown away my server and started all over again.

So that this doesn't happen again, I have created a script that will wait 60 seconds before mounting the drive.  I put it into /etc/init.d

Now, if something bad happens, I can log in before the script runs.

The setting I am referring to is discussed here:

http://www.datastor.com/Knowledge-Base/how-to-resolve-errors-accessing-d...

I don't understand why this is a problem as it worked fine for my windows clients, but linux was unhappy with it.

Kevin Cann's picture

vmware for your toolkit

in vmware, if you just remove the virtual disk without deleting it, then you can just add it to another
vm, say as a D: drive.

Then  you can edit it all your want.

Then just remove it from the temp VM and add it back to the original vm.

Takes seconds.

One of the things I love about vmware.

But booting from a live CD has it's place too.. especially if your file system is totally trashed.

Kevin Cann

But isn't there a bigger problem?

So all of this is well and good, but WHY will a bad entry in the fstab cause the OS to fail to boot????  On other operating systems, it will blow past the entry and keep on booting.

Kevin Cann's picture

long-known issue; easy fix

http://ubuntuforums.org/showpost.php?p=9681911&postcount=2

(put noboot wait on everything that's optional to booting).

Now why such annoying bugs exist in software?

Hell, it's not a perfect world.

If  Iwas writing linux, I'd hit this kind of bug with a sledge hammer the first minute I discovered it,
not wait for years and do nothing.

But windows bugs are 1000x more frequest and 1000x more retarded!

Kevin Cann

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)