by Falcon of tinylab.org
2015/05/02
Brief introduction
The lab environment for Linux 0.11 in five minutes describes how to quickly build a Linux 0.11 lab environment.
This article describes how to quickly build a host-independent Linux 0.11 lab environment that can be used on any operating system hosting development machine and will be very handy for all types of students to learn Linux 0.11, this article only describes Ubuntu. You can start with VirtualBox + Boot2docker under Windows and Mac.
The following requirements have been installed for git and Docker, if not installed please install first:
Install Git
$ sudo apt-get install git
Installing Docker
$ sudo apt-get install Software-properties-common # Add add-apt-repository command $ sudo apt-get install Python-software-propert IES $ sudo add-apt-repository ppa:dotcloud/lxc-docker # Add a PPA source, such as: ppa:user/ppa-name$ sudo apt-get-y update$ sudo apt-get Install Lxc-docker
Pull down the Linux 0.11 lab environment
$ git clone https://gitlab.com/tinylab/linux-0.11.git
Build a separate lab environment from Docker
$ cd linux-0.11$ Docker build-t Tinylab/linux-0.11-lab.
Start a Docker container with an experimental environment
$ container_id=$ (Docker run-d-P 6080:6080 dorowu/ubuntu-desktop-lxde-vnc)
Get the password for the lab environment
$ docker Logs $CONTAINER _id | Sed-n 1p User:ubuntu Pass:ubuntu
Note : The login password is Pass
after the string, here is ubuntu
.
Remote Login Experiment Environment
- Login on the Local host
- Http://localhost:6080/vnc.html
Telnet
Get the IP address of the container that the lab environment belongs to
$ docker exec 8222763de ifconfig eth0 | grep "inet addr:"inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
Access Address:http://172.17.0.1:6080/vnc.html
Simple to use
Once logged in, there is no need to install any additional tools, as the Docker container was built by default. So the usage is slightly different from the experimental environment that builds Linux 0.11 within five minutes. The basic steps are as follows:
- After logging in, navigate through the boot menu in the lower left corner, locate
Accessories
and then open the consoleLXTerminal
- Enter the directory where the lab environment belongs:
cd /linux-0.11-lab
- Perform various development and commissioning actions
- For example:
make start-hd
- You can also switch Bochs boot, for example:
echo bochs > tools/vm.cfg; make start-fd
- For more usage please refer to:
make help
The effect is as follows:
Fast Build Linux 0.11 experiment environment based on Docker