# Recovering encrypted filesystems

1. Boot from Live CD / USB

	
  2. Decrypt the filesystem

    
    <code class="markdown">cryptsetup luksOpen /dev/sda5 <span class="emphasis">*hostname*</span>
    </code>




	
  3. Mount filesystems

    
    <code class="sql">mount /dev/dm-2 /mnt
    mount /dev/dm-3 /mnt/home
    mount /dev/sda1 /mnt/boot
    mount <span class="comment">--bind /dev /mnt/dev</span>
    mount <span class="comment">--bind /sys /mnt/sys</span>
    mount <span class="comment">--bind /proc /mnt/proc</span>
    </code>




	
  4. Enter chroot
chroot /mnt


`/etc/crypttab` should have: sda5_crypt UUID=*sda5_uuid*



    

## Related posts

- [MySQL Locking](/blog/2010/mysql-locking/)

- [Recover from "Failed to open the relay log"](/blog/2010/recover-from-failed-to-open-the-relay-log/)

- [Restore Default Panels](/blog/2010/restore-default-panels/)

- [Linux: What is using up disk space?](/blog/2009/linux-what-is-using-up-disk-space/)



© Ricky Moorhouse
