sudo sfdisk -f $device -uM >& /dev/null << EOF
$rootfs_par_offset,$rootfs_size,83
$at6600bin_par_offset,$at6600bin_size,83
$at6600data_par_offset,$at6600data_size,83
$userdata_par_offset,,83
EOF
>& /dev/null : 重定向command 的stdout 到/dev/null
<< EOF EOF : list string
sfdisk : -f force
reads lines of the form : <start> <size> <id> <bootable> <c,h,s> <c,h,s>
Fields are separated by whitespace, or comma or semicolon possibly followed by whitespace; initial and trailing whitespace is ignored. Numbers can be octal, decimal or hexadecimal, decimal is default. When a field is absent or empty, a default value is used.
The <c,h,s> parts can (and probably should) be omitted - sfdisk computes them from <start> and <size> and the disk geometry as given by the kernel or specified using the -H, -S, -C flags.
Bootable is specified as [*|-], with as default not-bootable. (The value of this field is irrelevant for Linux - when Linux runs it has been booted already - but might play a role for certain boot loaders and for other operating systems. For example, when there are several primary DOS partitions, DOS assigns C: to the first among these that is bootable.)
Id is given in hex, without the 0x prefix, or is [E|S|L|X], where L (LINUX_NATIVE (83)) is the default, S is LINUX_SWAP (82), E is EXTENDED_PARTITION (5) , and X is LINUX_EXTENDED (85).