Donnerstag, 30. Mai 2013

Check and repair LUKS encrypted partitions in Ubuntu 13.04

Unfortunately Gnome Disks was castrated in version 3.6, it is now impossible to repair LUKS encrypted filesystems with the help of Gnome Disks. But you can easily do this within the terminal.

If you are using a LUKS encrypted partition and you want to check whether it has file system errors, you can do this with the following commands:

  1. Mount and open your LUKS partition:

    sudo cryptsetup luksOpen /dev/<yourPartition> <someMountName>

    e.g.: sudo cryptsetup luksOpen /dev/sdb3 foo
  2. Run fsck on it to check and auto-repair the filesystem:

    sudo fsck -a /dev/mapper/<someMountName>

    e.g.:  sudo fsck -a /dev/mapper/foo
  3. After the check / repair is finished, do not forget to close your LUKS volume again:

    sudo cryptsetup luksClose <someMountName>

    e.g. sudo cryptsetup luksClose foo
If you want to avoid an auto-repair and instead want to do a user guided check / repair, just remove the "-a" option.

That's it easy peasy, isn't it ?

Keine Kommentare:

Kommentar veröffentlichen