Hello!
I just finished compiling the linuxboot ISO on a brand new CentOS 5
install. There were a few difficult areas, so I wanted to document it for
others, and maybe get one or two of them fixed. Here is what I did:
I installed a minimal CentOS 5 system. I then installed the needed tools
using yum:
yum install samba subversion gcc gcc44 flex bison gcc-c++ mkisofs
I then did a full update (as of 2010/06/21):
yum update
shutdown -r now
I then created a directory for my Unattended install and downloaded the
trunk via Subversion (as of 2010/06/21):
mkdir /data
mkdir /data/unattended
cd /data/unattended
svn checkout
https://unattended.svn.sourceforge.net/svnroot/unattended/trunk/
I then started the process of building the ISO:
cd trunk/linuxboot
make download
(Wait a while...)
make iso
This is where I ran into my first difficulty. The Linux kernel will
compile successfully, but glibc will not. It fails with a configure
error: missing cpuid.h. CentOS 5 is using GCC 4.1. I needed to install
GCC 4.4 (which I added above) and change the make command:
make CC=gcc44 iso
(NOTE: For those following along at home, I also do a "rm -rf <failed
package directory> & make download" so as to start with a clean compile
each time.)
Now, I ran into a second error: The glibc compile fails with an undefined
reference to `__sync_bool_compare_and_swap_4' because the target is i386,
but the system it's running on is i686. I would *prefer* that the glibc
be compiled for i386, but I couldn't figure out how to make that work. So,
instead, I had to compile glibc for i686:
CFLAGS="-march=i686" make CC=gcc44 iso
My next error: DOSEMU will not compile with GCC >= 4.3! So, after the
DOSEMU compile failed, I had to again modify the command back to:
make iso
My next error: pciutils won't compile. It won't use the glibc 2.7
compiled above to resolve symbols, so it gives me an unresolved symbol
error, which I seem to have neglected to record. In any case, I could not
correct this with a change to the command line. Rather, to fix it, I had
to modify the pciutils Makefile:
Find the following line: lspci: lspci.o ls-vpd.o ls-caps.o
ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o lib/$(PCILIB)
Add the following after lspci:
/data/unattended/trunk/linuxboot/stage1/lib/libc.so
The complete line will be:
lspci: /data/unattended/trunk/linuxboot/stage1/lib/libc.so lspci.o
ls-vpd.o ls-caps.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o
lib/$(PCILIB)
Restart the compile. pciutils compiles successfully, but now I get an
error in zlib! It tells me that my system does not support shared
libraries, and therefore there is nothing to do to build the target of a
shared library! This time, I had to change the linuxboot Makefile:
Find "zlibc " (with a space) to take you to the zlib section of
the Makefile
Scroll down and find the line: && CC="$(CC)" CFLAGS="-O
$(fakelib_cflags)" \
Remove the "$(fakelib_cflags)" part. The line would then be be:
&& CC="$(CC)" CFLAGS="-O " \
Restart the compile, and it finally finishes the compiles and generates a
linuxboot.iso.
(In the interest of completeness, here is a brief summary of the changes I
made to minimally configure the rest of the system to test the CD:)
Add a share to Samba
Add the guest user account
Start the Samba server
Run prepare (and wait a long while! :) )
Copy a Window XP i386 directory to the server
I then booted the newly-created CD and ran through the wizard (using the
nt5x installer, not DOSEMU) successfully--at least, I got to the Window XP
GUI install portion...
There are a few areas where I would appreciate some help:
1) How do you handle the conflict where glibc won't compile with GCC older
than 4.3, and DOSEMU won't compile with GCC 4.3 or newer? Is there a
cleaner way than simply waiting for things to fail and change compilers?
2) Can the linuxboot Makefile be modified to properly handle
cross-compiling glibc for i386 on a system configured for i686? Or is
there a package I need on my CentOS 5 system to add the i386 atomics?
3) Is there a cleaner way of adding the newly-compiled glibc library to
the pciutils Makefile? Could that be added to the linuxboot compile
process?
4) Is there a better way of getting zlib to realize that the system *will*
handle shared libraries than just tearing out the fakelib? I'm afraid
that I'm ending up with a zlib that won't work within the boot CD
environment.
5) I *very* much miss the way that previous CD's automatically booted into
the kernel! Seeing as I'm compiling my own, I can change it, but I do not
understand why it was made to simply pause there forever, at a menu with a
*single* choice. When you're installing 20 systems at a time, having to
either wait or go back to the systems just to press <ENTER> is more than a
little annoying...
In any case, I believe I have a working boot CD. Hopefully, this
walkthrough will save someone else some time and aggravation.
Timothy J. Massey
Out of the Box Solutions, Inc.
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
unattended-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unattended-devel