def GetRootDisk():
  """Returns the device name of the root disk.

  Returns:
    str, like "/dev/disk...."
  Raises:
    Error: When the root disk could not be found.
  """
  try:
    returncode, stdout, _ = Exec(('/sbin/mount'))
  except ExecError:
    returncode = 'ExecError'

  if returncode != 0:
    raise Error(
        'Could not enumerate mounted disks, mount exit status %s' % returncode)

  for line in stdout.splitlines():
    try:
      device, _, mount_point, _ = line.split(' ', 3)
      if mount_point == '/' and re.search(r'^[/a-z0-9]+$', device, re.I):
        return device
    except __HOLE__:
      pass

  raise Error('Could not find root disk.')
dataset/ETHPy150Open google/cauliflowervest/src/cauliflowervest/client/util.py/GetRootDisk