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.

  • you mean like sudo cat /proc/cpu
    – LnxSlck
    Oct 3, 2012 at 20:17
  • 1
    Sort of (assuming you mean /proc/cpuinfo), but even accessing /proc from preseed sounds complicated. Then you have to parse out the architecture yourself by grepping for various keywords that identify x86-32, x86-64, ARM, etc. Oct 3, 2012 at 20:26

1 Answer 1


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
$ busybox uname -p
$ busybox uname -m

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.