I knew you can use something like:
fdisk /dev/sda << EOF n p 1 t 8e q EOFto partition /dev/sda for you with one large partitions and give it type 8e (LVM). (The 'q' is so that those who simply copy this, don't immediately wipe some disk.) But I was looking for somewhat cleaner, more intuitive style. James Stephens pointed out the use of sfdisk from scripts. While I don't know if sfdisk is less reliable than fdisk or parted, or how to handle byte-aligning disks    from these scripts, it's a good place to start and I wanted to document it here.