Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

reboot(2) [ultrix man page]

reboot(2)							System Calls Manual							 reboot(2)

Name
       reboot - reboot system or halt processor

Syntax
       #include <sys/reboot.h>

       reboot(howto)
       int howto;

Arguments
       howto   The howto argument is a mask of options passed to the bootstrap program.

	       The bits of howto are:

	       RB_HALT
		      the processor is simply halted; no reboot takes place.  RB_HALT should be used with caution.

	       RB_ASKNAME
		      Interpreted  by  the bootstrap program itself, causing it to inquire as to what file should be booted.  Normally, the system
		      is booted from the file "xx(0,0)vmunix" without asking.

	       RB_SINGLE
		      Normally, the reboot procedure involves an automatic disk consistency check and then multi-user operations.  RB_SINGLE  pre-
		      vents  the consistency check, rather simply booting the system with a single-user shell on the console.  RB_SINGLE is inter-
		      preted by the init(8) program in the newly booted system.  This switch is not available from the system call interface.

	       Only the superuser may a machine.

Description
       The system call reboots the system, and is invoked automatically in the event of unrecoverable system failures.	The system call  interface
       permits	only  RB_HALT or RB_AUTOBOOT to be passed to the reboot program; the other flags are used in scripts stored on the console storage
       media or used in manual bootstrap procedures.  When none of these options (for example, RB_AUTOBOOT) is given, the system is rebooted  from
       file in the root file system of unit 0 of a disk chosen in a processor-specific way.  Normally, an automatic consistency check of the disks
       is then performed.

Return Values
       If successful, this call never returns.	Otherwise, a -1 is returned, and an error is stored in the global variable errno.

Diagnostics
       The call fails under the following condition:

       [EPERM]	      The caller is not the superuser.

See Also
       crash(8v), halt(8), init(8), reboot(8)

																	 reboot(2)

Check Out this Related Man Page

reboot(3C)																reboot(3C)

NAME
reboot - reboot system or halt processor SYNOPSIS
#include <sys/reboot.h> int reboot(int howto, char *bootargs); The reboot() function reboots the system. The howto argument specifies the behavior of the system while rebooting and is a mask con- structed by a bitwise-inclusive-OR of flags from the following list: RB_AUTOBOOT The machine is rebooted from the root filesystem on the default boot device. This is the default behavior. See boot(1M) and kernel(1M). RB_HALT The processor is simply halted; no reboot takes place. This option should be used with caution. RB_ASKNAME Interpreted by the bootstrap program and kernel, causing the user to be asked for pathnames during the bootstrap. RB_DUMP The system is forced to panic immediately without any further processing and a crash dump is written to the dump device (see dumpadm(1M)) before rebooting. Any other howto argument causes the kernel file to boot. The interpretation of the bootargs argument is platform-dependent. Upon successful completion, reboot() never returns. Otherwise, -1 is returned and errno is set to indicate the error. The reboot() function will fail if: EPERM The {PRIV_SYS_CONFIG} privilege is not asserted in the effective set of the calling process. intro(1M), boot(1M), dumpadm(1M), halt(1M), init(1M), kernel(1M), reboot(1M), uadmin(2) 22 Mar 2004 reboot(3C)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Bootup Error

Hi all The following error was displayed when a sco server (5.0.5) was booted. What should be done to overcome the problem. Replies appreciated. Bios 03.0 0130688 KB memory good 01 processor(s) in system remote console dialing on, please wait connect fail : modem off cpu clock... (6 Replies)
Discussion started by: raguramtgr
6 Replies

2. UNIX for Dummies Questions & Answers

ifconfig

I am trying to change an IP address on a machine running HPUX10 After I change it I can ping it from the outside but it completely locks the console. After a reboot it returns back to its previous IP. Any ideas?? Thanks Brian (7 Replies)
Discussion started by: breigner
7 Replies

3. AIX

how to pre-determine if a reboot is required?

