{"id":662,"date":"2020-09-24T13:27:22","date_gmt":"2020-09-24T07:27:22","guid":{"rendered":"https:\/\/mellowhost.com\/blog\/?p=662"},"modified":"2020-09-24T13:32:19","modified_gmt":"2020-09-24T07:32:19","slug":"how-to-boot-centos-7-in-single-user-mode","status":"publish","type":"post","link":"https:\/\/mellowhost.com\/blog\/how-to-boot-centos-7-in-single-user-mode.html","title":{"rendered":"How to boot CentOS 7 in Single User Mode"},"content":{"rendered":"\n<p>Booting CentOS 7 in single user mode is total different than of CentOS 6 as it uses a different version of Grub. We will go step by step to boot into single user mode in CentOS 7. <\/p>\n\n\n\n<ol><li>First, boot the screen and press an arrow key while the timer comes on this screen to stop the timer<br><br><img loading=\"lazy\" width=\"720\" height=\"397\" class=\"wp-image-663\" style=\"width: 600px;\" src=\"https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/boot_screen.png\" alt=\"CentOS 7 Boot Screen\" srcset=\"https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/boot_screen.png 720w, https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/boot_screen-300x165.png 300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><br><br><\/li><li>Press &#8216;e&#8217; on the selected default CentOS version. That will take you to the following screen<br><br><img loading=\"lazy\" width=\"720\" height=\"402\" class=\"wp-image-664\" style=\"width: 600px;\" src=\"https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/boot_edit.png\" alt=\"CentOS 7 Boot Edit Screen\" srcset=\"https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/boot_edit.png 720w, https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/boot_edit-300x168.png 300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><br><br><\/li><li>These are grub commands that the bootloader is using to boot you to the system. Arrow down in this window to the line, that starts with linux16. Now take the right arrow on the keyboard to take your cursor to the word that says &#8216;ro&#8217; as shown in the image<br><br><img loading=\"lazy\" width=\"721\" height=\"404\" class=\"wp-image-665\" style=\"width: 600px;\" src=\"https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/linux16_centos7_boot_edit.png\" alt=\"Linux16 Command Boot\" srcset=\"https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/linux16_centos7_boot_edit.png 721w, https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/linux16_centos7_boot_edit-300x168.png 300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><br><br><\/li><li>Now replace ro with rw init=\/sysroot\/bin\/sh as shown below<br><br><img loading=\"lazy\" width=\"736\" height=\"414\" class=\"wp-image-666\" style=\"width: 600px;\" src=\"https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/centos7_boot_sysroot.png\" alt=\"CentOS 7 Boot Sysroot\" srcset=\"https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/centos7_boot_sysroot.png 736w, https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/centos7_boot_sysroot-300x169.png 300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><br><br><\/li><li>Now press Ctrl + x to start Single User Mode<br><br><img loading=\"lazy\" width=\"1033\" height=\"779\" class=\"wp-image-668\" style=\"width: 600px;\" src=\"https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/boot_single_user_mode.png\" alt=\"Boot in Single User Mode CentOS 7\" srcset=\"https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/boot_single_user_mode.png 1033w, https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/boot_single_user_mode-300x226.png 300w, https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/boot_single_user_mode-1024x772.png 1024w, https:\/\/mellowhost.com\/blog\/wp-content\/uploads\/sites\/3\/2020\/09\/boot_single_user_mode-768x579.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/li><\/ol>\n\n\n\n<p>You should be done now, you are on the single user mode console. If you would like to use the main system, you may chroot as the following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">chroot \/sysroot<\/pre>\n\n\n\n<p>Now, if you are trying to reset the root password, after booting into the single user mode, you may follow the following to reset the root password:<\/p>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-mellowhost-blog\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"6dQT72Q1mI\"><a href=\"https:\/\/mellowhost.com\/blog\/how-to-reset-root-password-in-centos-7.html\">How to reset root password in CentOS 7<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;How to reset root password in CentOS 7&#8221; &#8212; Mellowhost Blog\" src=\"https:\/\/mellowhost.com\/blog\/how-to-reset-root-password-in-centos-7.html\/embed#?secret=6dQT72Q1mI\" data-secret=\"6dQT72Q1mI\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Booting CentOS 7 in single user mode is total different than of CentOS 6 as it uses a different version of Grub. We will go step by step to boot into single user mode in CentOS 7. First, boot the screen and press an arrow key while the timer comes on this screen to stop &hellip; <a href=\"https:\/\/mellowhost.com\/blog\/how-to-boot-centos-7-in-single-user-mode.html\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to boot CentOS 7 in Single User Mode&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[295,12],"tags":[495,220,497,496],"_links":{"self":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/662"}],"collection":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/comments?post=662"}],"version-history":[{"count":2,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/662\/revisions"}],"predecessor-version":[{"id":672,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/662\/revisions\/672"}],"wp:attachment":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/media?parent=662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/categories?post=662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/tags?post=662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}