Table of Contents

Adding DSL to pxeKnife

Initially, I will add just menu entry, kernel and initramfs. I plan to modify initramfs later to support http mounting.

HTTP mounting

This will involve following things.

  1. Add FUSE module to initramfs.
  2. Add httpfs to initramfs.
  3. Add losetup to initramfs.
  4. Do mounting.

Following Example

Following the example from http://httpfs.sourceforge.net/net_boot.htm, but facing few problems.

  1. httpfs is failing with error
fusermount: failed open /dev/fuse : no such file or directory

When I did ls on /dev/fuse I got following output

/dev/fuse ??

Note: the ls used in this case is from initramfs and hence may not handle extreme cases properly.

Solution

It seems, I need to create /dev/fuse myself. When I did

# ls -l /KNOPPIX/dev/fuse
crw-rw-rw- 1 root root   10, 229 May 22 2006 /KNOPPIX/dev/fuse

and created the node with

mknod fuse c 10 229

with this, I am able to mount the remote KNOPPIX.

loading KNOPPIX over HTTP

if I start DSL and if does not find the KNOPPIX anywhere, then it gives a emergency shell. I have written a following script that can be run from that shell and it will load the KNOPPIX on /cdrom/

#!/static/sh
insmod /modules/crc32.o
insmod /modules/8390.o 
insmod /modules/mii.o 
insmod /modules/ne2k-pci.o 
insmod /modules/pcnet32.o 
insmod /modules/r8169.o 
insmod /modules/e100.o 
insmod /modules/e1000.o 
insmod /modules/sis900.o 
insmod /modules/via-rhine.o 
insmod /modules/8139too.o 
insmod /modules/af_packet.o
ifconfig lo 127.0.0.1 up
ifconfig eth0 up
udhcpc -s /static/udhcpc.sh 1
insmod /modules/fuse.o
echo "testing networking"
mkdir /ntest
httpfs http://145.116.233.189/reach /ntest
echo "checking content"
cat /ntest/reach


echo "mounting KNOPPIX"
mkdir /cdrom/KNOPPIX
httpfs http://145.116.233.189/KNOPPIX /cdrom/KNOPPIX

This script is invoked automatically from linuxrc.
I have also added the busybox in /static/busybox and it supports meny commands.
Networking can be tested with wget but one need to give IP address as URL's are not supported right now.

# wget http://145.116.233.189/reach
# cat reach

# mount
rootfs / rootfs rw 0 0
/dev/root.old / ext2 rw 0 0
/proc /proc proc rw 0 0
/dev/pts /dev/pts devpts rw 0 0
httpfs /ntest fuse rw,nosuid,nodev,user_id=0,group_id=0 0 0
httpfs /cdrom fuse rw,nosuid,nodev,user_id=0,group_id=0 0 0

It shows that KNOPPIX is available and networking is working fine

Mounting the KNOPPIX

Now, one of the question is when do I call loader.sh from within linuxrc?
Here is the code for linuxrc
My guess is that I just need to find correct place, and then it should happen automatically.

Finally, I got it working. the modified linuxrc file is here.
and latest one which works with [http://rom.etherboot.org/share/pravin/pxeknife/]] is here

Test the linux over HTTP

[http://rom.etherboot.org/share/pravin/pxeknife/]]