L'ardoise eduvax

Blog, free software projects, computer tips and more

Anti Visual (Meta) Programming

Written by Sebastien Devaux - - no comments

More than ten years after the delivery of the first really useable UML software engineering tools, it's time to look backwards and think about the real gains enabled by those tools. It appears that the promises are not yet there and finally many have failed to increase significantly software engineers productivity than just using paper and pen. Most coders are skilled in thinking of classes and writing line of codes, not drawing. But good drawing are really useful, those are only too costly to build and maintain. Then imagine if you can drawing by coding. The same coders that didn't produce any documentation before the availability of doc extractors like doxygen won't no more refuse to present diagrams if their drawing does no more require overwork.

Read more Anti Visual (Meta) Programming

Install grub manually to make disk bootable

Written by Sebastien Devaux - - no comments

Use this procedure to repair a broken boot of a system disk boot or to make a new restored system disk bootable. To run the procedure you need an already running linux. If not available, use a live CD or USB key. The disk to make bootable must already contain a partition with almost complete linux system: in particular drub binaries and /boot directory with kernel and grub configuration.

Read more Install grub manually to make disk bootable

Dump and restore full file system

Written by Sebastien Devaux - - no comments

Tar and other file archiver may miss some specific file attributes and special files. At least for ext2/3/4 file systems, old fashion BSD dump and restore utilities (debian package simply named dump) remains a perfect solution to backup an entire file system. The following procedure may help to move a filesystem from a disk to another.

  • backup root filesystem to a file. Beware! Avoid to put the backup file on the filesystem to be dumped:
# dump -0z -f /mnt/backup/rootfs.dump.gz
  • to restore the filesystem, first create a new fresh partition and empty file system (fdisk + mkfs). Then use restore command to unpack the dump file into the new file system.
# cd /mnt/newfs
# restore -f /mnt/backup/rootfs.dump.gz

Read more Dump and restore full file system

Mount MTP USB device

Written by Sebastien Devaux - - no comments

Since mass storage device is not always available, exchange files using MTP becomes mandatory.

  • 1st, install jmtpfs package or simular (mtpfs, go-mtpfs). fuse is needed.
  • add users that need to mount such device to the fuse group.
  • create a new directory that will be used as mount point (for instance ~/mtpdev).
  • For each file exchange session:
    • plug your USB device (beware, connection some android phone will fail if in standby mode, unlock your device first).
    • mount device: $ jmtpfs ~/mtpdev
    • do wathever you want on the mounted file system (unfortunately, much slower than any mass storage device).
    • Once all exchanges are completed, unmount file system: $ fuser -u ~/mtpdev
    • The device is ready to unplug.

Read more Mount MTP USB device