Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't enter Single User Mode from GRUB
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
mdiamond
n00b
n00b


Joined: 09 Dec 2004
Posts: 7

PostPosted: Thu Dec 09, 2004 6:34 am    Post subject: Can't enter Single User Mode from GRUB Reply with quote

Hey there. Just installed Gentoo 2004.3. Used genkernel because I'm a NOOB and because it's a VMware VM under ESX 2.1.2.

I can boot fine and have a happy system. But for whatever reason, I want to go into Single User Mode (S.U.M.), and I have GRUB as a bootloader. Here's my GRUB config:

Code:

# Which listing to boot as default
default 0

# How many seconds to wait for boot selection
timeout 5

title=Gentoo Linux 2.4.26-r9

# Where is the kernel image?
root (hd0,0)
kernel /kernel-2.4.26-gentoo-r9 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3 doscsi
initrd /initrd-2.4.26-gentoo-r9


When I want to enter S.U.M. , I hit 'e' at the GRUB menu, then I've tried adding the word 'single' in the following locations:


  • On the kernel line, at the end of the line
  • On the kernel line, right after '/kernel-2.4.26-gentoo-r9'
  • On the initrd line, at the end of the line


In all three instances, I do not end up in S.U.M. - I get INIT 3 and end up at a login prompt.

Any ideas? Thanks in advance for your help...
Back to top
View user's profile Send private message
chardros
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2002
Posts: 136
Location: Andromeda

PostPosted: Thu Dec 09, 2004 6:53 am    Post subject: Reply with quote

Putting the word single on the kernel line should work. You can also try init=/bin/sh. Though, that may not work with the ramdisk image, etc.
Back to top
View user's profile Send private message
mdiamond
n00b
n00b


Joined: 09 Dec 2004
Posts: 7

PostPosted: Thu Dec 09, 2004 4:09 pm    Post subject: Reply with quote

I think it should work too. :?

I changed the init=/linuxrc to init=/bin/sh like you suggested, and also had the word 'single' at the end of the line. It craps out with:

Code:

/bin/sh: Can't open doscsi
Kernel panic: Attempted to kill init!


So I think you're right about it not working with the ramdisk image.
Back to top
View user's profile Send private message
mdiamond
n00b
n00b


Joined: 09 Dec 2004
Posts: 7

PostPosted: Fri Dec 10, 2004 4:02 am    Post subject: Reply with quote

I was originally thinking that this might be a GRUB issue, but then I started thinking that it might be a ReiserFS issue. Yes, I'm using ReiserFS. No, I don't have any good reason to.

So I decided to take Grub out of the picture first (aka switch to LILO). I have done this, and at the LILO menu I type "gentoo single".

I still end up in INIT 3.

So this is not a GRUB issue. I think I am going to reinstall using ext3 instead of ReiserFS and try GRUB again.
Back to top
View user's profile Send private message
mdiamond
n00b
n00b


Joined: 09 Dec 2004
Posts: 7

PostPosted: Fri Dec 10, 2004 10:00 pm    Post subject: Reply with quote

Man alive. It wasn't a ReiserFS issue either. I reinstalled using ext3 and still have the same problem.

Any other ideas? Thanks so far BTW.
Back to top
View user's profile Send private message
mdiamond
n00b
n00b


Joined: 09 Dec 2004
Posts: 7

PostPosted: Sat Dec 11, 2004 2:52 pm    Post subject: Reply with quote

Compiling a custom kernel and changing the boot loader as described in the handbook for a custom kernel seemed to fix my issue.

Could there be a bug in the genkernel kernel (or a feature ;) that prevents Single User Mode from working? I mean, even after booting and logging in, typing "init 1" brought me right back into init 3!

Can anyone else confirm this behaviour on a genkernel install?
Back to top
View user's profile Send private message
koti
n00b
n00b


Joined: 19 Dec 2004
Posts: 2

PostPosted: Sun Dec 19, 2004 8:31 am    Post subject: Reply with quote

Adding 'real_init=single' on the kernel line in case of genkernel kernel.
Back to top
View user's profile Send private message
mdiamond
n00b
n00b


Joined: 09 Dec 2004
Posts: 7

PostPosted: Sun Dec 19, 2004 5:37 pm    Post subject: Reply with quote

Quote:
Adding 'real_init=single' on the kernel line in case of genkernel kernel.


This worked koti - thankyou so much. I was investigating the possibility that my issue was related to using an initrd - and your solution seems to support that. (ie: "real_init" seems like a similar parameter to "real_root", which is used for initrd images).

Curiosity: is that assessment correct? And how do you know of this "real_init" parameter - is it documented somewhere?

Thanks again.
Back to top
View user's profile Send private message
koti
n00b
n00b


Joined: 19 Dec 2004
Posts: 2

PostPosted: Mon Dec 20, 2004 3:06 am    Post subject: Reply with quote

Quote:

This worked koti - thankyou so much. I was investigating the possibility that my issue was related to using an initrd - and your solution seems to support that. (ie: "real_init" seems like a similar parameter to "real_root", which is used for initrd images).

Curiosity: is that assessment correct? And how do you know of this "real_init" parameter - is it documented somewhere?


These parameters are used by linuxrc script on the initrd image. The linuxrc script is specified in kernel parameter 'init=/linuxrc'.
See 'man genkernel' and /usr/share/genkernel/generic/linuxrc file.

Please forgive my poor English.
Back to top
View user's profile Send private message
mdiamond
n00b
n00b


Joined: 09 Dec 2004
Posts: 7

PostPosted: Mon Dec 20, 2004 2:58 pm    Post subject: Reply with quote

koti wrote:
These parameters are used by linuxrc script on the initrd image. The linuxrc script is specified in kernel parameter 'init=/linuxrc'.
See 'man genkernel' and /usr/share/genkernel/generic/linuxrc file.


Nice. I'm not sure why I didn't clue in with the 'init=/linuxrc' (ie: to actually look at that file). It definitely seems obvious now that you've pointed it out. I don't seem to have a manual page for genkernel, which could be why I couldn't find any documentation.

koti wrote:
Please forgive my poor English.


You must have left your poor English in another post, because you certainly didn't use it here. Thanks for your help, I really appreciate it. Have a Happy Holidays, if you celebrate...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum