I prefer people to use getconf command rather an bootinfo because you don’t need to be as root user to execute.

What was the device the system was last booted from?
$ getconf BOOT_DEVICE
hdisk0

What size is a particular disk in the system?
$ getconf DISK_SIZE /dev/hdisk0
10240

What partition size is being used on a disk in the system?
$ getconf DISK_PARTITION /dev/hdisk0
16

Is the machine capable of running a 64-bit kernel?
$ getconf HARDWARE_BITMODE
64

Is the system currently running a 64-bit or 32-bit kernel?
$ getconf KERNEL_BITMODE
64

How much real memory does the system have?
$ getconf REAL_MEMORY
524288