How to boot into test-only mode or emergency shell
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2016
    Location
    Iraq
    Posts
    1,109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to boot into text-only mode or emergency shell

    A) Temporal booting to text mode:

    This is very helpful when system fail to boot to GUI. In the later case, you can boot to emergency shell as following:

    1) use arrows, at onset of boot screen, to select your kernel,

    2) press “e” to edit your kernel parameters,

    3) find kernel line that started by “linux” & contains “vmlinuz”, & change the following part:

    Code:
    ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rbgd quit LANG=en_US.UTF-8

    by adding to it '1' (if you like to boot to emergency shell) or '3' (if you like to boot to text-only mode) - see Notes bellow - to become, for example, as following:

    Code:
    ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rbgd quit 3 LANG=en_US.UTF-8

    The rhgb and quiet parameters can be removed in order to enable system messages.

    4) press Ctrl then (while still pressing Ctrl) click on “X”. Now you will enter to tty terminal, in above example, when will prompt you for login credentials ….. .

    Notes:

    rbgd: mean to boot up using the standard boot splash screen.

    quit: mean print no boot messages.

    text: mean use text mode.

    1: mean boot to single user mode (also, called boot single, rescue shell, or emergency shell). [you will get, a root shell from which you don’t have to log in. This shell is a single process environment which doesn't run init scripts. The root shell will let you do anything with root powers you need to on the system to repair it if you can. You would need to know what you have to do of course, and what commands you need to accomplish it.]
    Single user mode can be useful for checking and repairing operating systems. For example, it is used for:
    - running fsck (which is used to check and repair filesystems) on a /usr partition because this requires that the partition be unmounted (i.e., not logically attached to the system),
    - reset root password if you have lost it,
    - fix “failed to mount /etc/fstab” error – just to mention the most critical of them,
    - & particularly those that have been damaged and will not allow booting (i.e., starting up) into the default GUI (graphical user interface) or console (i.e., text-only) multi-user mode.

    3: mean boot to text-only mode. [you will be asked to enter a user & it’s password. You can even select root user.]

    5: mean boot to GUI mode (usually the default mode, when no need to type '5' in the already mentioned above kernel line) [you will be asked to select a user & to enter it’s password. You can’t select root user]

    N.B: The changes we made to the kernel parameters only affect the current boot, they do not persist.

    N.B: The 'c' command, at boot screen, is a basic shell for interacting with grub, it is of no use in our situation.
    ------------------------------------

    B) Persistent booting to text mode (set text mode as a default runlevel – target in systemd terminology):

    Open terminal & type:

    Code:
    # systemctl set-default multi-user.target
    After this command, your system will boot, by default, every time, automatically to text mode.

    Very dangerous (only for advanced users):you can set emergency shell as default booting mode by:
    sudo systemctl set-default single-user.target

    To reset back to the default (graphical) login, type in terminal:

    Code:
    # systemctl set-default graphical.target
    Now, you system will boot, by default, every time, automatically to GUI mode.
    ----------------------------

    Additional Notes:

    1) To switch from GUI to text mode after you are already boot to GUI:

    Code:
    sudo systemctl isolate multi-user.target

    To switch back from text mode to GUI:

    Code:
    sudo systemctl isolate graphical.target

    2) to start GUI session while you are within a shell, run:

    Code:
    startx
    but this will be very dangerous if you use it with root powers. If there is a need to use this command, it is very recommended to run it without root powers.
    Last edited by User808; 8th May 2018 at 01:24 PM.
    Fedora 30 X64 bit Cinnamon edition on Lenovo ThinkPad e550 with Intel core i7 5500 CPU @ 2.40 GH X 2, RAM = 8 GB, HHD = 1 TB, Hybrid VGA (Intel Corporation HD Graphic 5500 + Radeon R7 M265 2GB)

  2. #2
    Join Date
    Sep 2019
    Location
    New York
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to boot into text-only mode or emergency shell

    Quote Originally Posted by User808
    Code:
    ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rbgd quit LANG=en_US.UTF-8
    Code:
    ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rbgd quit 3 LANG=en_US.UTF-8
    The rhgb and quiet parameters can be removed in order to enable system messages.
    The code blocks are wrong here, while the explanation is correct. Those parameters are
    Code:
    rhgb
    and
    Code:
    quiet

Similar Threads

  1. Boot goes to emergency mode due to....
    By Gh0zt36 in forum Installation, Upgrades and Live Media
    Replies: 33
    Last Post: 3rd May 2017, 10:03 PM
  2. Replies: 2
    Last Post: 12th June 2016, 03:50 PM
  3. [SOLVED]
    emergency mode error during boot
    By amitsark in forum Hardware & Laptops
    Replies: 5
    Last Post: 31st May 2015, 03:43 AM
  4. How do you really boot into emergency mode?
    By Red Path Walker in forum Using Fedora
    Replies: 2
    Last Post: 27th April 2015, 11:41 PM
  5. Getting dropped to emergency mode at boot
    By tokyojoe in forum Using Fedora
    Replies: 3
    Last Post: 1st March 2013, 11:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •