Q:

Detect processor during preseed post-install script

Is it possible to detect the processor, such as by uname -p, from within a preseed post-install script? uname -p returns unknown, and in-target uname -p returns nothing.
I ask because I need to fetch and install an architecture-specific .deb file from within the script.

A:

It turns out that uname is implemented by BusyBox during preseed, and it supports uname -m but not uname -p. You can verify in a normal shell with BusyBox installed:
$ uname -p
x86_64
$ busybox uname -p
unknown
$ busybox uname -m
x86_64

In all the cases I care about, the values happen to be the same.

