Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] How to boot into single user mode

268 views
Skip to first unread message

Peter Wood

unread,
Jun 15, 2008, 11:00:09 AM6/15/08
to
Hi all,
I have a kernel generated with genkernel and do need the initramfs
because I am using lvm and luks. Now I am trying to create a second
entry in grub.conf that lets me boot into single user mode in an emergency.
Of course, adding 1 or single on the kernel line does not work together
with an initrd.
I followed the advise in the gentoo wiki on booting into single user
mode and added:
real_init 1
to the kernel line in grub.conf.
This however lets my kernel panic on boot.
Error: switch_root Bad init '1'
Attempt to kill init. Kernel Panic
I tried sustituting real_init 1 with real_init single and real_init S1,
but get the same result.
Does anyone now what I am doing wrong?
Peter
--
gento...@lists.gentoo.org mailing list

Ashish Shukla आशीष शुक्ल

unread,
Jun 15, 2008, 11:30:11 AM6/15/08
to

How about adding 'init=/bin/bb' to kernel line.

| Peter
| --
| gento...@lists.gentoo.org mailing list


HTH
--
Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/
·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --

Matt Harrison

unread,
Jun 15, 2008, 12:30:20 PM6/15/08
to
On Sun, Jun 15, 2008 at 08:50:58PM +0530, Ashish Shukla ???????????? ??????????????? wrote:
> ,--- Peter Wood writes:
> | Hi all,
> | I have a kernel generated with genkernel and do need the initramfs
> | because I am using lvm and luks. Now I am trying to create a second
> | entry in grub.conf that lets me boot into single user mode in an
> | emergency.
> | Of course, adding 1 or single on the kernel line does not work
> | together with an initrd.
> | I followed the advise in the gentoo wiki on booting into single user
> | mode and added:
> | real_init 1
> | to the kernel line in grub.conf.
> | This however lets my kernel panic on boot.
> | Error: switch_root Bad init '1'
> | Attempt to kill init. Kernel Panic
> | I tried sustituting real_init 1 with real_init single and real_init
> | S1, but get the same result.
> | Does anyone now what I am doing wrong?
>
> How about adding 'init=/bin/bb' to kernel line.
>

I find that softlevel=single works for me

Peter Wood

unread,
Jun 15, 2008, 2:50:13 PM6/15/08
to
> Hi,
>
> Thanks for both replies.
>
> The thing that bugs me about the softlevel option is that the computer
> apparently enters into the default runlevel first before switching to
> single. If I do not want to have any of the services running, why would
> I have to start and stop them all (which might take quite a bit of time
> considering a computer that is set up for networking via dhcp, but
> booting up in an environment where there is no network connection.
>
> Is the real_init option on the kernel line no longer working?
>
> I guess I'll go with the busybox solution.
>
> Best,

Peter Wood

unread,
Jun 15, 2008, 3:40:08 PM6/15/08
to

Matt Harrison wrote:


> On Sun, Jun 15, 2008 at 02:43:42PM -0400, Peter Wood wrote:
>
>>> Hi,
>>>
>>> Thanks for both replies.
>>>
>>> The thing that bugs me about the softlevel option is that the computer
>>> apparently enters into the default runlevel first before switching to
>>> single. If I do not want to have any of the services running, why would
>>> I have to start and stop them all (which might take quite a bit of time
>>> considering a computer that is set up for networking via dhcp, but
>>> booting up in an environment where there is no network connection.
>>>
>>> Is the real_init option on the kernel line no longer working?
>>>
>>> I guess I'll go with the busybox solution.
>>>
>>>
>

> Of course I forgot it goes runlevel 3 -> runlevel 1. It serves my purposes but maybe not yours.
> Let me know if the bb solution works, i'm interested :)
>
> best of luck
>
> Matt Harrison
>
Ok, I tried the init=/bin/bb solution. It didn't work. Which is probably
related to the fact that I am using an initramfs. If I use
real_init=/bin/bb, things work howvever. Provided you remount your root
filesystem with read/write enabled, this gives you the option to do any
maintenance work and then reboot.
I guess, if real_init + runlevel ever worked, it does not do any more.
real_init takes a command as an argument, not the name of a runlevel.
Best,
Peter

--
Peter Wood
Ph. D. Candidate
Germanic & Slavic Studies
University of Waterloo
Canada

--
gento...@lists.gentoo.org mailing list

Dirk Heinrichs

unread,
Jun 16, 2008, 2:00:10 AM6/16/08
to
Am Sonntag, 15. Juni 2008 schrieb ext Peter Wood:
> If I use
> real_init=/bin/bb, things work howvever.

Although you're all alone on that machine then it's _not_ single user mode.

Bye...

Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.he...@capgemini.com
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net

signature.asc
0 new messages