1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
|
upstart
=======
Upstart is a replacement for the traditional sysvinit package, and
runs as process #1. Through upstart, we are able to have an
event-driven process, whilst at the same time retaining compatibility
for the original sysvinit behaviour.
This file documents how to do a few common operations with the new
system.
Where are initscripts installed?
--------------------------------
This has not changed, they are installed in /etc/init.d. See
/etc/init.d/README.
How are initscripts started and stopped?
----------------------------------------
This has not changed, symlinks are made from the initscript in the
/etc/init.d directory to the /etc/rc?.d directories. See
/etc/init.d/README and /etc/rc?.d/README.
What order are initscripts started and stopped in?
--------------------------------------------------
This has not changed, the symlinks are named SNNname or KNNname, where
NN is a number from 00 to 99. The K scripts are run first in
numerical order, followed by the S scripts in numerical order.
How do I find the current/previous runlevel?
--------------------------------------------
This has not changed, use the "runlevel" command. See runlevel(8).
How do I change the runlevel?
-----------------------------
This has not changed, use the "telinit" command or just invoke "init"
directly. See telinit(8).
How do I change the default runlevel?
-------------------------------------
Edit the /etc/inittab file. Locate, or write, the following line:
id:N:initdefault:
Where N is the default runlevel, change this to match.
How do I shutdown the machine?
------------------------------
This has not changed, use the "shutdown" command provided by the
upstart package; you may also use the "reboot"/"halt"/"poweroff"
commands as a short-cut. See shutdown(8) and reboot(8).
You can also press Control-Alt-Delete on a console to reboot the
machine.
How do I change the behaviour of Control-Alt-Delete?
----------------------------------------------------
Edit the /etc/init/control-alt-delete.conf file, the line beginning
"exec" is what upstart will run when this key combination is pressed.
To not do anything, you can simply delete this file.
How do I enter single-user mode?
--------------------------------
This hasn't changed, choose the "(recovery mode)" option from GRUB;
add "-s", "S" or "single" to the kernel command-line; or from a
running machine, run "telinit 1" or "shutdown now".
How do I reduce the number of gettys?
-------------------------------------
Also see "How do I change which runlevels gettys are run in?"
In /etc/init there is a file named ttyN.conf for each getty that will be
started, where N is numbered 1 to 6. Remove any that you do not
want.
This will not take immediate effect, however you can run "stop ttyN"
to stop one that is running.
How do I change getty parameters?
---------------------------------
In /etc/init there is a file named ttyN.conf for each getty that will be
started, where N is numbered 1 to 6. Edit these files, the line
beginning "respawn" is what upstart will run.
This will not take immediate effect, run "stop ttyN" followed by
"start ttyN" or just kill the running getty to respawn with the new
parameters.
How do I change which runlevels gettys are run in?
--------------------------------------------------
In /etc/init there is a file named ttyN.conf for each getty that will be
started, where N is numbered 1 to 6. Edit these files, there are two
lines:
start on runlevel [2345]
stop on runlevel [!2345]
Change the set of runlevels to match your taste.
This will not take immediate effect, however you can run "stop ttyN"
to stop one that is running or "start ttyN" to start one that isn't.
How do I increase the number of gettys?
---------------------------------------
In /etc/init there is a file named ttyN.conf for each getty that will be
started, where N is numbered 1 to 6.
Copy one of these files to a new name, we suggest you simply name it
after the tty, e.g. "ttyS0".
Edit that file, change the "respawn" line to match your requirements;
in particular you'll need to change the tty the getty should be run
on.
This will not take immediate effect, however you can run "start ttyN"
to start the getty.
How do I add a serial console?
------------------------------
See "How do I increase the number of gettys?"
Upstart isn't working, how do I debug it?
-----------------------------------------
Add "--debug" to the kernel command-line, and be sure to remove "quiet"
and "splash" if existent. You'll now see debugging messages as upstart
works.
If you are using an initramfs generator other than initramfs-tools you
should use this option very carefully. There are for example known
problems with yaird, which doesn't correctly pass the --debug option to
init and as a consequence leads to a kernel panic. For more details
please see bug #416927.
Upstart isn't working, how can I rescue my system?
--------------------------------------------------
Here's a quick guide to rescuing your system:
1. Edit the kernel command-line, remove "quiet" and "splash" if
existent, add "init=/bin/bash".
The machine will boot into a root shell.
2. Run "/etc/init.d/rcS"
The machine will set up the basic necessities such as hardware
and networking.
3. Ensure that upstart is properly installed
Check if all files are installed in /etc/init. If not, reinstall the
upstart package.
5. Check that there are now files in /etc/init
6. Run "sync" and "reboot -f"
The machine will now reboot.
Hopefully your machine should now boot normally.
Can I query upstart for a list of jobs?
---------------------------------------
Yes, "initctl list" will list the known jobs and their status.
How do I manually start or stop a job?
--------------------------------------
Use "start JOB" or "stop JOB".
How do I find the status of a job?
----------------------------------
Use "status JOB".
Can I emit an event by hand?
----------------------------
Yes, "initctl emit EVENT" will emit the named event and cause any
jobs waiting for it to be started or stopped as appropriate.
|