Creating a Root Filesystem
Nbd root filesystem
On the host
Some of these commands may require you to be root, proceed with caution some commands (especially dd) can make your computer explode, if you mess the arguments up. First you need to create a file to hold the file system, 1GB should suffice for deving and experementing.
$ dd if=/dev/zero of=nbdroot bs=1024 count=1048576 $ mke2fs -i 1024 -b 1024 -m 5 -F -v nbdroot
then we need to mount it, where you mount it doesn't matter I used the Ubuntu standard mounting folder, if you are on debian /mnt is recommended.
$ mount nbdroot -o loop=/dev/loop0 /media/debinstall
if it complains about loop0 not excisting do this
$ mknod /dev/loop0 b 7 0
and the extract the base packages, where <DIST> can be either sarge or sid, where cid is unstable.
debootstrap --arch powerpc <DIST> /media/debinstall/ http://http.us.debian.org/debian
if you did this on another cumputer then the GameCube or a PowerPC computer you will run into a small error.
W: Failure trying to run: chroot /media/debinstall mount -t proc proc /proc
or if you try it manual you will get
$ LANG= chroot /media/debinstall /bin/bash chroot: cannot run command `/bin/bash': Exec format error
no problems just mount it up on the cube using a old filesystem and try it there.
When you have chrooted to it you will need to do something before you boot it the first time.
mknod /dev/nbd0 b 43 0 mknod /dev/nbd1 b 43 1 mknod /dev/nbd2 b 43 2 mknod /dev/nbd3 b 43 3
To create some nbd nodes.