FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 06-15-2008, 02:58 PM
Peter Wood
 
Default How to boot into single user mode

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
--
gentoo-user@lists.gentoo.org mailing list
 
Old 06-15-2008, 03:20 PM
 
Default How to boot into single user mode

,--- 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.

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


HTH
--
Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/
·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
 
Old 06-15-2008, 04:19 PM
Matt Harrison
 
Default How to boot into single user mode

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
 
Old 06-15-2008, 06:43 PM
Peter Wood
 
Default How to boot into single user mode

Matt Harrison wrote:

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

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

--
gentoo-user@lists.gentoo.org mailing list
 
Old 06-15-2008, 07:37 PM
Peter Wood
 
Default How to boot into single user mode

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

--
gentoo-user@lists.gentoo.org mailing list
 
Old 06-16-2008, 05:51 AM
Dirk Heinrichs
 
Default How to boot into single user mode

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.heinrichs@capgemini.com
Wanheimerstrae 68 | Web: http://www.capgemini.com
D-40468 Dsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
 

Thread Tools




All times are GMT. The time now is 09:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org