Welcome to the Linux Foundation Forum!

Issue booting in single user mode

I've tried two methods to get into single user mode: rd.break and rw init=/sysroot/bin/sh. Both leave me with a flashing cursor only after pressing ctrl-x. I'm new to linux so I'm sure I missed something.

Lab 4.1
CentOS 8

Answers

  • lee42x
    lee42x Posts: 360
    edited October 2021

    Hi, I verified the documentation and all seems to work, however, lets see if we can sort the issue.

    • when changing the "init" program try adding only ** init=/bin/bash** to the command line.
    • when adding rd.break to the kernel line there is not a lot of commands but echo,cat and sed should be available along with journalctl .
    • Please select a "distribution" kernel not a locally compiled one, here is an example that I used:
      CentOS Linux (4.18.0-147.5.1.el8_1.x86_64) 8 (Core)

    Regards Lee

  • I personally find lab instructions of not much use as those are high level only. For this If you are running CentOs 8 then just add rd.break at the end of the statement which is starting from linux keyword and hit Ctrl+X this should work.

  • k0dard
    k0dard Posts: 93

    I've stumbled upon this question some time ago and noticed that I cannot boot my VMs used for this course into single user mode either. Whatever parameter I add I finish with a blinking cursor. After some trial and error, I discovered the problem was in another kernel boot parameter I've added (console=ttyS0) in order to be able to access my VMs through CLI (virsh)
    Hope this will be helpful for someone maybe :smile:

  • coop
    coop Posts: 866

    Unfortunately, it seems that the methods to get into single user mode (or to get to a VT as well) depend a lot of the choice of hypervisor (KVM, VirtualBox, VMware etc) and the choice of distribution and its version and the kernel options as well. It used to be there was a simple prescription that always worked, but now it is often a voyage of discovery to sort this out. Glad you found the solution for you. Since ttys0 sounds like a serial port, I find it surprising, but so it goes!

  • k0dard
    k0dard Posts: 93

    Yes, indeed, but every challenge is a chance to learn something new :smile:
    I think now that my first post was a bit confusing - what I wanted to say is that at some point I've added the parameter console=ttyS0which is a serial port, and I did it to be able to access my VM through CLI. Without it virsh is giving the blank screen with blinking cursor, but with it single boot mode from virt-manager isn't possible (for me at least) since I guess the output gets redirected to serial port... So, in the end in order to boot to single user mode from virt-manager console parameter has to be removed.
    If my presumptions are incorrect and anyone has an explanation I'd be grateful to here it

Categories

Upcoming Training