[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

biarch using alioth - works and boots

I've just finished bringing up a biarch partition from scratch,
taking the opportunity to verify that the instructions work fine.
These are my notes below, not a console script of what I really did.
Within the new biarch, with the new biarch kernel, I can recompile the
kernel and the new new kernel works too.  "kernel-package" doesn't.
Also, the new kernel doesn't change my gcc problems with pure64.

Fetch, build and install the patched version of cdebootstrap from alioth
wget http://debian-amd64.alioth.debian.org/pool/main/c/cdebootstrap/cdebootstrap-
tar -xzf cde*
cd cdebootstrap-0.1.2/
dpkg -i ../cde*.deb

Get a partition that is going to become your biarch environment
mkdir /biarch
mount -t ext3 /dev/hda3 /biarch

Create an extremely basic and generic debian system - 32arch
cdebootstrap -a amd64 woody /biarch http://ftp.us.debian.org/

Bring over a viable 32arch kernel configuration
cp /usr/src/linux-*/.config /usr/src/patch* /biarch

Now chroot into there, and fix up the stuff that bootstrap doesn't do
cp /etc/fstab /etc/hostname /etc/resolv.conf /biarch/etc
cp /etc/network/interfaces /biarch/etc/network
chroot /biarch bin/bash
echo > /etc/apt/sources.list deb http://ftp.us.debian.org/debian/ stable main contrib non-free echo >> /etc/apt/sources.list deb http://debian-amd64.alioth.debian.org/ sarge main

Now allow the install of 32arch and biarch to proceed to completion
apt-get update
apt-get upgrade
apt-get install wget bzip2 libncurses5-dev

Deal with the side effects of this being a secondary environment
touch /etc/printcap
apt-get install lprng ssmtp
dpkg --purge lilo

Get the gcc.bart since we are still only running a 32arch kernel
cd /usr/bin
wget http://www.jukie.net/~bart/debian/amd64/scripts/gcc.bart
for c in gcc g++; do mv $c $c.org; ln -s gcc.bart $c; done

Bring in the stuff to be able to compile the kernel
cd /usr/src
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.5-rc2.tar.bz2
mv /.config /patch* .
tar -xjf linux*
cd linux-2.6.5-rc2
mv ../.config .
for f in ../patch*; do patch -p1 <$f; done

Now actually compile the kernel and put it somewhere obvious
for c in oldconfig menuconfig bzImage; do make HOSTCC="gcc -m32" ARCH="x86_64" $c; done
cp arch/x86_64/boot/bzImage /boot/vmlinuz
ln -s /boot/vmlinuz /

Go leave the chroot, fix up the lilo configuration, reboot and try it out
echo >>/etc/lilo.conf image=/biarch/vmlinuz label=bi optional root=/dev/hda3 append="pci=noacpi"
lilo -R bi

When it comes up, log in as root with password above and rebuild the kernel ...
[rest omitted]

Reply to: