Hi all.
What follows is a short howto of how to get a Ubuntu root filesystem suitable for EFIKA.
------
This text explains how to get Ubuntu Linux running on the EFIKA.
The actual Ubuntu kernel is not yet used, this will come soon.
Method 1: The hard way, no available PowerPC machine.
---------
This installation assumes you have an EFIKA without an OS installed, but you have access
to a PC (non PowerPC) with Linux installed.
1) Get QEmu and compile with support for PowerPC. Important: compile static binary!
2) - Make sure your kernel supports binfmt_misc
- mount it: mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
- Register QEmu with it:
echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-ppc:' > /proc/sys/fs/binfmt_misc/register
3) Install debootstrap and dpkg
4) Create the minimal Ubuntu system with debootstrap:
debootstrap --arch powerpc feisty /nfsroot/home/ubuntu/
http://archive.ubuntu.com/ubuntu
This step is why you need QEmu, as debootstrap will chroot into the newly created rootfs.
Note: I'm assuming you will use this initially over NFS. This implies you have to have NFS installed and configured too.
5) If debootstrap completed successfully, you can start the EFIKA with a PowerPC kernel (the Debian kernel from efika.info for instance).
-BREAK-
Something about NFS for those who might find it confusing. NFS is a network filesystem which allows you, among others, to mount
a remote directory as if it were a local drive. Call it sharing. Linux can have it's root filesystem (i.e., all the stuff you
need besides the kernel to do interesting stuff) on such an NFS share.
If you want to move an NFS root filesystem to a harddrive, you just have to copy it. Hence, there is not a big difference
between using NFS in this case, or a harddrive. It was just easier for me and for the project I'm involved in to use NFS.
-END BREAK-
Method 2: Easy, with PowerPC machine available.
---------
This installation assumes you have an EFIKA with Linux (HD or NFS) or another PowerPC machine.
Again, this assumes an NFS root. You can initialise and copy the filesystem to Harddrive afterwards.
1) Install debootstrap and dpkg
2) create the Ubuntu minimal system:
debootstrap --arch powerpc feisty /wherever/you/want
http://archive.ubuntu.com/ubuntu
Note for NFS users: There is a bug with dpkg which results in an error like this:
"dpkg: unable to lock dpkg status database: No locks available"
To get around this, you have to mount a loop filesystem and create the Ubuntu system there with debootstrap.
* create a filesystem:
- dd if=/dev/zero of=./filesystem bs=1k count=1000k (1GB is more than enough, can be less)
- mkfs.ext3 ./filesystem
- mount -o loop ./filesystem /wherever/you/want
- debootstrap --arch powerpc feisty /wherever/you/want
http://archive.ubuntu.com/ubuntu
Afterwards, you can copy this rootfs wherever you want and unmount the loop filesystem.
3) Start the EFIKA with a PowerPC kernel
----
OK, this may all sound too much. For that reason I have a ready made, absolutely basic Ubuntu rootfs which is hosted here:
http://robotics.puv.fi/efika/ubuntu.tar.gz
(file is about 100MD in size. Once unpacked it takes up about 200MB.
You can copy this to harddrive or to flash drive or even NFS and boot from it, after which apt-get can get you all the other stuff you need.
Best regards,
Johan
_________________
Johan Dams, Genesi USA Inc.
Director, Software Engineering
Yep, I have a blog...
PurpleAlienPlanet