q e.g. hard disk, Tn CD-ROM , and booting over .Tn Ethernet networks using .Tn BOOTP . .Ss Power fail and crash recovery Normally, the system will reboot itself at power-up or after crashes. An automatic consistency check of the file systems will be performed as described in .Xr fsck 8 , and unless this fails, the system will resume multi-user operations. .Ss Cold starts The .Tn Sun Open Firmware performs a Power On Self Test
q Tn POST , and then will boot an operating system according to configuration in Open Firmware environment variables. .Ss Boot program options l -tag -width xxx t Fl a Prompt for the root file system device, the system crash dump device, and the path to .Xr init 8 . t Fl d Bring the system up in debug mode. Here it waits for a kernel debugger connect; see .Xr gdb 1 . t Fl q Boot the system in quiet mode. t Fl s Bring the system up in single-user mode. t Fl v Boot the system in verbose mode. .El
p Any extra flags or arguments, or the .Aq Ar boot string after the -- separator are passed to the boot PROM. Other flags are currently ignored.
p At any time you can halt the running system and get back to the Open Firmware. If the console is the .Tn Sun framebuffer and keyboard, press the .Sq STOP and .Sq A keys at the same time on the keyboard. On older models of .Tn Sun keyboards, the .Sq STOP key is labeled .Sq L1 .
p If the console is a serial port the same is achieved by sending a .Sq BREAK .
p If you do this accidentally, you can continue whatever was in progress with the c go command. .Sh BOOT DEVICES Since machines vary greatly in the way their devices are connected, there are aliases defined by the firmware. You can either use the fully qualified Open Firmware path of a device node, or the alias.
p The secondary boot loader, .Nm ofwboot , takes .Nm commands virtually the same as Open Firmware. Thus, the following examples apply equally to .Nm ofwboot as well as Open Firmware.
p A typical list of usable boot devices (extracted from the output of the Open Firmware command c devalias ) is: d -literal -offset indent net /sbus/SUNW,hme@e,8c00000 disk /sbus/SUNW,fas@e,8800000/sd@0,0 cdrom /sbus/SUNW,fas@e,8800000/sd@6,0:f disk6 /sbus/SUNW,fas@e,8800000/sd@6,0 disk5 /sbus/SUNW,fas@e,8800000/sd@5,0 disk4 /sbus/SUNW,fas@e,8800000/sd@4,0 disk3 /sbus/SUNW,fas@e,8800000/sd@3,0 disk2 /sbus/SUNW,fas@e,8800000/sd@2,0 disk1 /sbus/SUNW,fas@e,8800000/sd@1,0 disk0 /sbus/SUNW,fas@e,8800000/sd@0,0 .Ed
p If a device specification includes a partition letter (for example .Em cdrom in above list), that partition is used by default, otherwise the first (a) partition is used. If booting from the net device, there is no partition involved.
p The boot device is an optional first part of the boot string, if no device is specified the default device is used (see below). .Sh FIRMWARE ENVIRONMENT VARIABLES All Open Firmware environment variables can be printed with the c printenv command and changed with the c setenv command. The boot process relevant variables and their suggested value for booting .Nx are: d -literal -offset indent boot-command boot auto-boot? true boot-file boot-device disk diag-switch? false .Ed
p Of course you may select any other boot device, if you do not want to boot from the device aliased to .Em disk , see the discussion on devices above. .Sh FILES l -tag -width /usr/mdec/ofwboot.netxx -compact t Pa /netbsd system code t Pa /ofwboot system bootstrap t Pa /usr/mdec/ofwboot.net alternate bootstrap when booting from the network, see .Xr diskless 8 for details. .El .Sh EXAMPLES Boot from .Tn CD-ROM :
p d -literal -offset indent boot cdrom .Ed
p Note that some multi-architecture CDs are not able to use the default sparc64 partition for .Tn CD-ROMs
q f , so they may require an explicit partition letter, for example d -literal -offset indent boot cdrom:c .Ed
p When using external .Tn SCSI .Tn CD-ROM drives it is important to know two things: the .Tn Sun firmware expects the .Tn SCSI ID to be six, and the drive must support 512-byte block reads, in addition to the standard 2048-byte reads.
p Use d -literal -offset indent boot net -sd .Ed
p to boot single user from network and break into the kernel debugger as soon as possible.
p Use d -literal -offset indent boot net tftp:netbsd -a .Ed
p to boot a kernel named netbsd obtained via tftp and have it ask for root file system, swap partition and init location once it is up.
p During installation from a different operating system d -literal -offset indent boot disk:b .Ed
p is used to boot a .Dq miniroot file system from the swap partition. .Sh SEE ALSO .Xr disklabel 8 , .Xr diskless 8 , .Xr fsck 8 , .Xr halt 8 , .Xr init 8 , .Xr installboot 8 , .Xr rc 8 , .Xr shutdown 8 , .Xr sparc/boot 8 , .Xr syslogd 8 .Sh STANDARDS .Tn Sun developed its firmware and promoted it to become .St -ieee1275-94 .
p .Lk http://www.openfirmware.org/1275/ "IEEE 1275 Open Firmware" .Sh BUGS .Nx provides no way to boot .Tn UltraSPARC systems from floppy disks. This is unlikely to change, due to very low demand for this feature.
p The OBP on Ultra 1 and Ultra 2 machines can only boot from the first 4Gb of the disk.