Linux reboot single mode

Boot Linux Grub Into Single User Mode

Q . How do I boot a Linux system into single user mode?

A . Single user mode is useful to fix some system problem. Following are steps you need to use to boot Grub boot loader into single user mode.

Procedure: Boot Linux Grub Boot Loader into single user mode

(1) At grub boot screen (after restart)

(2) Select the kernel

(3) Press the e key to edit the entry

(4) Select second line (the line starting with the word kernel)

(5) Press the e key to edit kernel entry so that you can append single user mode

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

(6) Append the letter S (or word Single) to the end of the (kernel) line

(7) Press ENTER key

(8) Now press the b key to boot the Linux kernel into single user mode

(9) When prompted give root password and you be allowed to login into single user mode.

See also:

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Category List of Unix and Linux commands
Documentation help • mandb • man • pinfo
Disk space analyzers df • duf • ncdu • pydf
File Management cat • cp • less • mkdir • more • tree
Firewall Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04
Linux Desktop Apps Skype • Spotify • VLC 3
Modern utilities bat • exa
Network Utilities NetHogs • dig • host • ip • nmap
OpenVPN CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04
Package Manager apk • apt
Processes Management bg • chroot • cron • disown • fg • glances • gtop • jobs • killall • kill • pidof • pstree • pwdx • time • vtop
Searching ag • grep • whereis • which
Shell builtins compgen • echo • printf
Text processing cut • rev
User Information groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w
WireGuard VPN Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04

Comments on this entry are closed.

am using red hat 9.
user should not be allowed to change root password in single user mode,as it’s in SUSE.
i have already tried grub password.
i want some other method.
pls help me out.

i have tried the possible causes regarding the problem that i have encountered…..the username and passowrd has expired has been prompt when i logged in into my redhat ubuntu. can you please help me out.

Hi folks,
Thank you so so much for all these informations, I really needed them badly.
Tahnks again
ENJOY

Hi,
I have a red hat entreprise 5. A technician change the motherboard of computer. When I restart, the computer does not find the etho eth1 and I decide to pass by single user mode. But when i make step 5, i don’t have the good line and I can’t modify the line. How must i make ? does this problem come from other hardware probleme?

Hi friends
Thank you for you help.
This is my problem:
I can follow this instructions up to step 5
After that I am stuck. for example:
The inf guide on this screen is different from my screen
my GNU grub version is 0.97 (640k lower/1037859k upper memory
When it comes to edit the kernel and add the letter ‘S’, I dont have that option, so I dont know what else to do. Plese tell me what is the next step. I have not use that computer in months , because of this problem. Thank you

With GRUB, using the keywork “Single” does not work, it has to be lowercase : “single”.

Using only “S” also works.

Using “1” also works

Thank You very very much. I really needed badly. Thanks.

Hi ,
I have a computer in the company and we are four use this computer with four accounts.
I have the root password .. By using Single User Mode the others are able to change the root password …!!
It’s a big problem … I need away to prevent the Single User Mode …

How to make bootable usb drive

Hi, i REALLY need help! I have a dell mini linux/ubuntu 8.04 version laptop with only one account which i forgot the password to. I was working on my setup options trying to get a new password and changed the system and HDD passwords. When i said ok my computer wouldnt boot and it prompted me for the passwords i enter in for the HDD/system ones. Now im stuck in grub mode and just wanna get back to my normal set up. Im sooooo confused. Help would be GREATLY appreciated thankyou! (btw: im getting a message saying kernal must be booted before i can boot my computer. How could i go about booting kernel?) thankyou!

you can set grub password and the password for the cmos. make sure the chasis is locked.

hey when i restart the system then it stop to the following line..then i can’t cross over the step…

GNU Grub version 0.97

[Minimal BASH-like line editing is supported. For the first word, tab lists possible command completiions. Anywhere else TAB lists the possible completions of a device/filename]

plz how to cross over from here…..hope u all suggest me..

i have followed the whole procedure but i don’t know what to do when i get the place asking for root password or an option of Ctrl-D to continue.
how do i bypass this since i dont remember my root password?
pls help!

This is useful information can anyone send me this type of information in details

MUST BE “S” or “single”. Screenshot above of “Single” is wrong.

I have also stuck exactly where Baariu Martin is.. Kindly help with more info.. Thanks 🙂

Put ‘single’ in lowercase for this to work.

I have ubuntu 8.04 and it is not allowing me to enter the single user mode. I have used the option e for the same and entered single at the end of the line but it does not work please let me know what should i do and what option should i use.

There are two hard disk create 1+0 raid and OS has been failed . how to retrieve data in the hard disk . OS is in separate partition and data in separate partition. Pls help it out

Thanks for Info 😀

I am working on Solaris 10 , somehow the project file in /etc directory got edited or deleted now i am not able to login to the servers.
Can anyone suggest the solution..for this ..ASAP

Apply power.
When prompted hit any key in 3 seconds, this brings up GRUB
Type ‘a’ to get to append mode (modify kernel arguments), then type:
1
boot 1

You will come up to single user prompt #

I am in real trouble when I reboot I don’t see a grup prompt to get into the single user mode. All that I see is some options such as F2 for setup and several other F options. I tried entering into each of these but never got anything that will let me enter single user mode. I am completely lost. Sorry for these novice rants. I am using RH 6.2 enterprise version. Any help will be greatly appreciated.

Thanks to help me
i did Successfully

i have encounterd a problem regarding my centOS .95
file system has been currepted plz help me to come out..

Regards
Amit shukla

how to edit “/etc/default/grub” from grub menu from commandline (c) . as “sudo nano /etc/default/grub.” does not work. there

This will help you.

]# chage -l
Usage: chage [options] [LOGIN]

