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
What size is a particular disk in the system?
$ getconf DISK_SIZE /dev/hdisk0
What partition size is being used on a disk in the system?
$ getconf DISK_PARTITION /dev/hdisk0
Is the machine capable of running a 64-bit kernel?
$ getconf HARDWARE_BITMODE
Is the system currently running a 64-bit or 32-bit kernel?
$ getconf KERNEL_BITMODE
How much real memory does the system have?
$ getconf REAL_MEMORY