First thing, create a i386
chroot using debootstrap
:
debootstrap --arch=i386 sid /chroots http://ftp.fr.debian.org/debian
The target, here /chroots
must be the root directory of a given device -- else booting won't work. Then, you must set up a proper /etc/fstab
file, so it actually can mount things once you've decided to boot it.
Then, for fun, I've decided to cross-compile the kernel I would be using, so, after download/extracting recent kernel source, this is what I did. First, spawn the configuration tool:
make xconfig ARCH=i386 make -j2 ARCH=i386
Then, I copied the kernel images using
cp arch/i386/boot/bzImage /chroots/boot/vmlinux cp arch/i386/boot/compressed/vmlinux.bin /chroots/boot
The latter is important for the kexec
kernel call. I also copied the kernel sources from the current system to the chroot, so as to be able to build kernel modules in the target system. Then, I did use the kexec
utility to boot my new kernel:
telinit 1 kexec -l /chroots/boot/vmlinux.bin --append=root=0342 kexec -e
And there you go !! Then, you probably need to setup new users and also configure the network (try to copy from your current config).
So I did all this, to finally realize that it didn't work any better with a full ia32 system... Pity !
No comments:
Post a Comment