python, filesystem, partitioning, operating-system, root
main.py1243 chars32 lines
Note that this code should be executed with elevated privileges, such as by using sudo python script.py. It also assumes that there is only one Linux partition on the disk, which may not be the case for more complex partitioning schemes.
gistlibby LogSnag