given any specific fix, how can I determine if the machine will require a reboot? (I don't have a window for downtime) obvious fix's to the kernel / lvm will require a reboot ... bos.rte files etc... is there a tool or command that I am able to run against a specific IY that will inform me... (4 Replies)
Discussion started by: A Stewart
4 Replies

4. Solaris

howto exit from 15K sc console.

howto exit from 15K sc console. I tried exit, Ctrl+d, Ctrl+c but all not works. thanks, Ratcha. (6 Replies)
Discussion started by: arm_naja
6 Replies

5. Shell Programming and Scripting

best way to reboot ?

Hi What is the best way to reboot a Linux computer? i) Press the power switch ii) type 'init 6' as any user, then enter the root password when prompted iii) Pour metal filings in the top of the computer. iv) su to root then type 'init 6' (6 Replies)
Discussion started by: tjay83
6 Replies

6. Filesystems, Disks and Memory

Corrupted disk on reboot

Could someone please help me. Users were unable to access SCO Server. Attempted to reboot the machine and following error was reported: UX: vxfs mount: ERROR: /dev/dsk/c1b0t3d0s1 is corrupted, needs checking UX: vxfs mount: ERROR: /dev/dsk/c1b0t3d0s2 is corrupted, needs checking etc. ... (4 Replies)
Discussion started by: mandarin
4 Replies

7. BSD

restart the network on freeBSD 7.2

hi howto restart the network with a wireless interface including wpa_supplicant on freeBSD 7.2 without reboot? (3 Replies)
Discussion started by: ccc
3 Replies

8. Solaris

Last reboot with odd dates

this system go rebooted itself and when I check the last reboot command , the dates are shown without any sequence... Any idea? # last reboot -a reboot system boot Mon Jan 25 19:33 reboot system down Mon Jan 25 19:25 reboot system boot Tue Nov 10 14:33 reboot system down ... (4 Replies)
Discussion started by: busyboy
4 Replies

9. AIX

xntpd starts after reboot only when HACMP services are started ?

Hello, Running AIX 6.1, AIX machine is HACMP node. Recently I set up ntp service. Started xntpd by hand - everythig is OK. Configured xntpd to start after reboot and rebooted the machine. After reboot checked xntpd: # lssrc -a|grep ntp xntpd tcpip ... (5 Replies)
Discussion started by: vilius
5 Replies

10. Shell Programming and Scripting

howto substitute word in vi command mode

Hi I'm trying to substitute word "January" with word "March" in my script but in certain lines only. I have couple words containing pattern that I want to substitute e.g. - log.January.1.array - log_January_1_array_1 - log.January.1.array - log_January_1_array_11 Trying to do cmd below... (9 Replies)
Discussion started by: presul
9 Replies

11. Shell Programming and Scripting

script to reboot multiple hosts

Hi Expert, How to create a script to reboot multiple hosts in linux? Thank you. (5 Replies)
Discussion started by: regmaster
5 Replies

12. Solaris

System booting to maintenance mode

Hi Guys, I have a sunblade 1500. I booted the system and it booted to maintenance mode. How can I fix this? Thanks lots (8 Replies)
Discussion started by: cjashu
8 Replies

13. Shell Programming and Scripting

Two scripts after reboot

I have two scripts: scriptone.sh & scripttwo.sh I need to schedule them to run scriptone.sh then scripttwo.sh after the servers is rebooted ( only first reboot ) OS: AIX 6.1 (4 Replies)
Discussion started by: Sara_84
4 Replies

14. Solaris

need to safely reboot to cdrom

I am using: reboot -- cdrom However I'm afraid of causing file system errors/corruption. I've seen many threads say that init 6 is safer, but I need to get to CDROM. Is there a command that is as safe as init, but can boot to cdrom, or should I not worry so much about the reboot... (5 Replies)
Discussion started by: lcoreyl
5 Replies

15. UNIX for Beginners Questions & Answers

Can I trace who asked for reboot

Hi, I have an unexpected reboot happening on a Debian 9.9 server. Yesterday 2019-12-01 at 8:30:34 a reboot happened without me or my team being aware: /var/log/syslog:Dec 1 08:30:34 xxxx shutdown: shutting down for system reboot /var/log/syslog:Dec 1 08:30:34 xxxx init: Switching to... (4 Replies)
Discussion started by: chebarbudo
4 Replies