A method comprising: storing, in an on-chip non-volatile memory of a system-on-a-chip (SoC) device, boot code comprising first and second stage bootloaders (124, 126), and at least one of further boot code and system code, the further boot code comprising BIOS or UEFI code, and the system code comprising at least one selected from among an operating system and hypervisor code, wherein the on-chip non-volatile memory includes a plurality of logical regions comprising a persistent region, a read-only memory region and a transient region, the read-only memory region comprising the first stage bootloader, and the persistent region comprising the system code and the second stage bootloader, wherein the further boot code is stored in either the read-only memory region or the persistent region; reading metadata stored in the on-chip non-volatile memory to determine whether to boot or resume the system; and in response to the metadata indicating that the system is to be booted, booting, by executing the boot code from the on-chip non-volatile memory, a system (300A, 300B) comprising the SoC device from a mode in which power was removed from the system, the booting comprising: accessing the metadata in the on-chip non-volatile memory to locate the plurality of logical regions; searching, by the first stage bootloader, for the second stage bootloader using the metadata; searching, by the second stage bootloader, for one of the further boot code and the system code using the metadata; loading, by the second stage bootloader, the one of the further boot code and the system code in the SoC device from the on-chip non-volatile memory without accessing storage off the SoC device; and executing the one of the further boot code and the system code. storing, in an on-chip non-volatile memory of a system-on-a-chip (SoC) device, boot code comprising first and second stage bootloaders (124, 126), and at least one of further boot code and system code, the further boot code comprising BIOS or UEFI code, and the system code comprising at least one selected from among an operating system and hypervisor code, wherein the on-chip non-volatile memory includes a plurality of logical regions comprising a persistent region, a read-only memory region and a transient region, the read-only memory region comprising the first stage bootloader, and the persistent region comprising the system code and the second stage bootloader, wherein the further boot code is stored in either the read-only memory region or the persistent region; reading metadata stored in the on-chip non-volatile memory to determine whether to boot or resume the system; and in response to the metadata indicating that the system is to be booted, booting, by executing the boot code from the on-chip non-volatile memory, a system (300A, 300B) comprising the SoC device from a mode in which power was removed from the system, the booting comprising: accessing the metadata in the on-chip non-volatile memory to locate the plurality of logical regions; searching, by the first stage bootloader, for the second stage bootloader using the metadata; searching, by the second stage bootloader, for one of the further boot code and the system code using the metadata; loading, by the second stage bootloader, the one of the further boot code and the system code in the SoC device from the on-chip non-volatile memory without accessing storage off the SoC device; and executing the one of the further boot code and the system code. accessing the metadata in the on-chip non-volatile memory to locate the plurality of logical regions; searching, by the first stage bootloader, for the second stage bootloader using the metadata; searching, by the second stage bootloader, for one of the further boot code and the system code using the metadata; loading, by the second stage bootloader, the one of the further boot code and the system code in the SoC device from the on-chip non-volatile memory without accessing storage off the SoC device; and executing the one of the further boot code and the system code.