jordanthompson's picture

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

Forum: 
Kevin Cann's picture

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

Jeremy Davis's picture

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.

 

Kevin Cann's picture

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

jordanthompson's picture

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

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

Add new comment