Options:
-d, –lastday LAST_DAY set date of last password change to LAST_DAY
-E, –expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE
-h, –help display this help message and exit
-I, –inactive INACTIVE set password inactive after expiration
to INACTIVE
-l, –list show account aging information
-m, –mindays MIN_DAYS set minimum number of days before password
change to MIN_DAYS
-M, –maxdays MAX_DAYS set maximim number of days before password
change to MAX_DAYS
-W, –warndays WARN_DAYS set expiration warning days to WARN_DAYS

]# chage -l root
Last password change : Aug 09, 2013
Password expires : Nov 07, 2013
Password inactive : never
Account expires : never
Minimum number of days between password change : 1
Maximum number of days between password change : 90
Number of days of warning before password expires : 7
[root@oc15082013

thanks guys for the help, it worked …
I was able to boot my system after it was stuck at grub>

change “Single” in kernel row ro to rw and add init=/bin/bash then press F10, then you will have root command line

Thanks Alex, your solution worked for my requirements…thank you very much

i’m using centos 5.5 and forgotten root password.
but to reset password using single user mode i don’t see ‘e’ or ‘a’ option in grub menu.
It only shows ‘p’ for password. can any1 help me out of this so that i can see ‘e’ option to edit ………..

Hi,
Am not able to login in single user mode centos 6.0, it’s asking to enter root password or control -D, to continue, if I give password it’s not accepting…..can any one help me to come out firm this……olz

Источник

6 шагов загрузки Linux на пальцах

Нажмите кнопку включения питания на вашем системнике, и спустя несколько секунд вы увидите окно входа в систему.

Посмею предположить, что каждого интересовало хоть когда-либо то, что происходит за занавесом заставок и загрузочных экранов с момента включения питания компьютера к моменту, когда предлагается войти в систему.

Я предлагаю вам познакомиться со следующими уровнями типичной загрузки Linux:

1. BIOS

2. MBR

3. GRUB

#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-194.el5PAE)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-194.el5PAE ro root=LABEL=/
initrd /boot/initrd-2.6.18-194.el5PAE.img

4. Ядро или Kernel

5. Init

6. Уровень выполнения программ (Runlevel)

  • Когда Линукс выполняет свою загрузку, вы можете наблюдать загрузку различных служб. К примеру, это могут быть сообщения типа «starting Postfix … OK» (запускается Postfix). Эти службы — и называются программами уровня выполнения, выполняемые из директории, которая соответствует нужному уровню выполнения.
  • Исходя из настроек по умолчанию, система будет выполнять файлы в соответствии с нижеприведенными директориями.
    • Выполнение уровня 0 – /etc/rc.d/rc0.d/
    • Выполнение уровня 1 – /etc/rc.d/rc1.d/
    • Выполнение уровня 2 – /etc/rc.d/rc2.d/
    • Выполнение уровня 3 – /etc/rc.d/rc3.d/
    • Выполнение уровня 4 – /etc/rc.d/rc4.d/
    • Выполнение уровня 5 – /etc/rc.d/rc5.d/
    • Выполнение уровня 6 – /etc/rc.d/rc6.d/
  • Но имейте ввиду, что еще в каталоге /etc могут быть символические ссылки. Например, /etc/rc0.d залинкован на /etc/rc.d/rc0.d.
  • В каталогах /etc/rc.d/rc*.d/ вы можете увидеть список программ, имя которых начинается из букв S и K.
  • Программы, начинающиеся на S используются для запуска. S, потому что startup.
  • Программы, которые начинаются с литеры K используются — правильно — для завершения работы. K, потому что kill.
  • Еще есть номера рядом с буквами S и K в именах программ. Эти номера используются для определения порядка запуска этих программ.
  • К примеру, S12syslog предназначен для запуска демона syslog, его порядковый номер 12. S80sendmail — для запуска демона sendmail, имеющего порядковый номер 80. Таким образом, программа syslog будет запущена перед sendmail.

Вот и все. Возможно, некоторым из вас это не ново и особого интереса не было при чтении статью, поскольку она более ориентирована на начально-средний уровень знакомства з Линуксом.
В таком случае могу лишь сказать, что «повторение — мать учения» (с).

Дополнения, исправления, уточнения

В комментариях неоднократно было апеллировано к тексту статьи, поэтому, думаю, стоит учесть некоторые важные комментарии хабрасообщества. (спасибо artemlight, 3al, Tishka17, HhyperH, Next_Alex, Ilya_Shmelykh, Aux, soomrack, Xpeh )

  • artemlight:: «Ну скажем прямо — так грузятся далеко не все дистры». С ним согласилось большинство, отмечая и bsd-style init, u-boot, и хоть initrd в статье пропущен, стоить заметить, что он нужен ядру не во всех дистрибутивах. Также отмечено, что в slackware поддержка rc.d осуществляется только в качестве совместимости, а встраиваемые системы грузятся иначе. На декстопах иногда бывает EFI, а кроме того Linux популярен в мире embedded и там ещё куча разных платформ. Линукс в телефоне вообще иначе грузится.
  • soomrack, ссылая на википедию: Еще хочется сделать замечание по поводу MBR, первого сектора и пр. Все несколько усложнилось за последние годы. Сейчас уместней говорить о EFI.

Источник

Читайте также:  Ricoh sp 150 driver windows 10
Оцените статью