Setup grub on new drive

I always figure this out from scratch each time, this is just a doc of quick copy/paste to make it happen

NEW_DRIVE=/dev/disk/by-label/linux
MNT_POINT=/mnt/temp
sudo mount $NEW_DRIVE  $MNT_POINT

# To copy current OS onto new drive
sudo rsync -a -v -h -P --delete -x / $MNT_POINT/

sudo mount -o bind /dev $MNT_POINT/dev
sudo mount -t proc none $MNT_POINT/proc
sudo mount -t sysfs none $MNT_POINT/sys
sudo mount -t devpts none $MNT_POINT/dev/pts

sudo chroot $MNT_POINT /usr/bin/env NEW_DRIVE=$NEW_DRIVE /bin/bash -l
PART=`realpath $NEW_DRIVE`
DRIVE=`echo $PART | perl -pe 's/^(.*?)[0-9]$/$1/'`
sudo grub-install $DRIVE
sudo update-grub

exit
for m in $MNT_POINT/{dev/pts,dev,proc,sys,}; do sudo umount $m; done
# DONE