[TriLUG] Multiboot CD Question

Bill Farrow bill at arrowsreach.com
Mon Mar 22 11:28:14 EDT 2010


> On 3/22/10 9:46 AM, Roy Vestal wrote:
>> I used the CentOS LiveCD howto and minimal kickstart for the LiveCD. I
>> added 'dmidecode' and 'pciutils' to the kickstart packages. I also created a
>> post install to add "prtdiag" script to the disk. I had to modify the
>> prtdiag a little to get it to do what I wanted. Here are the links:

If this CD is a just a tool for gathering diagnostic information, you
can probably do this with a single 32bit (i386) bootable kernel and
filesystem which should run on both 32bit and 64bit "Intel x86"
architectures.

Once booted into Linux you can read the CPU flags from /proc/cpuinfo
to work out if the CPU supports 64 bit ("lm" flag).  For example, in a
bash script you could do this:

  if [ `grep -E -w "lm" /proc/cpuinfo | head -n 1 | wc -l` -eq 1 ];
then echo 64bit; else echo 32bit; fi

Of course you could adapt this script to do other actions, like
automating which HDD image to fetch from a server, etc.

Bill



More information about the TriLUG mailing list