# GRUB2 Boot Single User

## splurben

I have tried all of the suggestions I can find; and gone over the entire Grub2 wiki.

All I want to know is what to do to start a Gentoo AMD64 GRUB2 system with INIT level 1 or "Single User"

It doesn't work to place a 1 at the end of the linux line in the boot edit configuration window and then press F10.

I'm totally at a loss and I must boot single user to fix a display problem.

----------

## khayyam

splurbin ...

I think what you were looking for is "init 1", I'm not sure I've used this with grub2, but AFAIK nothing has changed. If this fails you could always use 'init=/bin/sh', then once booted 'cntl-x' will get you a root shell, then exec /bin/bash. You would then need to mount /proc and /sys.

```
mount -t proc proc /proc ; mount -t sysfs sysfs /sys
```

Its been some time since I needed to do this and so things may have changed WRT /dev and /tmp .. so I can't say if these will be mounted or not.

Anyhow, 'init 1' should work ... and so the init=/bin/sh shouldn't be necessary.

HTH & best ...

khay

----------

## splurben

Thanks for your response but I can't get to the option of ALT-F1 or CTRL-X.

There should be a modification I can make to the GRUB2 configuration during the boot process to pass the INIT argument.

I can't get to the option of typing init 1 in a text console.

I need to know what to enter when editing the GRUB2 boot process to ensure linux will boot at run level 1.

In GRUB, during boot, one could edit a line in the boot sequence and add [b]single[/] at the end of the line and linux would boot into run level 1.

I need this functionality for GRUB2.

----------

## khayyam

splurbin ... your welcome.

So, when at the grub menu if you hit 'e' (edit) you are not able to edit the entry? ... 'e' should allow you to edit that entry, then 'e' to edit the line (in your case 'kernel') and add 'init 1' (or 'single') to the end, return/enter will get you out of edit, then hit 'b' to boot.

As I said, I've not had to do this for some time .. but as far as I'm aware nothing has changed ITR with grub2.

HTH ...

khay

----------

## Genone

 *splurben wrote:*   

> It doesn't work to place a 1 at the end of the linux line in the boot edit configuration window and then press F10.

 

Don't know where you got the F10 idea from, see http://www.gnu.org/software/grub/manual/grub.html#Menu-interface for editing grub2 entries.

----------

## Logicien

From /usr/src/linux/Documentation/kernel-parameters.txt:

```
...

S      [KNL] Run init in single mode

...
```

So you have to pass the S parameter to the kernel using Grub2.

----------

## khayyam

 *Logicien wrote:*   

> So you have to pass the S parameter to the kernel using Grub2.

 

Has the world gone crazy, what possible reason could there be for changing this, 'single' and 'init' (following 'telinit') have been in use since I started using linux in '95. While 'S' might shave a few bytes from the kernel, its hardly worth breaking with history for such a miniscule saving. Actually, there is a lesson in this, "Documentation" is there for a reason, and if you don't read it in its entirity for every release then you fail ... kinda like Battle Royale, but for geeks ... :P~

I'm going to assume that 'S' hasn't replaced 'single' or 'init 1', but that its now "the standard method" and that 'single' and 'init 1' still works as they once did, though no mention is made of them in the current documentation. This simply means they are in the process of being fazed out ... fair enough ... if not then ... ummm ... I can hear echo's of "you are the weakest link, goodbye".

best ... khay

----------

## Genone

 *khayyam wrote:*   

>  *Logicien wrote:*   So you have to pass the S parameter to the kernel using Grub2. 
> 
> Has the world gone crazy, what possible reason could there be for changing this, 'single' and 'init' (following 'telinit') have been in use since I started using linux in '95. While 'S' might shave a few bytes from the kernel, its hardly worth breaking with history for such a miniscule saving. Actually, there is a lesson in this, "Documentation" is there for a reason, and if you don't read it in its entirity for every release then you fail ... kinda like Battle Royale, but for geeks ... :P~

 

Nothing has changed at all, that documentation is mostly irrelevant here. The kernel simply passes any parameters it doesn't handle itself to init, and 'S' (or 's') denotes the single-user runlevel (see init(8) manpage), I assume it's just listed in the kernel docs for convenience. Note the manpage you quoted also just refers to 's' or 'S' for single-user runlevel.

The value 'single' is actually a parameter for the Gentoo init system (baselayout or OpenRC), which takes it from /proc/cmdline (which contains the full kernel commandline)

----------

## khayyam

 *Genone wrote:*   

> Nothing has changed at all, that documentation is mostly irrelevant here. [...]

 

OK ... thanks for the clarification. I did test it subsequently and wasn't suprised when 'single' worked as expected. I probably overreacted, thinking that the "change" was some similarly guided "development" to the udev, seperate /usr, initrd, debacle.

best ... khay

----------

