Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have custom distribution of CentOS Linux 6.3. The installed system needs CPU support for AES-NI for all services to work properly.

Can I add a check for AES support during the installation? I'm using Anaconda, but am willing to consider other ways to do it as well.

share|improve this question
add comment

2 Answers

Check /proc/cpuinfo for aes in flags. Alternatively, you could try loading the aesni-intel module (which might fail if unsupported), and/or check /proc/crypto if it lists aes as the aes-ni flavour.

share|improve this answer
    
+1 for /proc/crypto –  warl0ck Feb 8 '13 at 15:10
    
I need get this information before OS installation. I want that installer check this CPU options. –  Cucumber Feb 8 '13 at 15:16
    
So... doesn't this installer run in a Linux environment? Or your question is how to make this particular installer run additional checks in general? –  frostschutz Feb 8 '13 at 15:52
add comment
up vote 0 down vote accepted

Thanks Michael Hampton for this answer:

This would require a kickstart script to be used. Fortunately the kickstart script need only be trivial. You may use this alone (for an otherwise normal interactive installation) or as part of an existing kickstart script.

%pre --erroronfail
#!/bin/sh
grep -q aes /proc/cpuinfo || exit 1
%end

If the CPU doesn't show this feature, the script will error exit and the installation will stop.

share|improve this answer
    
I'd go for grep -q -E '^flags.* aes( |$)' or similar. Might be overkill, but grepping aes verbatim may in theory cause false matches if those letters occur elsewhere. –  frostschutz Feb 8 '13 at 16:17
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.