As far as I know there is no way to tell dd to pad using 0xFF. But there is a workaround.
First create a file of required size filled with 0xFF:
$ dd if=/dev/zero ibs=1k count=100 | tr "\000" "\377" >paddedFile.bin
100+0 records in
200+0 records out
102400 bytes (102 kB) copied, 0,0114595 s, 8,9 MB/s
dd is used to create a stream of zeroes with the required size. then tr is used to replace the zeroes with 0xFF. tr expects arguments in octal. \377 is octal for 0xFF.
alternatively you can use head for byte precise size
$ head -c 131072 /dev/zero | tr "\000" "\377" >paddedFile.bin
and to be extra safe set the locale for tr because in some cases it is locale dependent
$ head -c 131072 /dev/zero | LANG=C tr "\000" "\377" >paddedFile.bin
Result:
$ hexdump -C paddedFile.bin
00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00019000
Then insert the input file at the beginning of the "padded" file:
$ dd if=inputFile.bin of=paddedFile.bin conv=notrunc
0+1 records in
0+1 records out
8 bytes (8 B) copied, 7,4311e-05 s, 108 kB/s
Note the conv=notrunc which tells dd to not truncate the output file.
Example input file:
$ hexdump -C inputFile.bin
00000000 66 6f 6f 0a 62 61 72 0a |foo.bar.|
00000008
Result:
$ hexdump -C paddedFile.bin
00000000 66 6f 6f 0a 62 61 72 0a ff ff ff ff ff ff ff ff |foo.bar.........|
00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00019000