Skip to content

Instantly share code, notes, and snippets.

View foursixnine's full-sized avatar
♾️
Dreaming about arepas and maria cookies!

Santiago Zarate foursixnine

♾️
Dreaming about arepas and maria cookies!
View GitHub Profile
# install fsarchiver
# In Fedora/RedHat system's :: yum install fsarchiver sfdisk dd
# In Debian/Ubuntu System :: apt-get install fsarchiver sfdisk dd
DEVICE_TO_BACKUP=/dev/sdb # assuming /dev/sda is where you have booted ur primary OS
mkdir ./backup_with_fsarchiver # create a directory
cd ./backup_with_fsarchiver # enter into newly created directory
# only get the first 512 bytes # read mbr in wiki for more details
dd if=$DEVICE_TO_BACKUP of=mbr count=1 bs=512
sfdisk -d $DEVICE_TO_BACKUP > partition.sfdisk
@foursixnine
foursixnine / md5.sh
Created December 28, 2011 07:33
Generate a md5 hash from a date
perl -M'Digest::MD5 qw(md5_hex)' -e 'print md5_hex("`date +%d%m%y`")'