0

I modified the fstab file and while saving a file, I made the mistake of naming it fstg. Because of this mistake, my system is not able to boot. It just boots into a maintenance shell. I am unable to change the name of fstg back to fstab. I tried doing this with su but nothing changes. Any idea of how to correct this?

4
  • 1
    1) Not programming related. 2) Please accept some questions. Commented Apr 29, 2011 at 22:16
  • fstag? Are you sure you didn't mean fstab? Commented Apr 29, 2011 at 22:16
  • oh sorry it is fstab.
    – agent.smith
    Commented Apr 29, 2011 at 22:21
  • Question needs clarification. What exact error messages do you get when the system boots? How did you attempt to move the file back (what exact command)? What exact error did you get? By the way, you should not need to su when you are already in a root ("maintenance") shell. Also, the drive might be mounted read-only.
    – mpontillo
    Commented Apr 29, 2011 at 22:26

3 Answers 3

3

What you need to do is to mount the root filesystem read-write. The maintenance shell has it mounted read-only.

One way to do this is:

mount / -o remount,rw

Or maybe:

mount -n -o remount,rw /

After that you can rename the file back to its proper name.

Before rebooting you should run sync. Possibly you should remount / read-only again or the filesystem will need a fsck or journal replay on boot.

2

The easiest way is to rename it from a liveCD because your system can't mount the root filesystem right now.

2
  • how do u go about in vm? I am running ubuntu in a virtual box. I shud have taken a snapshot
    – agent.smith
    Commented Apr 29, 2011 at 22:27
  • 1
    @agent, you can run a live cd in a VM. Just download it and mount it in the virtual cd rom drive.
    – dsolimano
    Commented Apr 29, 2011 at 23:57
0

Are you sure that the file was named fstag? Or do you mean /etc/fstab? Also, it would help if you could state the distribution you are using.

Either way, try to use the distribution LiveCD or SystemRescueCd which is a Linux system rescue disk that enables you to perform administration tasks.

I hope this helps.

1
  • it is ubuntu maverik in sun vbox. It is /etc/fstab.
    – agent.smith
    Commented Apr 29, 2011 at 22:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .