LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices



Reply
 
Search this Thread
Old 08-06-2010, 04:46 PM   #1
pr_deltoid
Member
 
Registered: Jun 2010
Distribution: Fedora
Posts: 289

Rep: Reputation: 41
Angry Ubuntu - single user mode. How can it be done, without rebooting the computer?


Using Slackware, when updating, it's recommended to use:
Code:
telinit 1
to get into single user mode and use the updating instructions.
Code:
telinit 3
to return.

Using FreeBSD, you just run:
Code:
shutdown now
to get into single user mode.
Code:
return
to return.

How, using Ubuntu, can you possibly enter single user mode and return from it without rebooting and booting into single user mode!? It won't work. I tried "sudo telinit 1" and it doesn't work. I tried "sudo /etc/init.d/gdm stop" to then try it, and that doesn't work. I tried "Ctrl + Alt + F1" to go to the tty and try "sudo telinit 1" and that doesn't work.
How do you switch to single user mode when using Ubuntu and then switch back to normal without rebooting the computer!?
 
Old 08-06-2010, 05:03 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Rep: Reputation: 182Reputation: 182
It looks like Ubuntu has decided that that option isn't allowed. From my cursory googling of the situation, Canonical has replaced the sysvinit process with upstart, and configured it in such a way as to make booting with a kernel switch the only way to enter single user mode. I don't think "init 1" will work any better than "telinit 1" but I guess you could try.
 
Old 08-06-2010, 05:12 PM   #3
pr_deltoid
Member
 
Registered: Jun 2010
Distribution: Fedora
Posts: 289

Original Poster
Rep: Reputation: 41
I read they use Upstart, but I couldn't find anything saying that it wouldn't allow a switch to single user.
I tried init 1, also. I forgot to mention it.
 
Old 08-06-2010, 05:27 PM   #4
pr_deltoid
Member
 
Registered: Jun 2010
Distribution: Fedora
Posts: 289

Original Poster
Rep: Reputation: 41
Okay, how can you reboot the system without rebooting the computer, physically? I don't like rebooting the computer all the time, physically. I think you'd call it a soft reboot.
Here's my problem:
I know that booting the computer is the hardest thing on it, not leaving it on. I've read about it being like a light bulb, how they always burn out when you hit the switch to turn them on. It's harder on them to start up than stay on all the time. I don't want to reboot physically all the time, and I want to leave the computer on all the time unless I have to reboot for a new kernel. How can I do it? Ctrl-Alt-Delete and choosing "restart" from the shutdown menu in Gnome both do a physical reboot, correct? I want to do what I think is called a soft reboot, but I've seen people call Ctrl-Alt-Delete a soft reboot, and I'm 99% sure that's not what I want.
I want to reboot/restart everything without putting the physical strain on the computer of physically shutting it down and starting it up again all the time.

Last edited by pr_deltoid; 08-06-2010 at 05:34 PM.
 
Old 08-06-2010, 05:59 PM   #5
pr_deltoid
Member
 
Registered: Jun 2010
Distribution: Fedora
Posts: 289

Original Poster
Rep: Reputation: 41
Never mind, I've googled some more. I don't want a soft reboot, I want to reboot or restart everything without physically rebooting the computer. How can I do this without switching to single user mode and back again?
 
Old 08-06-2010, 07:13 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,488

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
You're looking for kexec. It requires activation in the (running) kernel, which it looks like Ubuntu do. It works by pre-loading another (can be the same) kernel into reserved kernel memory, then directly booting that without the hardware reset. You'll need to get the userland kexec-tools.
 
Old 08-07-2010, 07:32 PM   #7
pr_deltoid
Member
 
Registered: Jun 2010
Distribution: Fedora
Posts: 289

Original Poster
Rep: Reputation: 41
Good to know. My only problem is this:
I don't really mind rebooting the computer for a kernel upgrade, but rebooting for any other reason is what I'm really thinking of. I would like to avoid rebooting for ordinary updates, or in any other circumstances, but rebooting for a kernel upgrade I'm not really worried about all that much. I don't need to completely rid myself of reboots, I just want to minimize them.
I know that doing this by switching into single user mode and back again works well and is very, very easy for Slackware and FreeBSD, EDIT: (and probably most other Linux distributions, as far as I know), but apparently Ubuntu is just not going to let me do this.

Last edited by pr_deltoid; 08-07-2010 at 07:36 PM.
 
Old 08-07-2010, 07:37 PM   #8
wagscat123
Member
 
Registered: Jan 2009
Location: Westminster, Maryland USA
Distribution: openSUSE 13.1, 13.2 and Linux Mint 17
Posts: 210
Blog Entries: 7

Rep: Reputation: 21
Try putting in init S, because runlevel S is single-user also.
 
Old 08-07-2010, 08:51 PM   #9
pr_deltoid
Member
 
Registered: Jun 2010
Distribution: Fedora
Posts: 289

Original Poster
Rep: Reputation: 41
http://manpages.ubuntu.com/manpages/...telinit.8.html
Quote:
RUNLEVEL may also be S or s which will place the system directly into
single-user mode without actually stopping processes first, you
probably won’t want that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
single user mode under vxfs mode enabled. UltraSoul Solaris / OpenSolaris 1 06-27-2009 10:48 PM
Rebooting into single user mode with a virtual box desertfox858 Linux - Newbie 2 03-07-2009 03:42 PM
how do i get into single user mode please wrighty2008 Linux - Newbie 5 01-06-2009 10:58 AM
Single User mode isolvesystems Linux - Newbie 5 10-03-2007 09:05 PM
single user mode ? wr3ck3d Slackware 5 03-29-2003 10:52 AM


All times are GMT -5. The time now is 10:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration