I need to routinely do these steps on various machines that have the same hardware:
- delete any partitions on /dev/sda
- create a 100G primary partition on /dev/sda
- change partition type of created partition to linux raid auto (type fd)
- write the table
- do the exact same thing for /dev/sdb
I currently use fdisk -u for doing this, but i was thinking, there has to be a way of scripting this? Any ideas?
The parted command has a scripting interface as does the sfdisk command, either of these could be used to do what you want.