Bering
Home
About
Developing
   Section 1
   Section 2
   Section 3
   Section 4
   Section 5
   Section 6
   Section 7

Search Web Pages




5. Using a virtual LEAF/Bering router

5.1. Installation

First of all create a new non-root account (e.g. leafuml) and login to that account. Then:

a) Download a 2.4.XX-YY UML kernel from the Leaf_UML section of the LEAF download area. Unpack it and make executabe:

cd /home/leafuml
bunzip2 linuxuml-2.4.X-YY.bz2
chmod 755 linuxuml-2.4.X-YY

b) Download the latest LEAF/Bering disk image (Bering_v1.0-xxx_img_bering_1680.bin) from the Bering section of the LEAF download area.

As root mount this Bering disk image by issuing:

su
cd /home/leafuml
mount -o loop -t msdos Bering_v1.0-xxx_img_bering_1680.bin /mnt

c) Create a Bering minix filesystem, populate it with all the *.lrp files and give it the proper file permissions:

cd /home/leafuml
dd if=/dev/zero of=Bering_fs bs=1k count=2000
/sbin/mkfs.minix Bering_fs
mount -o loop Bering_fs /mnt1
cp /mnt/*.lrp /mnt1
umount /mnt1
chown leafuml Bering_fs
chmod 666 Bering_fs

d) Return to the leafuml (non root) account. Then copy out of /mnt the following file:

exit
cd /home/leafuml
cp /mnt/initrd.lrp .

e) Now umount /mnt (as root), return to your leafuml (non root) account and create a startuml script as follow (adjust to your taste):

#!/bin/sh
./linuxuml-2.4.XX-YY ubd0=Bering_fs initrd=initrd.lrp root=/dev/ram0 \
init=/linuxrc boot=/dev/ubd0:minix PKGPATH=/dev/ubd0 devfs=nomount \
LRP=root,etc,local,log,modules,shorwall

f) chmod 755 startuml.You can now fire-up your virtual router:

./startuml

Et voila ! Three term screens will pop up and you will be able to login to your virtual Bering machine!

5.2. Tips

Do not forget: you must have xterm installed on your machine. UML won't accept the variants (aterm, rxvt and the like)

Read the nice UML documentation and adjust the startuml script to you taste.

Note that if you backup initrd.lrp it will be saved in the Bering_fs filesystem. Copy it outside the filesystem for the changes in this package to be taken into account (see above).

The cursor of the Bering ae aeditor does not show up without some tweaking. In your host machine create a /usr/local/bin/umlxterm containing:

#!/bin/sh

Make umlxterm executable (chmod 755 umlxterm). Then modify your startuml script to include an "xterm=umlxterm" statement:

#!/bin/sh
./linuxuml-2.4.XX-YY xterm=umlxterm ubd0=Bering_fs initrd=initrd.lrp \
root=/dev/ram0 init=/linuxrc boot=/dev/ubd0:minix PKGPATH=/dev/ubd0 \
devfs=nomount LRP=root,etc,local,log,modules,shorwall

This time you should see your Bering router in a nice blue window, text in white and cursor in yellow. Adjust to your taste!

  • Created on 2004-03-26 12:25:13 by mhnoyes
  • Updated on 2004-03-27 08:41:22 by mhnoyes

 Printable Version


Hosted on Get LEAF Linux Embedded Appliance Framework at SourceForge.net. Fast, secure and Free Open Source software downloads, and powered by phpWebSite.