Keyboard utilities
Media handling. Implements a Partition class providing methods formounting,umounting, formating and querying partitions.
Bases: object
A class representing a partition in a hard disk.
device_path: the path to the device node.
Find CDROM devices based in the information stored in the proc tree.
List the disks present in the system by parsing fdisk -l. Returns a tuple with path in the first position, and the string representation of the size in the second. #TODO: we shouldnt rely in the fdisk formatting. Use pyparted or similar.
Collection of small utilities.
Change the root dir for current shell and run the given command.
Arguments:
dir: The directory to for chrooting to. command: The command to be executed under the new root.
>>> exec_chroot('/', 'pwd')
0
Create a filesystem in a partition using mkfs.
Mount a filesystem.
Arguments:
src: the filesystem or device to be mounted. extra: extra options to be passed to the mount command, for example:
“-o loop”. Default is None.
- filesystem: filesystem type passed to the mount command, for example:
- “ext3”. Default is auto.