

NOTE: I will be using SystemRecueCD with the autorun file.

Anyway, here is how my partition is setup.

I wish that I was a Linux guy, but I am not. I am asking because I was handed a project where I have to create an image and send it to one of our clients to reimage 150 computers using USB flash drives. This is my first day here and would appreciate it if you can assist me with couple autorun files (backup and restore). "ĭd if=/dev/sda conv=sync,noerror | pv -s $HARDDISKSIZE | gzip -c -fast | split -d -a 3 -b 2048m - $BACKUPDIR/.Įcho "Backup Complete. Sfdisk -dx /dev/sda > $BACKUPDIR/Įcho "Using dd + split + compression to backup the disk. (mount.cifs -o "username= $USERNAME,password= $PASSWORD " "// $SERVER " " $DIRECTORY_BASE " /mnt/backup || true)Įcho "creating backup directory on server "ĭd if=/dev/sda of= $BACKUPDIR/MBR.img bs=32768 count=1 If there are multiple hard disks, the others will be ignored "Įcho "Trying to mount network drive (attempt $counter of 25) " HARDDISKSIZE= $(blockdev -getsize64 /dev/sda )Įcho "Size of Hard Disk in bytes: $HARDDISKSIZE " HARDDISK= $(ls /dev/sda 2> /dev/null || true ) MACADDR= $(ls /sys/class/net/ */address | grep -v lo | sort | head -1 | xargs cat | perl -pe 's/:/-/g ' )īACKUPDIR= "/mnt/backup/ $MACADDR/ $DATE " DIRECTORY_BASE= "/fab/office/imaging/other/autoback "
