Installing minix 2.0.4 over VMware

advertisement
Instruction for Installing Minix on Vmware 5.5.2 (For Windows)
Prerequisites
Hardware Requirements
1) Systems having at least 512 MB of Memory (Minix can run on machines having
memory lesser than 512MB, however to avoid problems later on since we have to
install multiple Minix, it is recommended to use a machine with minimum 512 MB of
RAM and allocate 256MB to Vmware machines. )
2) Each minix requires 16MB Mem and 200MB hard-disk;
3) Have around 0.8GB free hard-disk space (recommended for 4 minix)
Software Requirements
1) Vmware 4.5.2.
This shall be provided by Instructor. Kindly ask him for a legal copy. Since this is an
Institutional course, using pirated copy is illegal.
2) Minix Operating System
For the purpose of Installing Minix on Vmware, we shall use Floppy Images of the
installation files. Please download from here and extract to your host machine by
Winrar. Then you have 11 files: root_usr.flp, sys_1.flp, sys_2.flp, usr_1.flp, usr_2.flp,
usr_3.flp, cmd_1.flp, cmd_2.flp, cmd_3.flp, net.flp, amd_new.flp
With Vmware and Minix Floppy Images, we are all set to install Minix on Vmware.
For Installation of Vmware on Windows Machine, click on the link below
Installation of Vmware
Installation Suggestions
You could follow steps 1-12 in next section to setup a minix virtual machine. To save
time, I suggest you use the pre-built virtual machine. You need the following three
files: other-flat.zip (VMware disk image, the size is about 7M), other.vmdk and
other.vmx. Put these three files into a directory called Minix2.0.4, unzip the
other-flat.zip file (you will get a large file called other-flat.vmdk). You can then run
this pre-built virtual machine in VMware by loading other.vmx.
Go to appendix of this document, see some funny functionalities.
If you would prefer to install minix from scratch, follow steps in next section.
1
Installation of Minix on Vmware From Scratch
1) Power up Vmware by either clicking on the shortcut on the desktop or either
selecting Vmware WorkStation from Programs-->Accessories-->Vmware-->Vmware
Workstation.
2) After starting the Vmware WorkStation, click on New Virtual Machine and click
Next on the following installation Wizard.
2
3) Select “Custom”
4) Name the Virtual Machine to be created as Minix1 (or any other self-describing
name) and give the path to save the Virtual Machine such as H:\My Virtual
Machine\Minix
3
5) Hit the Next Button and then allocate 16MB RAM
6) Hit the Next Button and Select Network Address Translation (NAT)
4
7) Select BusLogic (its default) and press Next
8) Check Create a New Virtual Disk and hit Next
5
9) Select Disk Type as IDE (its Default)
10) Allocate 0.2GB (i.e. 200 MB) of disk space and check mark Allocate All Disk
Space now.
6
Note: A warning for Pre-Allocated Disk occurs, click Yes and proceed.
11) Specify the Disk File name as Minix1.vmdk (by default it’s Other.vmdk) and
hit Finish
7
Note: A Disk creating step shall take place for a couple of seconds, let it happen
Once the Disk Creating Process is over, the following screen is displayed.
12) Click on the Edit button and remove Audio, USB controller, CDRom. This step
isn’t necessary but since Minix cant uses them anyways.
8
Note: Now you have a 200M file with extension name (.vmdk), such as
minix-flat.vmdk. Download image file from website
http://courses.ncsu.edu/csc405/lec/001/Lab/lab_setup/other-flat.zip, get file
other-flat.vmdk to overwrite your file with the name minix-flat.vmdk, then your
minix machine is done. All drivers and tools for final project are already there. If
you prefer to installing it from the scrach, go to next step.
13) After that, click on Floppy 1 and from the right hand options, click on Use
Floppy Image and Browse to find, folder Floppy 1 and select file root_usr.flp and
say OK. ( Note: if there is no Floppy in device list, click “Add” to add one; If need
two NICs, do the same thing to add one here)
9
14) Now Click on Start the virtual machine and wait till you get a black screen shown
below.
15) Once you get the above screen, click on the screen once and then press “=” sign.
10
Note: By Default, Mouse is Windows Hardware, so once you click on the black
screen, the mouse freezes and now you can only use your keyboard. To free the
mouse again press “Ctrl + Alt”
16) After you press, “=”, the following screen appears.
17) At the cursor type fd0p2 i.e. mount as /dev/fd0p2 and hit Enter. The screen
shown below shall appear after that prompting to input the login
11
18) At the login prompt type: root and hit enter. You see a “#” prompt, type setup
and hit Enter.
19) After hitting Enter, the following screen appears. Hit Enter again to move on to
next screen
12
20) Again, hit Enter to move on the next screen.
21) Again, hit Enter to move to another screen
13
22) You shall then encounter a screen (after about 4 Enters) for configuring the
partition. The screen is shows below.
23) Press “r” to get the present partition
14
24) Move the cursor to line 0 p0 00 none… and then in the last column type 200000
(if you allocate 0.2GB for Minix, here should be 20000) and enter “w” to save
the partition. Then enter “y” to save it when prompted.
25) Then press “q” to quit. When prompted type “c0d0p0”after /dev/ i.e. /dev/c0d0p0
and press Enter till you get the screen shown below
15
26) Type setup /usr at the “#” prompt and hit Enter until prompted for “input
volume 1”
27) Press Ctrl+ Alt to come out of the Minix screen and change the floppy image to
point to sys_1.flp under XP and press Enter. After a few setup, you shall be prompted
for inserting volume 2
(VM->Removable Devices->Floppy->Edit->Browse->Floppy1->sys_1.flp)
28) Follow Step 27 for sys_2.flp. After floppy image points to sys_2.flp
(VM->Removable Devices->Floppy->Edit->Browse->Floppy1->sys_2.flp), press
16
Enter to continue. After finish installing sys_2.flp, type setup /usr at the # prompt
and hit Enter.
29) You shall see screen similar to the one shown in Step 26.Repeat Step 27 but
change the floppy image to point to usr_1.flp and press Enter. After a few setup, you
shall be prompted for inserting volume 2. Deal in the same manner and make the
image point to usr_2.flp. Then you shall be prompted for Volume 3, make the image
point to usr_3.flp and hit Enter.
(VM->Removable devices->Floppy->Edit->Browse->Floppy1->usr_1.flp/
usr_2.flp/usr_3.flp)
30) Repeat Step 26 and Step 27 but make the floppy image point to cmd_1.flp.
Follow step 27 but make the floppy image point to cmd_2 and then to floppy image
cmd_3.flp and hit Enter.
(VM->Removable Devices->Floppy->Edit->Browse->Floppy1->cmd_1.flp/
cmd_2.flp /cmd_3.flp)
31) On this “#” prompt type setup / (Note: this time its not setup /usr).
32) After that make the Floppy image point to net.flp.
(VM->Removable Devices->Floppy->Edit->Browse->Floppy2->net.flp).
33) On the hash prompt type
# halt
fd0> boot c0d0p0
login Minix as root
# cd /usr/src/kernel
# make
# cd /usr/src/tools
# make
# make hdboot
# halt
d0p0s0> boot c0d0p0
After the above steps have been implemented successfully, we get a screen as shown
below
So far we have finished instillation of Minix, next to add Ethernet driver.
17
Installation of Ethernet Driver for Minix.
1) After restarting the machine, follow the steps given below
1. begin to install new nic driver: enter "Ctrl + Alt" to return windows, Open
VM->Settings->Floppy 1, use floppy image and point it to the virtual boot floppy
file 'amd_new.flp'.
# cd /usr/tmp
# vol /dev/fd0 | tar xvf # cd 204ether
# cp inc_Minix/* /usr/include/Minix/. (Note there is a space between /* and
/usr)
# cp src_cmd_sim/* /usr/src/commands/simple/.
# cp src_inet/* /usr/src/inet/.
# cp src_kernel/* /usr/src/kernel/.
# cd /usr/src/kernel
# make
18
# cd /usr/src/inet
# make install
# cd
/usr/src/tools
# make hdboot
19
# cd /usr/src/commands/simple
# make ping
# make /usr/bin/ping
# cd /etc
20
# elvis inet.conf
eth0
LANCE
0
{ default;};
To save and quit, first press escape and then”:wq” (which means save and quit)
# halt
d0p0s0>servers=inet
d0p0s0>LANCE0=pci
dop0s0>boot
If things go fine, you shall see the screen shown below.
21
If want to install two nics, just add one more nic in virtual machine, and then login
Minix:
Note: You have to first, Power Off the Minix machine if you want to add Hardware to
it (in this case NIC)
Simply Right Click on the Machine name (Minix1) and go to Settings. From there
add another Ethernet Adapter and Select NAT and say Finish
# elvis /etc/inet.conf
22
eth0 LANCE 0 { default;};
eth1 LANCE 1;
# halt
d0p0s0>servers=inet
d0p0s0>LANCE0=pci
d0p0s0>LANCE1=pci
dop0s0>off
1. return windows, Open VM->Settings editor, select floppy, unmark “connected
at power on”.
2. when power on, just enter ‘=’, Minix will bootup.
3. if want to create another Minix virtual machine, just follow the first 13 steps,
close VWware, using the existing hard disk file, such as “minix1-flat.vmdk”,
which should be 200MB big, to overwrite the other disk file, such as
“minix2-flat.vmdk”, you will be all set for a new minix2.
APPENDIX:
Using FTP Transfer Data:
Using ftp client installed in XP, such as leapFTP, to transfer files between Minix and
host machine.
Virtual Consoles
Hold down the ALT key and press the left or right arrow key, F1, or F2. This switches
the console between two login sessions.
Screen Dump
Screen Dump patch is already been installed if you use image file:
http://web.syr.edu/~mshang/other-flat.zip
If you install minix from scratch, download a patch from:
http://minix1.hampshire.edu/pub/contrib/vmw-p01.tar.Z
This patch enables Minix guests on VMware to print the contents of the console
screen to host's clipboard when F4 key is pressed.
23
Show Full Path In Minix Prompt
If you use image file: http://web.syr.edu/~mshang/other-flat.zip, just edit /.profile,
change hostname to the one you want.
Login Minix, ftp paser.c, var.h to /usr/src/commands/ash overwriting the old ones.
# cd /usr/src/commands/ash
# make
# cp sh /bin/.
# cd /
# elvis .profile
add one line as:
PS1=”Minix6[\u \w]# ”
# reboot
after login as root, if you are in /usr/src, you will find the Minix prompt becomes:
Minix6[root /usr/src/]#
Here Minix6 is hostname, root is current login user name, /usr/src is current working
directory.
Configure Minix As A Router
Minix1 with 2 NICs, NIC1: 192.168.1.1; NIC2: 192.168.2.1
Minix2 with 1 NIC, NIC3: 192.168.1.2;
Minix3 with 1 NIC, NIC4: 192.168.2.2.
Minix1 (Configured as Router):
#add_route -I /dev/ip0 -i -g 0.0.0.0 -d 192.168.1.0 -m 1
#add_route -I /dev/ip1 -i -g 0.0.0.0 -d 192.168.2.0 -m 1
#add_route -I /dev/ip0 -i -g 192.168.1.1 -d 0.0.0.0 -m 1
#add_route -I /dev/ip1 -i -g 192.168.2.1 -d 0.0.0.0 -m 1
#add_route -I /dev/ip0 -g 192.168.1.1
#add_route -I /dev/ip1 -g 192.168.2.1
#irdpd -b &
#
# pr_routes -I /dev/ip0
ent #
if
0 ip0
dest
0.0.0.0/0
gateway dist pref mtu flags
192.168.1.1
1
0
0 static
# pr_routes -I /dev/ip1
ent #
if
1 ip1
dest
0.0.0.0/0
gateway dist pref mtu flags
192.168.2.1
1
0
# pr_routes -I /dev/ip0 -i
24
0 static
ent #
if
dest
0 ip0
192.168.1.0/24
2 ip0
0.0.0.0/0
gateway dist pref mtu flags
0.0.0.0
1
0
0 static
192.168.1.1
1
0
0 static
# pr_routes -I /dev/ip1 -i
ent #
if
dest
1 ip1
192.168.2.0/24
3 ip1
gateway dist pref mtu flags
0.0.0.0
0.0.0.0/0 192.168.2.1
1
1
0
0
0 static
0 static
#
Minix2:
#add_route -I /dev/ip0 -g 192.168.1.1 -d 192.168.2.0 -m 2
#
# pr_routes -I /dev/ip0
ent #
if
1 ip1
dest
192.168.2.0/24
gateway dist pref mtu flags
192.168.2.1
1
0
0 static
# pr_routes -I /dev/ip0 -i
ent #
if
dest
gateway dist pref mtu flags
Minix3:
#add_route -I /dev/ip0 -g 192.168.2.1 -d 192.168.1.0 -m 2
#
# pr_routes -I /dev/ip0
ent #
if
1 ip1
dest
192.168.1.0/24
gateway dist pref mtu flags
192.168.1.1
1
0
0 static
# pr_routes -I /dev/ip0 -i
ent #
if
dest
gateway dist pref mtu flags
then Minix2 could ping or telnet Minix3 by using Minix1 as a router. Some mistakes in the
manual of add_routes, please check add_route.c to find the correct usage of it.
25
Download