Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
you mean like sudo cat /proc/cpu – LnxSlck Oct 3 '12 at 20:17
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. – Trevor Robinson Oct 3 '12 at 20:26
up vote 0 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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