Ubuntu /etc/mtab file marked incomplete and reports 0k
Posted by: Jason Brundage in Linux, tags: LinuxAs an Linux fanboy, and ultimately a genuinely lazy person, I turned to Ubuntu to help me express my Open Source fanatacism, as well as my reluctance to spend money.
Recently a vital resource on my personal Ubuntu Laptop (not Dell) had become corrupt. The /etc/mtab file, which is how Debian Linux (the Ubuntu base) keeps track of mounted file systems, had been marked incomplete, and it was showing up in the local filesystem but the size was 0k.
After much research, and searching I found that few, very few people, had this same problem, so now I am sort of on a quest to make sure everyone who wants to fix this is able to.
The beauty of Ubuntu is how simple the layout is, but this fix pretty much works with any 2.x + Kernel of Linux.
Prior to beginning this, make sure you have a long lasting power source, do not do this running on battery. I have heard some horror stories regarding file system repair. Just make sure you are plugged in!
Firstly, boot into a virtual Linux. With Ubuntu you insert the ISO CD and change your bios to boot from CD, simple.
From there open your terminalapplication(Applications=>Accessories=>Terminal)
Now you can easily run the filesystem check program of your choice on the appropriate filesystem.
For a detailed look at how to implement the fsck program type man fsck. This will, as you should know already you 1337 hax0r you, will bring up the description of the program and how to run it. Read this thoroughly, as with most Linux manual entries it gives you a drief history on the program, who wrote it, and how to find the source. I highly suggest you know your coders, Open Source is a communal project (just happens to be a community of hundreds of millions).
http://linux.about.com/od/commands/l/blcmdl8_fsck_.htm has the excerpted manual page, for those who want to know NOW.
When I run such prorgams, I always make sure the output is verbose, i.e. tells me exactly what it is doing. Also, I don’t like acknowledging a lot of questions, furthermore and lastly I want the program to be thorough, so I make it check every filesystem, even the ones it thinks are OK. The command when entered would look like so: sudo fsck -A -v -a. (sudo is the Debian way of running a program as root, even when logged on as another user, this is required).
You will see the fsck program verifying the integrity of your linux file system and eventually it will be complete. Reboot and remove the CD…
Fixed!
By daniels.jeremiah

Entries (RSS)
Excellant article Jeremiah!!! Thank you for sharing your experience with Ubuntu.
Most of my IT career I have been pretty much a “Windows” guy. However, Ubunta opened the door for me to Linux. It was like it “held my hand”.. “ok you gui centric geek, it’s ok, Bill is not going to be mad at you”.. lol And yes, now I enjoy both worlds Linux and Windows. But I do have to admit my strengths are probably more in Windows…
This site is running Fedora, Apache, MySQL and PHP. And I can tell you that the stability and flexability has been awesome!! Sometimes almost guilty for not paying a dime …. Well ok yes running on a server that cost me about $500..
Jeremiah, I’d love to hear about any other Ubuntu experiences that you may have encounted and fixed!