{"id":13566,"date":"2019-04-03T10:45:43","date_gmt":"2019-04-03T10:45:43","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=13566"},"modified":"2019-04-03T10:45:43","modified_gmt":"2019-04-03T10:45:43","slug":"how-to-fix-failed-to-mount-etc-fstab-error-in-linux","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/03\/how-to-fix-failed-to-mount-etc-fstab-error-in-linux\/","title":{"rendered":"How to Fix \u201cfailed to mount \/etc\/fstab\u201d Error in Linux"},"content":{"rendered":"<p>In this article, i will explain how to solve \u201c<strong>failed to mount \/etc\/fstab<\/strong>\u201d boot error in Linux. The file in question contains descriptive information concerning the filesystems the system can mount automatically at boot time.<\/p>\n<p>This information is static and is read by other programs on the system such as mount, umount, dump and fsck. It has six important filesystem mount specification fields: the first field describes the block special device or remote filesystem to be mounted, the second field defines the mount point for the filesystem and the third specifies the filesystem type.<\/p>\n<p>The fourth field defines the mount options associated with the filesystem, and the fifth field is read by dump tool. The last field is used by fsck tool to establish the order of filesystem-checks.<\/p>\n<p><b>Suggested Read:<\/b>\u00a0<a href=\"https:\/\/www.tecmint.com\/find-and-fix-linux-boot-issues\/\" target=\"_blank\" rel=\"noopener\">How to Determine and Fix Boot Issues in Linux<\/a><\/p>\n<p>After editing the\u00a0<strong>\/etc\/fstab<\/strong>\u00a0to create an automount and rebooting my system; it booted into emergency mode showing the error message below.<\/p>\n<div id=\"attachment_26055\" class=\"wp-caption aligncenter\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-26055\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/06\/Linux-Emergency-mode.png\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/06\/Linux-Emergency-mode.png 819w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/06\/Linux-Emergency-mode-768x231.png 768w\" alt=\"Linux Emergency Mode\" width=\"819\" height=\"246\" aria-describedby=\"caption-attachment-26055\" data-lazy-loaded=\"true\" \/><\/p>\n<p id=\"caption-attachment-26055\" class=\"wp-caption-text\">Linux Emergency Mode<\/p>\n<\/div>\n<p>I logged in as\u00a0<strong>root<\/strong>\u00a0from the interface above, and typed the following command to look through the\u00a0<a href=\"https:\/\/www.tecmint.com\/manage-systemd-logs-using-journalctl\/\" target=\"_blank\" rel=\"noopener\">systemd journal<\/a>; then I saw the errors shown in the screen shot (indicated using red).<\/p>\n<p>As you can see, the main error (failure of\u00a0<strong>etc-fstab.mount<\/strong>\u00a0unit) lead to several other errors (systemd unit dependency issues) such as failure of local-fs.target, rhel-autorelabel-mark.service etc.<\/p>\n<pre># journalctl -xb\r\n<\/pre>\n<div id=\"attachment_26056\" class=\"wp-caption aligncenter\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-26056\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/06\/error-messages.png\" sizes=\"auto, (max-width: 818px) 100vw, 818px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/06\/error-messages.png 818w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/06\/error-messages-768x542.png 768w\" alt=\"Boot Error Messages\" width=\"818\" height=\"577\" aria-describedby=\"caption-attachment-26056\" data-lazy-loaded=\"true\" \/><\/p>\n<p id=\"caption-attachment-26056\" class=\"wp-caption-text\">Boot Error Messages<\/p>\n<\/div>\n<h4>Causes of \u201cfailed to mount \/etc\/fstab\u201d Error in Linux<\/h4>\n<p>The error above may result from any of the issues below, in the\u00a0<strong>\/etc\/fstab<\/strong>\u00a0file:<\/p>\n<ul>\n<li>missing \/etc\/fstab file<\/li>\n<li>wrong specification of filesystem mount options,<\/li>\n<li>failing mount points or<\/li>\n<li>unrecognized characters in the file.<\/li>\n<\/ul>\n<p>To solve it, you can use the original file if you created a backup, otherwise comment out any changes you made using the\u00a0<strong>\u201c#\u201d<\/strong>\u00a0character (and also ensure that all the uncommented lines are filesystem mount lines).<\/p>\n<p>So I opened the\u00a0<strong>\/etc\/fstab<\/strong>\u00a0using\u00a0<a href=\"https:\/\/www.tecmint.com\/vi-editor-usage\/\" target=\"_blank\" rel=\"noopener\">vi\/m text editor<\/a>\u00a0to check for any errors.<\/p>\n<pre># vi \/etc\/fstab\r\n<\/pre>\n<div id=\"attachment_26057\" class=\"wp-caption aligncenter\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-26057\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/06\/fstab-file-with-error.png\" sizes=\"auto, (max-width: 818px) 100vw, 818px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/06\/fstab-file-with-error.png 818w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/06\/fstab-file-with-error-768x542.png 768w\" alt=\"Linux \/etc\/fstab File\" width=\"818\" height=\"577\" aria-describedby=\"caption-attachment-26057\" data-lazy-loaded=\"true\" \/><\/p>\n<p id=\"caption-attachment-26057\" class=\"wp-caption-text\">Linux \/etc\/fstab File<\/p>\n<\/div>\n<p>I realized I had typed an\u00a0<code>\u201cr\u201d<\/code>\u00a0letter at the beginning of the file as shown in the screen shot above \u2013 this was recognized by the system as a special device which did not actually exist in the filesystem, thus resulting to the sequential errors shown above.<\/p>\n<p>This took me several hours before noticing and fixing it. So I had to remove the letter, commented out the first line in the file, closed and saved it. After running a reboot, the system booted well again.<\/p>\n<h4>How to Avoid Such Issues in the Future<\/h4>\n<p>To avoid encountering such issues on your system, take note of the following:<\/p>\n<p>Always create a backup of your config files before editing them. In case of any errors in your configs, you can revert to the default\/working file.<\/p>\n<p>For instance:<\/p>\n<pre># cp \/etc\/fstab \/etc\/fstab.orig\r\n<\/pre>\n<p>Secondly, check config files for any errors before saving them, certain applications offer utilities to check syntax of config files before running the application. Use these utilities where possible.<\/p>\n<p>However, if you happen to get any system errors messages:<\/p>\n<p>First look through the\u00a0<a href=\"https:\/\/www.tecmint.com\/manage-systemd-logs-using-journalctl\/\" target=\"_blank\" rel=\"noopener\">systemd journal using the journalctl utility<\/a>\u00a0to determine what exactly caused them:<\/p>\n<pre># journal -xb\r\n<\/pre>\n<p>If you can\u2019t resolve the errors in one way or the other, run to any of the millions of Linux forums on the web and post the issue there.<\/p>\n<p>Do check out some useful related articles.<\/p>\n<ol>\n<li><a href=\"https:\/\/www.tecmint.com\/linux-boot-process\/\" target=\"_blank\" rel=\"noopener\">A Basic Guide to Linux Boot Process<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/best-linux-boot-loaders\/\" target=\"_blank\" rel=\"noopener\">4 Best Linux Boot Loaders<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/manage-systemd-logs-using-journalctl\/\" target=\"_blank\" rel=\"noopener\">Manage Log Messages Under Systemd Using Journalctl [Comprehensive Guide]<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/linux-boot-process-and-manage-services\/\" target=\"_blank\" rel=\"noopener\">Managing System Startup Process and Services (SysVinit, Systemd and Upstart)<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/rhcsa-exam-boot-process-and-process-management\/\" target=\"_blank\" rel=\"noopener\">Process Management in RHEL 7: Boot, Shutdown, and Everything in Between<\/a><\/li>\n<\/ol>\n<p>That\u2019s it for now. In this article, I explained how to solve the \u201cfailed to mount \/etc\/fstab\u201d boot error in Linux. Once again, to avoid such issues (or if you encounter any boot issues), remember to follow the guidelines offered above. Lastly, you can add your thoughts to this guide via the feedback form below.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/fix-failed-to-mount-etc-fstab-error-in-linux\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, i will explain how to solve \u201cfailed to mount \/etc\/fstab\u201d boot error in Linux. The file in question contains descriptive information concerning the filesystems the system can mount automatically at boot time. This information is static and is read by other programs on the system such as mount, umount, dump and fsck. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/03\/how-to-fix-failed-to-mount-etc-fstab-error-in-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Fix \u201cfailed to mount \/etc\/fstab\u201d Error in Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13566","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=13566"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13566\/revisions"}],"predecessor-version":[{"id":13567,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13566\/revisions\/13567"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=13566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=13566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=13566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}