{"id":2756,"date":"2020-02-20T00:01:38","date_gmt":"2020-02-19T18:31:38","guid":{"rendered":"https:\/\/www.24x7serversupport.com\/blog\/?p=2756"},"modified":"2020-02-20T00:01:46","modified_gmt":"2020-02-19T18:31:46","slug":"how-to-boot-centos-8-rhel-8-server-in-single-user-mode","status":"publish","type":"post","link":"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/","title":{"rendered":"How to Boot CentOS 8 \/ RHEL 8 Server in Single User Mode"},"content":{"rendered":"\n<p>Single user mode is the&nbsp;<strong>maintenance<\/strong>&nbsp;or&nbsp;<strong>emergency mode<\/strong>&nbsp;where Linux geeks perform all troubleshooting steps. In Single user mode all the system services are stopped and only root user is allowed to execute commands. In this article we will demonstrate on how to boot CentOS 8 \/ RHEL 8 server into a single user mode and perform troubleshooting steps.<\/p>\n\n\n\n<p>There are two ways to boot CentOS 8 and RHEL 8 server in Single User Mode<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Method 1) Using \u201crd.break\u201d keyword<\/h4>\n\n\n\n<p><strong>Step:1)&nbsp;<\/strong>Reboot Your CentOS 8 or RHEL 8 Server and go to grub boot loader screen by interrupting auto boot and choose first line which includes the kernel (In case you have multiple kernel lines choose the appropriate one which suits to your environment). Below is the CentOS 8 boot loader screen,<\/p>\n\n\n\n<p> <strong>Step:2)<\/strong>&nbsp;Press \u2018<strong>e<\/strong>\u2019 to enter in the edit mode and then go to the end of line which starts with \u2018<strong>linux<\/strong>\u2018 word, type the keyword \u201c<strong>rd.break<\/strong>\u201d <\/p>\n\n\n\n<p>now press<strong>&nbsp;Ctrl-x<\/strong>&nbsp;to boot system in single user mode then we will get below screen,<br><\/p>\n\n\n\n<p><strong>Step:3)<\/strong>&nbsp;Remount the \/sysroot in read-write (rw) mode<\/p>\n\n\n\n<p>Run the following commands to mount sysroot file system in rw,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">switch_root:\/# mount -o remount,rw \/sysroot\nswitch_root:\/# chroot \/sysroot\nsh-4.4#<\/pre>\n\n\n\n<p>As we can see above that we got \u2018sh\u2019 shell prompt, now root user can execute the commands.<\/p>\n\n\n\n<p>Let\u2019s assume we want to recover root password by resetting it, so execute following commands one after the another<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sh-4.4# echo \u201cP@ssW0rD@123#\u201d | passwd --stdin root \nsh-4.4# touch \/.autorelabel<\/pre>\n\n\n\n<p>Once you are done with password reset, run below command to reboot your system<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sh-4.4# reboot -f<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Method 2) Replacing the \u2018ro\u2019 word with \u201crw init=\/sysroot\/bin\/sh\u201d<\/h4>\n\n\n\n<p><strong>Step 1)<\/strong>&nbsp;Reboot your CentOS 8 \/ RHEL 8 System and interrupt the auto boot by entering up and down arrow key then we will get following grub screen.<\/p>\n\n\n\n<p>Choose the first line which includes the kernel,<\/p>\n\n\n\n<p> <strong>Step 2)<\/strong>&nbsp;Press \u2018<strong>e<\/strong>\u2019 to enter in edit mode and look for the line which starts with \u2018<strong>linux<\/strong>\u2019 word, replace the \u201c<strong>ro<\/strong>\u201d with \u201c<strong>rw init=\/sysroot\/bin\/sh<\/strong>\u201d <\/p>\n\n\n\n<p>press \u201c<strong>Ctrl-x<\/strong>\u201d to boot the system in single user mode,<br><\/p>\n\n\n\n<p><strong>Step 3)<\/strong>&nbsp;Mount the root file system using chroot command,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">:\/# chroot \/sysroot<\/pre>\n\n\n\n<p>Once you are done with changes and troubleshooting steps then reboot your system using following command,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">:\/# reboot -f<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Single user mode is the&nbsp;maintenance&nbsp;or&nbsp;emergency mode&nbsp;where Linux geeks perform all troubleshooting steps. In Single user mode all the system services are stopped and only root user is allowed to execute commands. In this article we will demonstrate on how to boot CentOS 8 \/ RHEL 8 server into a single user mode and perform troubleshooting [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[1],"tags":[],"class_list":["post-2756","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Boot CentOS 8 \/ RHEL 8 Server in Single User Mode | 24x7serversupport Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Boot CentOS 8 \/ RHEL 8 Server in Single User Mode | 24x7serversupport Blog\" \/>\n<meta property=\"og:description\" content=\"Single user mode is the&nbsp;maintenance&nbsp;or&nbsp;emergency mode&nbsp;where Linux geeks perform all troubleshooting steps. In Single user mode all the system services are stopped and only root user is allowed to execute commands. In this article we will demonstrate on how to boot CentOS 8 \/ RHEL 8 server into a single user mode and perform troubleshooting [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/\" \/>\n<meta property=\"og:site_name\" content=\"24x7serversupport Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-19T18:31:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-19T18:31:46+00:00\" \/>\n<meta name=\"author\" content=\"24x7support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:site\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"24x7support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/\",\"name\":\"How to Boot CentOS 8 \/ RHEL 8 Server in Single User Mode | 24x7serversupport Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\"},\"datePublished\":\"2020-02-19T18:31:38+00:00\",\"dateModified\":\"2020-02-19T18:31:46+00:00\",\"author\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.24x7serversupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Boot CentOS 8 \/ RHEL 8 Server in Single User Mode\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/\",\"name\":\"24x7serversupport Blog\",\"description\":\"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\",\"name\":\"24x7support\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Boot CentOS 8 \/ RHEL 8 Server in Single User Mode | 24x7serversupport Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/","og_locale":"en_US","og_type":"article","og_title":"How to Boot CentOS 8 \/ RHEL 8 Server in Single User Mode | 24x7serversupport Blog","og_description":"Single user mode is the&nbsp;maintenance&nbsp;or&nbsp;emergency mode&nbsp;where Linux geeks perform all troubleshooting steps. In Single user mode all the system services are stopped and only root user is allowed to execute commands. In this article we will demonstrate on how to boot CentOS 8 \/ RHEL 8 server into a single user mode and perform troubleshooting [&hellip;]","og_url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/","og_site_name":"24x7serversupport Blog","article_published_time":"2020-02-19T18:31:38+00:00","article_modified_time":"2020-02-19T18:31:46+00:00","author":"24x7support","twitter_card":"summary_large_image","twitter_creator":"@24x7serversuppo","twitter_site":"@24x7serversuppo","twitter_misc":{"Written by":"24x7support","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/","url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/","name":"How to Boot CentOS 8 \/ RHEL 8 Server in Single User Mode | 24x7serversupport Blog","isPartOf":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#website"},"datePublished":"2020-02-19T18:31:38+00:00","dateModified":"2020-02-19T18:31:46+00:00","author":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401"},"breadcrumb":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-boot-centos-8-rhel-8-server-in-single-user-mode\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.24x7serversupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Boot CentOS 8 \/ RHEL 8 Server in Single User Mode"}]},{"@type":"WebSite","@id":"https:\/\/www.24x7serversupport.com\/blog\/#website","url":"https:\/\/www.24x7serversupport.com\/blog\/","name":"24x7serversupport Blog","description":"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401","name":"24x7support","url":"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/comments?post=2756"}],"version-history":[{"count":2,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2756\/revisions"}],"predecessor-version":[{"id":2762,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2756\/revisions\/2762"}],"wp:attachment":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media?parent=2756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/categories?post=2756"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/tags?post=2756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}