|Home||Switchboard||Unix Administration||Red Hat||TCP/IP Networks||Neoliberalism||Toxic Managers|
May the source be with you, but remember the KISS principle ;-)
Bigger doesn't imply better. Bigger often is a sign of obesity, of lost control, of overcomplexity, of cancerous cells
|News||/etc/fstab/||Recommended Links||Ext2-Ext3-Ext4 Attributes||Filesystem mount options|
|Troubleshooting Errors in /etc/fstab||Linux Logical Volume Snapshots||tmpfs||Humor||Etc|
Sometimes if there are errors in /etc/fstab the system can't boot properly and come in rescue mode. In this mode the only drive (root) is mounted as read-only. that's why many monitoring system such as HP Operation manager (former OpenView) typically have probes that monitor content of /etc/fstab and report about problem before server rebooted.
To remount the root volume as RW, to make changes you can use the command:
mount -o remount,rw /
Than means that it is important to check if /etc/fstab entries are correct for new partitions by first un-mounting them them and then trying to mount using
Remember that the mount point must already exist, otherwise the entry will not mount on the filesystem
Again, system with incorrect /etc/fstab usually boot to safe mode with root filesystem mounted as read only.
There can be other reasons. For example if NAS storage goes south, or NAS server spontaneously rebooted. In this case NAS partition is the culprit, not the errors in /etc/fstab.
In this case the best option is to have "last good" configuration to compare.
Some useful information can be recovered from dmesg. The dmesg command is used to write the kernel messages in Linux and other Unix-like operating systems to standard output (which by default is the display screen). Here is some recommendation on how to use it (How to use the dmesg command -- by The Linux Information Project (LINFO) ):
The dmesg command is used to write the kernel messages in Linux and other Unix-like operating systems to standard output (which by default is the display screen).
A kernel is the core of an operating system. It is the first part of the operating system that is loaded into memory when a computer boots up (i.e., starts up), and it controls virtually everything on a system. The numerous messages generated by the kernel that appear on the display screen as a computer boots up show the hardware devices that the kernel detects and indicate whether it is able to configure them.
dmesg obtains its data by reading the kernel ring buffer. A buffer is a portion of a computer's memory that is set aside as a temporary holding place for data that is being sent to or received from an external device, such as a hard disk drive (HDD), printer or keyboard. A ring buffer is a buffer of fixed size for which any new data added to it overwrites the oldest data in it.
dmesg can be very useful when troubleshooting or just trying to obtain information about the hardware on a system. Its basic syntax is
Invoking dmesg without any of its options (which are rarely used) causes it to write all the kernel messages to standard output. This usually produces far too many lines to fit into the display screen all at once, and thus only the final messages are visible. However, the output can be redirected to the less command through the use of a pipe (designated by the vertical bar character), thereby allowing the startup messages to be viewed one screenful at a time:
dmesg | less
less allows the output to be moved forward one screenful at a time by pressing the SPACE bar, backward by pressing the b key and removed by pressing the q key. (The more command could have been used here instead of the less command; however, less is newer than more and has additional functions, including the ability to return to previous pages of the output.)
When a user encounters a problem with the system, it can be convenient to write the output of dmesg to a file and then send that file by e-mail to a system administrator or other knowledgeable person for assistance. For example, the output could be redirected to a file named boot_messages using the output redirection operator (designated by a rightward facing angle bracket) as follows:
dmesg > boot_messages
Because of the length of the output of dmesg, it can be convenient to pipe its output to grep, a filter which searches for any lines that contain the string (i.e., sequence of characters) following it. The -i option can be used to tell grep to ignore the case (i.e., lower case or upper case) of the letters in the string. For example, the following command lists all references to USB (universal serial bus) devices in the kernel messages:
dmesg | grep -i usb
And the following tells dmesg to show all serial ports (which are represented by the string tty):
dmesg | grep -i tty
The dmesg and grep combination can also be used to show how much physical memory (i.e., RAM) is available on the system:
dmesg | grep -i memory
The following command checks to confirm that the HDD(s) is running in DMA (direct memory access) mode:
dmesg | grep -i dma
The output of dmesg is maintained in the log file /var/log/dmesg, and it can thus also be easily viewed by reading that file with a text editor, such as vi or gedit, or with a command such as cat, e.g.,
cat /var/log/dmesg | less
Availability of the baseline of the configuration, even in the simplest form of tarball for /etc/directory done each your login from ~/.profile script is also very helpful. In this case you can exactly pinpoint what changes were made to /etc/fstab and do not need to guess. You can just diff the "last good" configuration with the current and see what changes were made. This is especially important if there are many cooks on the same kitchen or when you need to troubleshoot a server for which primary sysadmin is on vacation and you have only cursory knowledge what this server is for and how filesystems are used.
It's telling you that you can't write, because the filesystem was mounted read-only. Logically, you want to remount it with writes enabled, if you want to write.
mount -o remount,rw <your_root_partition such as /dev/sda#> /
To just give my feedback, I wanted to use the vi editor to change the fstab file but I couldn't, because of the read only problem.
I tried to remount the volume, but there was something wrong about what I did. No luck either to copy my fstab.bak file back to fstab. The read only curse.
So, I tried the following and it actualy worked much better than I hoped: During the GRUB listing I pressed "e" for editing the commands before booting and I changed the "ro" argument for the drive to rw. Then, I pressed ctrl-x to boot.
I expected to confront the same "waiting to mount" error, but I didn't. The system started as normally did.
I sudo gedit-ed the fstab file back to the original with a smile from one ear to another and rebooted.
The GRUB file was back to the original "ro" (read only) argument and I just came to register to the forum to write about it, since I 've read about your solution by my phone.
I should say I am using karmic koala with GRUB 1.97
Idea #18468: Be able to boot into recovery mode and fix malformed /etc/fstab
Written by dcstar the 6 Mar 09 at 03:49. Category: System. Related project: Nothing/Others. Status: New
If a user make an error modifying the root filesystem line in their /etc/fstab, they will then always be booted up with the root filesystem in "Read Only" mode so they cannot edit the file and boot normally.
The only repair option now is to boot up using Live CD/Recovery media, then mount the filesystem and then edit the /etc/fstab file (using sudo privileges). This can be a bit much to ask of an inexperienced user.Tags: boot fstab readonly Recovery
33 8 2
Solution #1: Vanilla fstab file
Written by dcstar the 6 Mar 09 at 03:49.I propose that a "vanilla" or "Install" /etc/fstab file be created at install that is available to be used in the "Recovery" menu that Ubuntu now provides.
This would allow R/W access to the root filesystem so a user could then fix their system without requiring external boot media and the issue of mounting/editing their boot disk.
Google matched content
Corruption of Fstab and Mtab Files and Available Linux Recovery Solutions
How to fstab (from the Ubuntu Forums)
Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers : Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism : The Iron Law of Oligarchy : Libertarian Philosophy
War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda : SE quotes : Language Design and Programming Quotes : Random IT-related quotes : Somerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose Bierce : Bernard Shaw : Mark Twain Quotes
Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 : Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law
Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds : Larry Wall : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOS : Programming Languages History : PL/1 : Simula 67 : C : History of GCC development : Scripting Languages : Perl history : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history
The Peter Principle : Parkinson Law : 1984 : The Mythical Man-Month : How to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Haterís Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite
Most popular humor pages:
Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor
The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D
Copyright © 1996-2018 by Dr. Nikolai Bezroukov. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) in the author free time and without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.
This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...
You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info
The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.
Last modified: October, 03, 2017