Using a GPT partition table.
apt-get install gdisk rsync parted
parted /dev/sda mklabel gpt parted --align optimal /dev/sda mkpart primary ext4 0% 100% mkfs -t ext4 -L rootfs /dev/sda1
mount /dev/sda1 /mnt rsync -axv / /mnt
blkid /dev/sda1 | awk '{print $6}'
nano /boot/cmdline.txt root=PARTUUID=....... rootdelay=5
reboot
Using a MBR partition table.
apt-get install gdisk rsync parted
parted /dev/sda mklabel msdos parted --align optimal /dev/sda mkpart primary ext4 0% 100% mkfs -t ext4 -L rootfs /dev/sda1
mount /dev/sda1 /mnt rsync -axv / /mnt
blkid /dev/sda1 | awk '{print $3}'
nano /boot/cmdline.txt root=UUID=....... rootdelay=5
mkinitramfs -o /boot/initrd.sda
nano /boot/config.txt initramfs initrd.sda followkernel
reboot