Recently used yum3 to create an FC4/x86_64 rootfs. It should be easily modifiable to create an x86 fs.
Here begins the process that took some time to figure out, with lots of help from the lists and others.
Fix pthreads in FC4
As of 2006-03-08, Blaisorblades binaries include the TLS patch(es) needed to overcome the NPTL issues (patches by Jeff Dyke I believe. Well done this was hard.).
I have run the bsx-tls kernels with a slightly modified RedHat Enterprise Linux 4 rootfs originally installed in VMWare (completely standard install, then hacked at /dev for the uml devices).
e2fsck grumbles because it thinks the root device is /dev/ubd/0 not /dev/ubda (hack /etc/rc.sysinit and code a symlink).
To be done: test FC4 rootfs in the same way.
Skip the rest of this section!
mount the root_fs (leave it mounted for the steps needing root_fs: precise details depend on your layout)
mount -t ext3 root_fs.fc4 mnt/ -o loop
cd mnt/lib
cp -R obsolete/linuxthreads/*.so .
there's an i686 revision too which you might like to try out.
I've been finding that RPM (in particular) doesn't like it when /lib/i686 is present. I've moved mine to /lib/i686.moved and this work better now.
After upgrading glibc and glibc-common I had to move /lib/i686 again to /lib/i686.moved (or anything really).
rm libpthread.so.0
ln -s libpthread-0.10.so libpthread.so.0
More recently I've found that lots of things call /sbin/ldconfig which rejigs all my soft links again back to the originals (mostly rpm and yum, but other things too). So I've now moved /sbin/ldconfig to /sbin/ldconfig-orig and put a shell script in it's place. This completely solves the pthread thing once and for all!
Here's my fixlib.sh called by the new ldconfig replacement.
Add a tty device in for the inittab and stop X from starting.
mknod -m 660 console c 5 1
Do this in the root_fs's /dev directory
edit /etc/inittab
0:2345:respawn:/sbin/mingetty tty0
Comment all other vc/x and tty4 etc. etc. out. Don't want them.
#x:5:once:/etc/X11/prefdm -nodaemon
MyInitTab
Add the modules from the kernel into the root_fs
make modules_install INSTALL_MOD_PATH=mnt/ ARCH=um SUBARCH=i386
Jig the /etc/rc.d/rc.sysinit
Again as of 20060308 this is no loner needed. The only issue I see is / is /dev/ubda not /dev/ubd/0 as rc.sysinit figures out, so it fsck's the wrong device. Just add a line of code before it tries to check the root device like mkdir /dev/ubd; ln -sf /dev/ubda /dev/ubd/0 and everything starts up correctly. The ubd dir seems to be deleted on every boot. Don't do the rest of this section anymore.......
Comment out lines. Needed because of static linkages to wrong threads library (so I believe).
Everything to do with fsck (lot of stuff).
This remains a problem because I don't know how to e2fsck a COW fs from the host.
You can fsck your non-COW file systems from the host with e2fsck filename.
2 lines with nash in them
MySysInit
Comment out pam_loginuid.so in /etc/pam.d/login
#session required pam_loginuid.so
Don't ask. Just do this in blind belief.
umount the root_fs
First time run of your new FC4 virtual computer!
/home/phill/linux-2.6.12/linux single mem=160m mode=skas0 ubda=cow.vm1,root_fs.fc4 ubdb=swap root=/dev/ubda con=pty con0=fd:0,fd:1 eth0=tuntap,vm1,,
ethernet setup is beyond the scope of this wiki page..... I have 32 IP address allocated for 32 machines.
Change the root password right now!
Change the networking details.
type exit.
Congratulations, your new UML is now running and listening on the ethernet with sshd.