VMware
3 Replies Last post: Aug 27, 2009 10:16 PM by adamjones  

VMware Server 1.0.2 and LEAF Bering uClibC 3.0.2 posted: Aug 15, 2007 4:49 PM

Click to view aenagy's profile Enthusiast 95 posts since
Mar 27, 2005
I have figured the process to create a bootable LEAF Bering uClibC 3.0.2 floppy image that will work with VMware Server 1.0.2. Many thanks to KP Kirchdoerfer-2.


Goal

Create a bootable floppy image of LEAF Bering uClibC 3.0.2 that will work with VMware Server 1.0.2. This boot floppy is a bare minimum configuration to establish TCP/IP connectivity and therefore confirm compatibility.

All other modules and tools have been removed for simplicity. This means that there is no firewall, routing, SSH client or server, DHCP, DNS, etc. It will be up to the user to configure or add any additional functionality. Information on configuring or adding additional functionality can be found on the LEAF Bering uClibC web site (http://leaf.sourceforge.net/doc/index.html) on in various news groups (http://www.nabble.com/LEAF---Linux-Embedded-Appliance-Firewall-f4454.html). Follow the instructions for Bering uClibC 3.

Assumptions

1. This procedure assumes that the user is new to LEAF Bering uClibC and may be unfamiliar with some of its subtlities. For example, the bin 'Bering-uClibc_3.0.2_iso_bering-uclibc-iso.bin' file on the download page (http://sourceforge.net/project/showfiles.php?group_id=13751&package_id=67534) is actually an ISO file. Renaming the file with a .ISO extention makes it usable as a boot media for VMware Server. Its contents can be extracted using WinImage.
2. The entire procedure as explained here assumes that the user is operating from Microsoft Windows. In the author's case Windows XP Professional with Service Pack 2 is used. The version of Microsoft Windows must be compatible with the VMware product being used, in this case Server 1.0.2.
3. Even though VMware Server 1.0.2 is used in this example there is no known reason why this could not equally well in other VMware products such as Player, Workstation or ESX Server. This solution has not been tested on other VMware products or other virtualization solutions.
4. VMware products do not recognize floppy images or physical floppy disks larger than 1.44 MB. Therefore the 1.68 MB floppy image available for download is not suitable. The user will be directed to extract the file 'bootdisk.ima' from the ISO file Bering-uClibc_3.0.2_iso_bering-uclibc-iso.bin as this image is already formatted for 1.44 MB. See the procedure section on how to do this.
5. The author's test network consists of a DSL router with the LAN interface configured for the subnet 192.168.1.0 and subnet mask of 255.255.255.0 and default gateway of 192.168.1.1. The reader will need to adjust the procedure below to account for any differences where shown.
6. Setting up or troubleshooting network connectivity of the user's Windows system out of scope for this document.

Prerequisites

1. Microsoft Windows. The user may consider downloading a trial version of Windows Server 2003 from http://www.microsoft.com. This has not been tested by the author. The version of Windows must be compatible with VMware Server 1.0.2.
2. The Windows system must be properly configured for network connectivity. The default gateway must be pingable.
3. VMware Server can be downloaded from http://www.vmware.com.
4. A floppy disk image editor. The author used a trial copy of WinImage which can be downloaded from http://www.winimage.com.
5. A text editor suitable for modifying Linux/Unix text files. Microsoft WordPad might work, but was not tested by the author. The author used PSPad for editing text files. It is available for download from http://www.pspad.com.

Procedure

1. Download 'Bering-uClibc_3.0.2_iso_bering-uclibc-iso.bin' from the LEAF Bering uClibC download site (http://sourceforge.net/project/showfiles.php?group_id=13751&package_id=67534).
2. Download and install the necessary tools.
3. Open the file 'Bering-uClibc_3.0.2_iso_bering-uclibc-iso.bin' with WinImage.
4. Extract the 'bootdisk.ima' file and save to your working folder such as 'E:\my_new_boot_disk'. This is now the start of the new floppy image.
5. Extract or edit a copy of 'syslinux.cfg' in floppy image to look like the text below and save in work folder. Remember to use a Linux/Unix compatible file editor such as PSPad or WordPad. The last line starts with 'default linux' and may be wrapped as shown below.

display syslinux.dpy
timeout 0
append reboot=bios
default linux initrd=initrd.lrp init=/linuxrc rw root=/dev/ram0 LEAFCFG=/dev/fd0:msdos boot=/dev/fd0:msdos

6. Extract or edit 'leaf.cfg' in floppy image to look like this and save in the work directory. Remember to use a Linux/Unix compatible file editor such as PSPad or WordPad.

LRP='root config etc local modules'
PKGPATH=/dev/fd0:msdos
syst_size=16M
log_size=4M

7. Extract the modules 'configure.lrp', 'etc.lrp', 'initrd.lrp', 'local.lrp', 'moddb.lrp', 'modules.lrp' and 'root.lrp' from the same bin/ISO file from which the initial floppy image was extracted in step 1 and save in work folder.
8. Open the working copy of 'bootdisk.ima' using WinImage. Add the extracted modules plus the new 'syslinux.cfg' and 'leaf.cfg'. Overwrite files when prompted. Save and close floppy image file to work folder.
9. Create a new floppy image using WinImage.
10. Find the module 'pcnet32.o' from the bin/ISO image and add it to this new floppy image. Save and close this floppy to work folder. Do not add this module to the 'bootdisk.ima' floppy image.
11. Create a new virtual machine in VMware Server 1.0.
12. Copy the two floppy image files to the new virtual machine folder.
13. Configure the virtual machine for:

CPU = one
RAM = 32 MB
NICs = 2 or more. The first NIC must be configured as 'Bridged' so that it has connectivity to DSL router
HDD = none
Floppy = boot floppy file 'bootdisk.ima' in the virtual machine folder
Add Floppy 2 = second floppy device to use the second floppy image created in step 6.

14. Power on the virtual machine. If the virtual machine is configured correctly it will boot from the 'bootdisk.ima' in the virtual machine folder.
15. Log in as root. The tool 'lrcfg' will launch automatically.
16. In lrcfg enter '3' for 'Packages configuration', '3' for 'modules', '1' for 'kernel modules to load at boot' which brings up '/etc/modules/' in the e3 editor.
17. Remove comments for 'crc32', 'mii' and 'pcnet32'. Save (<Ctrl-s>) and exit (<Ctrl-q>) editor.
18. Quit back to main lrcfg screen.
19. Enter '1' for 'Network configuration'. Enter '1' for 'interfaces file'. The file '/etc/network/interfaces' is opened in the e3 editor. Make changes to to match the following:

auto eth0
iface eth0 inet static
address 192.168.1.3
#or some other IP address not in use and on the same subnet as the DSL router
netmask 255.255.255.0
#must be same as LAN subnet of DSL router
broadcast 192.168.1.255
gateway 192.168.1.1
#or whatever the default gateway is for your DSL router

auto eth1
iface eth1 inet static
#address can be changed to suite user's requirements for private subnet
address 10.1.1.1
netmask 255.255.255.0
broadcast 10.1.1.255

# repeat for each NIC configured on the virtual machine

20. To save the changes press <Ctrl-s>, to quit press <Ctrl-q>.
21. Quit back to main lrcfg screen.
22. Enter 's' to 'Save configuration'. Enter 'y' when prompted.
23. Exit to command prompt.
24. Mount second floppy disk which contains a copy of pcnet32.o with the command:

mount -t msdos /mnt /dev/fd1

25. Copy 'pcnet32.o' from second floppy to '/lib/modules' with the command:

cp /mnt/pcnet.o /lib/modules

26. Launch lrcfg, enter 'm' for 'Backup modules'. Enter 'y' when prompted.
27. Reboot the system with the command:

init 6

28. Once the system reboots log in as root again and exit from lrcfg.
29. Check the configuration of the network interfaces with the command:

ip address show

30. Check connectivity to the DSL router by pinging the default gateway with the command:

ping 192.168.1.1

Acknowledgements

KP Kirchdoerfer-2 provided key information in cracking this case.
http://www.nabble.com/Does-Leaf-works-on-VMWARE-tf3138468.html

LEAF COMMAND FAQ
http://sourceforge.net/docman/display_doc.php?docid=9267&group_id=13751

Re: VMware Server 1.0.2 and LEAF Bering uClibC 3.0.2

1. Sep 4, 2007 12:28 PM in response to: aenagy
Click to view Mr. Dirt's profile Lurker 1 posts since
Sep 4, 2007
It appears that there are some items omitted on this posting. Item #16, If following the instructions completely, once you select the first option 3, you will only get options 1 and 2, there is no option 3 for "Modules". Therefore you cannot complete item #17. Plus the items near option 24 will not work. This may be due to the omission of item #17. Otherwise, the instructions seem straight forward. Any assistance on this would be greatly appreciated.

Thanks,

Re: VMware Server 1.0.2 and LEAF Bering uClibC 3.0.2

2. Sep 13, 2007 2:49 PM in response to: aenagy
Click to view Slowboat's profile Lurker 1 posts since
Jun 30, 2007
Does any one know how to get Bering uClibC 3.0.2 to boot from a vmware hhd?

Re: VMware Server 1.0.2 and LEAF Bering uClibC 3.0.2

3. Aug 27, 2009 10:16 PM in response to: Slowboat
Click to view adamjones's profile Novice 10 posts since
Dec 10, 2007

It the same process for a virtual machine as it is for a physical one (provided you're using Vmware server or Workstation). You have to feed the virtual machine an IDE HDD. And from that point it becomes the same as:

http://leaf.sourceforge.net/doc/buci-ide3.html

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities