{"id":530,"date":"2011-05-21T08:58:35","date_gmt":"2011-05-21T15:58:35","guid":{"rendered":"http:\/\/jim-zimmerman.com\/?p=530"},"modified":"2011-05-21T08:58:35","modified_gmt":"2011-05-21T15:58:35","slug":"mounting-as-writeable-from-single-user-mode","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=530","title":{"rendered":"Mounting \/ as writeable from single user mode."},"content":{"rendered":"<p>Say you happened remove a disk from your RHEL\/CentOS\/Fedora system and left the entry to mount a partition in the fstab and rebooted.  Well, you end up at a prompt for your root password and dropped into single user mode to resolve the problem before the system can boot up.  I used to be able to just mount the root partition writeable by using any number of commands including &#8220;mount \/&#8221; or &#8220;mount -rw \/&#8221;.  However, somewhere along the line that changed and those commands would not mount the filesystem as writeable.  To workaround the issue, I previously used a distribution rescue disk or booted the distribution disk into rescue mode.  Then, I would edit the fstab from rescue mode:<\/p>\n<p>I usually chrooted the system disk:<\/p>\n<p>chroot \/mnt\/sysimage<\/p>\n<p>And then to make the changes:<\/p>\n<p>vi \/etc\/fstab <\/p>\n<p>I knew there had to be a better, more efficient way to do this, but just never took the time to figure out what is was, until now.<\/p>\n<p>If you find yourself in similar situation, and need to edit a file or make some other changes to the filesystem from single user mode, this will do the trick:<\/p>\n<p>mount -w -o remount \/<\/p>\n<p>Then, you can edit the fstab that you forgot to before carelessly removing that hard drive.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Say you happened remove a disk from your RHEL\/CentOS\/Fedora system and left the entry to mount a partition in the fstab and rebooted. Well, you end up at a prompt for your root password and dropped into single user mode to resolve the problem before the system can boot up. I used to be able [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[48,184,183],"class_list":["post-530","post","type-post","status-publish","format-standard","hentry","category-documentation","tag-linux","tag-mount","tag-single-user-mode"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=530"}],"version-history":[{"count":1,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/530\/revisions"}],"predecessor-version":[{"id":531,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/530\/revisions\/531"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}