Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

boot(9) [freebsd man page]

BOOT(9) 						   BSD Kernel Developer's Manual						   BOOT(9)

NAME
boot -- halt or reboot the system SYNOPSIS
#include <sys/types.h> #include <sys/systm.h> #include <sys/reboot.h> void boot(int howto); DESCRIPTION
The boot() function handles final system shutdown, and either halts or reboots the system. The exact action to be taken is determined by the flags passed in howto and by whether or not the system has finished autoconfiguration. If the system has finished autoconfiguration, boot() does the following: 1. If this is the first invocation of boot() and the RB_NOSYNC flag is not set in howto, syncs and unmounts the system disks by call- ing vfs_unmountall(9). 2. Disables interrupts. 3. If rebooting after a crash (i.e., if RB_DUMP is set in howto, but RB_HALT is not), saves a system crash dump. 4. Runs any shutdown hooks previously registered. 5. Prints a message indicating that the system is about to be halted or rebooted. 6. If RB_HALT is set in howto, halts the system. Otherwise, reboots the system. If the system has not finished autoconfiguration, boot() runs any shutdown hooks previously registered, prints a message, and halts the sys- tem. SEE ALSO
vfs_unmountall(9) BSD
February 14, 1997 BSD

Check Out this Related 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)
Man Page

15 More Discussions You Might Find Interesting

1. SCO

SCO UNIX Won't Boot

Our system is not booting up properly. It keeps going to this screen: Enter Run Level (0-6, s or S): I tried to hit all nos# 0-6 is just goes to hung state. Tried s or S & it brings me to single user mode. I've checked the file systems & found out that all three had 98%. I tried to... (86 Replies)
Discussion started by: jedimaster
86 Replies

2. Solaris

Boot problems with SunBlade 2000

Can't seem to get it to boot from cd boot cd rebooting with command: boot cd boot device: /pci@8600000/sunw,qlc@4/fp@0,0/disk@1,0 file and args: cd boot: cannot open cd enter filename : trying to install solaris 9 9/04 just to use it as a simple workstation on home network quite new... (25 Replies)
Discussion started by: solnewbie
25 Replies

3. Shell Programming and Scripting

How do I Start JBoss automatically when boot my linux machine.

I have created a script file named 'start-jboss' ------------------------------------------------- #!/bin/sh # For starting Jboss JAVA_HOME=/home/argole/jdk/jdk1.6.0_10 export JAVA_HOME cd /home/argole/server/jboss-4.2.0.GA/bin echo "Starting JBOSS server" nohup ./run.sh -c... (25 Replies)
Discussion started by: shiraz
25 Replies

4. Emergency UNIX and Linux Support

Unbootable solaris 10 x86

Hi all, I have unbootable Solaris 10 x86 installed on ZFS root file system. on an IDE HDD The bios keep showing the msg DISK BOOT FAILURE , PLEASE INSERT SYSTEM BOOT DISK please note : the HDD is connected properly and recognized by the system is there any guide to recover the system ,... (67 Replies)
Discussion started by: h@foorsa.biz
67 Replies

5. Filesystems, Disks and Memory

QEMU not booting my image

hello all, I have been trying to boot an image (.IMG) using qemu, for quite some time now and i can't seem to get it to work. I've been able to boot from the Windows XP CD, the Debian iso image, etc, so I know qemu is configured properly and is working. But when it come to booting an image that I... (34 Replies)
Discussion started by: neur0n
34 Replies

6. Solaris

v890 cannot boot

I just received a v890. I cannot get it to boot via CDROM nor can I access the SC prompt because I do not know the password. I am attempting to access it via serial cable to a Linux box. What is the best way to proceed? (25 Replies)
Discussion started by: LittleLebowski
25 Replies

7. Shell Programming and Scripting

Mkbootfs writing to stdout in bash script

Hi, I need to automate some repacking tasks of a boot image for Android When in command line, I can use this command: mkbootfs /path/to/root > /path/to/ramdisk-recovery.cpio;However, if I try to run the command from a shell script under Ubuntu, it fails and outputs to stdout instead of the... (27 Replies)
Discussion started by: Phil3759
27 Replies

8. Solaris

Solved: Disk Unable to Boot

Update: The / file system (/dev/rdsk/c1t0d0s0) is being checked fsck unable to stat WARNING - unable to repair the / filesystem. Run fsck manually (fsck -F ufs /dev/rdsk/c1t0d0s0). Root password for system maintenance (control-d to bypass): I am unable to hit control-d to by pass. I... (50 Replies)
Discussion started by: br1an
50 Replies

9. Solaris

Machine is not booting

Dear all Any help would be greatly appreciated, I have Solaris 10 installed on an M5000 SPARC machine. While rebooting it, we are faced with the following message then the OK prompt: SPARC Enterprise M5000 Server, using Domain console Copyright (c) 1998, 2010, Oracle and/or its affiliates. All... (25 Replies)
Discussion started by: abohmeed
25 Replies

10. Solaris

Update OpenBoot Prom from CD

Hello, I have a sun v880 that i got from ebay for cheap as a way to to learn Solaris and sun hardware in general. The machine currently has OBP 4.7.0 2002/10/25 and i was wondering if there was a way to update the prom with out and active solaris install, as currently when i proceed with the... (29 Replies)
Discussion started by: pvibien
29 Replies

11. Solaris

Bad magic number in disk label.

This is first time post...found this forum when looking for possible solution to fix my sun pc. Just one day can't boot it already showing the following: Boot device: disk File args: Bad magic number in disk label Can't open disk label package Evaluating: boot Can't open boot device... (40 Replies)
Discussion started by: SHuKoSuGi
40 Replies

12. SCO

Sco UNIXware 7.1.4 error in booting

Hello Dears, I have fujitsu tx300 S7 server with installed sco unixware 7.1.4, Now the /etc is corrupted and the sco cannot boot. There is no emergency disk or cd, I'm trying to fix this with reinstalling unixware again, but the problem now that when i try to install the HBA driver that i... (26 Replies)
Discussion started by: amr ibrahim
26 Replies

13. UNIX for Beginners Questions & Answers

SCO OpenServer 5 Will Not Boot

We have a legacy system that runs on SCO OpenServer 5.0.6, and I've rebuilt the server a couple of times so we can have access to old historical data. That system suddenly went offline for no known reason, and I know that the configuration has not been altered, there is nobody with access to the... (63 Replies)
Discussion started by: spock9458
63 Replies

14. What is on Your Mind?

New Badging System - Badges Prototype Beta 1 (Badges Only)

Today I mapped out the new badging system using FA icons, Beta 1 in no particular order except a 6 x 8 grid: https://www.unix.com/members/1-albums215-picture991.png The prototype HTML code for this layout: <style> .fa-badge-grid { font-size: 1.5em; } .row { ... (38 Replies)
Discussion started by: Neo
38 Replies

15. Web Development

Sneak Preview: New UNIX.COM UserCP VueJS Demo

Hey, Now that I'm caught-up on a number of forum tasks, I can turn my attention to the next-generation UserCP (and learn VueJS) for the site. Today I created this (not yet functional) demo using Vue; https://www.unix.com/cp/index.php What do you think? (36 Replies)
Discussion started by: Neo
36 Replies