Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
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. –  Trevor Robinson Oct 3 '12 at 20:26
add comment

1 Answer 1

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
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.

share|improve this answer
add comment

Your Answer

 
discard

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.