VKernel progress update

Matthew Dillon dillon at apollo.backplane.com
Sat Jan 6 22:15:48 PST 2007


    I'm making very good progress.  The virtual kernel is able to boot
    all the way through to where it mounts the root filesystem and then
    tries to load init.  It is able to find the init binary and start
    loading it before it crashes and burns :-)

    BTW, if anyone wants to fool around or follow my progress, here are
    the instructions for building and using a virtual kernel.  Remember
    that it is going to crash and burn... it's aint ready for prime time
    yet!

    (1) You have to be running the absolute latest HEAD and you have to
	enable virtual kernel operation with a sysctl, and create 
	/var/vkernel to hold miscellanious files.

	sysctl vm.vkernel_enable=1
	mkdir /home/var.vkernel
	ln -s /home/var.vkernel /var/vkernel

    (2) Construct a root filesystem image.  Create a disk file and use
	vnconfig to initialize it:

	dd if=/dev/zero of=/var/vkernel/rootimg.01 bs=1m count=2048
	vnconfig -c -s labels vn0 /var/vkernel/rootimg.01
	disklabel -r -w vn0 auto
	(edit the label to create a vn0a partition)
	newfs /dev/vn0a
	mount /dev/vn0a /mnt
	cpdup / /mnt
	umount /mnt
	vnconfig -u vn0

    (3) Compile and run the virtual kernel binary, and watch the fireworks.

	cd /usr/src
	make buildkernel KERNCONF=VKERNEL
	cd /usr/obj/usr/src/sys/VKERNEL
	./kernel.debug -m 64m -r /var/vkernel/rootimg.01

    I am fairly confident now that I will be able to get the virtual kernel
    to the point where it can run its own user processes by the time we 
    release.

    I have created a /usr/src/sys/dev/virtual infrastructure for device
    drivers, and written a poor-man's virtual disk driver. 

    We need a pseudo network driver written (but of course it won't be
    possible to test it until I am able to boot the virtual kernel all
    the way through to a login: prompt).

					-Matt





More information about the Kernel mailing list