code: func (LinuxStrategy) configureAutoMount(ctx context.Context, disk string) error {
  	// Wait for the disk to be attached.
  	for {
  		err := exec.Command("blkid", disk).Run()
  		if err == nil {
  			logging.Infof(ctx, "Attached: %s.", disk)
  			break
  		}
  		s := err.(*exec.ExitError).Sys().(syscall.WaitStatus)
  		if s.ExitStatus() != 2 {
  			// 2 means the specified device wasn't found.
  			// Keep waiting if 2, otherwise return an error.
  			return err
  		}
  		time.Sleep(60 * time.Second)
  		logging.Infof(ctx, "Waiting for disk to be attached...")
  	}
  	// Configure auto-mount using fstab.
  	f, err := os.OpenFile("/etc/fstab", os.O_RDWR, 0)
  	if err != nil {
  		return err
  	}
  	defer f.Close()
  	scanner := bufio.NewScanner(f)
  	for scanner.Scan() {
  		if strings.Contains(scanner.Text(), disk) {
  			logging.Infof(ctx, "Already mounted: %s.", disk)
  			return nil
  		}
  	}
  	logging.Infof(ctx, "Mounting: %s.", disk)
  	// Ensure the cursor is at the end so the new line is appended.
  	f.Seek(0, io.SeekEnd)
  	line := []byte(fmt.Sprintf("%s /b ext4 defaults,nobootwait,nofail 0 2\n", disk))
  	if _, err := f.Write(line); err != nil {
  		return err
  	}
  	// Ensure the file is closed before mount reads from it.
  	f.Close()
  	return exec.Command("/bin/mount", "--all").Run()
  }
docs: // configureAutoMount mounts the specified disk and configures mount on startup.
  //
  // Assumes the disk is already formatted as ext4.