LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   INIT: Single user mode on startup (https://www.linuxquestions.org/questions/linux-software-2/init-single-user-mode-on-startup-62877/)

ukch 05-31-2003 11:37 AM

INIT: Single user mode on startup
 
Does anyone have any idea how to get init to start off in single user mode?

I tried changing the 'default runlevel' (init config file - forgotten the filename) to S, and it seemed to work, but then I couldn't get normal startup if I wanted. Any ideas?

david_ross 05-31-2003 11:44 AM

The best way is to create a secont bootloader entry with "single" or "1" appended to your kernel arguments.

This way you can choose on boot.

Note that doing this is a bit of a security risk and stops the bootloader password from being any use.

ukch 05-31-2003 11:55 AM

So I would just add 'single' to lilo.conf and it'll change it?

Or do I need to do more?

david_ross 05-31-2003 12:04 PM

yes to the kernel arguments

core 05-31-2003 02:01 PM

Quote:

Originally posted by ukch
So I would just add 'single' to lilo.conf and it'll change it?

Or do I need to do more?

No!

you need more

f.e. this is a part of my lilo.conf
## Normal linux startup with X
image=/boot/vmlinuz
label="linux"
root=/dev/hdb5
initrd=/boot/initrd.img
append="devfs=mount hdd=ide-scsi acpi=off"
read-only

## entering single user mode
image=/boot/vmlinuz
label="linux_1"
root=/dev/hdb5
initrd=/boot/initrd.img
append="devfs=mount hdd=ide-scsi acpi=off 1"
read-only


note the only real difference is the 1 in the append line .. this selects the runlevel

greetings


All times are GMT -5. The time now is 05:19 PM.