Documentation
¶
Overview ¶
Package rootdev provides functions to locate the root device from which gokrazy was booted.
All functions provided by this package work only once /proc is mounted.
Index ¶
Constants ¶
const ( Boot = 1 Root2 = 2 Root3 = 3 Perm = 4 )
Variables ¶
This section is empty.
Functions ¶
func ActiveRootPartition ¶
func ActiveRootPartition() int
ActiveRootPartition returns 2 or 3, depending on which partition is the currently active root file system.
func BlockDevice ¶
func BlockDevice() string
BlockDevice returns the file system path identifying the block device from which gokrazy was booted.
func InactiveRootPartition ¶
func InactiveRootPartition() int
InactiveRootPartition returns 2 or 3, depending on which partition is currently inactive (i.e. the target for updates).
func PARTUUID ¶
func PARTUUID() string
PARTUUID returns the partition UUID of the block device from which gokrazy was booted, if any (or the empty string).
func Partition ¶
Partition returns the file system path identifying the specified partition on the root device from which gokrazy was booted.
E.g. Partition(2) = /dev/mmcblk0p2
func PartitionCmdline ¶
PartitionCmdline returns the cmdline identifier (e.g. PARTUUID=aabbccdd-02, or /dev/mmcblk0p2) identifying the specified partition on the root device from which gokrazy was booted.
E.g. PartitionCmdline(2) = PARTUUID=aabbccdd-02
Types ¶
This section is empty.