Skip to content

Instantly share code, notes, and snippets.

@tondrej
Created November 24, 2018 16:17
Show Gist options
  • Save tondrej/763bd507f56ce33665aec3da663eef0d to your computer and use it in GitHub Desktop.
Save tondrej/763bd507f56ce33665aec3da663eef0d to your computer and use it in GitHub Desktop.
restore.sh
#!/bin/bash
# http://errietta.me/blog/luks-clonezilla/
cryptsetup luksOpen /dev/sda5 crypt
modprobe dm-mod
vgchange -ay
tar -jxvf sda1.img.tar.bz2
partclone.ext4 -r -s ./sda1.img -o /dev/sda1
rm sda1.img
tar -jxvf mint.img.tar.bz2
partclone.ext4 -r -s ./mint.img -o /dev/mapper/mint--vg-root
rm mint.img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment