or
Start->Programs->Internet and Remote Connections->SSH->Secure
Shell Client If you start an Xwindows server before
you run ssh, then you'll be able to run Xwindows clients on
forkbomb. (For example, you'll be able to launch the Xemacs client.) To start an Xwindows server, run:
Start->Programs->Internet and Remote Connections->Reflection->Reflection XYour home directory on these machines is your usual /homes/iws/ directory, and it is backed up. However, due to the usual disk space quotas, you will not have enough quota in your home directory to copy or compile a kernel. Instead, we have provided each of you with local disk space. Your local disk space is in /cse451/username, where username is your unix account name. So, when you make your copy of the linux kernel and when you edit or compile it, you should do so in this local directory, not your home account.
However, these local directories are not backed up. This means that if the disk crashes, all of the files in your local directory will be blown away. Thus, I strongly recommend that you keep copies of critical files in your home account; in particular, I'd keep a copy of every file that you've edited or created, and copies of the kernel images that you create (Don't copy the entire kernel source tree, though: only copy changed files).
One more detail: your local directory on forkbomb can be accessed from the WinXP machines using a file transfer client. On the lab WinXP machines, you can find a file transfer client at:
Start->Programs->Internet and Remote Connections->SSH->Secure File Transfer ClientThis is how you will copy a kernel image from your local directory on the Linux servers to the particular WinXP machine that you're using.
To launch VMware, simply run:Start->All Programs->VMware->VMware WorkstationIf a dialog box pops up, select "Open Existing Virtual Machine". If Linux is on the list, double click it, otherwise hit OK to browse, and then select c:\Program Files\VMWare\vms\linux\Linux.vmx.
If no dialog box pops up, click on "Open Existing Virtual Machine" in the VMWare window. Browse to and select c:\Program Files\VMWare\vms\linux\Linux.vmx.
By selecting this, VMware will boot into a version of Linux that has been carefully prepared for use with the 451 course. In particular, this configuration has the following properties:
We have one very strictly enforced rule for VMware usage: don't mess with the VMware configuration itself. If you do, we'll be extremely upset with you, since you might inadvertantly cause trouble for other people.
- The hard drive has been set to be non-persistent; if you power down the virtual machine, and power it back on (or if you quit and restart VMware), then any changes you made to the file system inside VMware/linux will be lost. This is a good thing: it means every time you boot VMware/linux, it will boot into a well-known, sane configuration, with a working kernel. However, this means that when you install your new kernel, you can't power down the virtual machine; instead, you'll software reboot it from inside linux (as described below).
- VMware/linux has been configured for host-only networking; this means that VMware/linux can only communicate with the WinXP host that is running it, rather than the Internet at large. Similarly, the only way to get files into VMware/linux is to ftp them from the WinXP host on which you're running VMware/linux. This was done for security reasons.
- There is only one user account: user name root, and password rootpassword. Note that I am fearlessly advertising this account name and password on a world readable web site. The reason I'm not afraid to do this is because of properties 1 and 2 above. Because of 2, only people actually sitting at the WinXP machine can log into VMware/linux, and because of 1, nothing you do can mess it up for other people.
Now select Linux and then press the Power On button to boot Linux inside VMware. VMWare may prompt you with an error message regarding a CPUID bit. This message can be safely ignored. You will then see the boot sequence as Linux loads itself, initializes devices, etc., and once this has finished, you'll be asked to log in. Do so as username root, and password rootpassword .
To copy files into VMware/linux, you need to use ftp from the WinXP host running VMware. So, bring up your favorite FTP client, and connect to the host 192.168.93.2. This is the IP address of the Linux system running inside VMware (this IP address is the same irrespective of which WinXP machine you're using, thanks to the magic of host-only networking).
This document provides you with step-by-step instructions for building and testing a kernel. For further information on building kernels, refer to the Linux Kernel HOWTO. The VMware web site (http://www.vmware.com/) has further information on VMware.
Log onto forkbomb. You should all have accounts. SSH is available as
Start->Programs->Internet and Remote Connections->SSH->Secure Shell Clienton the WinXP machines.Change directory to /cse451/username. You will be using this directory for your kernel development. Copy
/cse451/projects/linux-2.4.20.tar.bz2/cse451/projects/linux-2.6.13.2.tar.bz2 into this directory. This archive contains the kernel source code. Open it with the command "tar xvjf linux-2.6.13.2.tar.bz2 ".Change directory to linux-2.6.13.2. Compile the kernel with
"make dep", then"make bzImage". (Note that it is not necessary to run "make configure " or similar options). Compiling will take a long time (i.e. 10 minutes or so) the first time you do it, but you won't be recompiling every file all the time, so it will go much faster later on.Assuming compilation is successful, your new kernel image will created, and named ./arch/i386/boot/bzImage.
Copy the new kernel image from arch/i386/boot/bzImage to the WinXP machine you will be using for testing.
To do this, your local directory on forkbomb can be accessed from the WinXP machines using a file transfer client. On the lab WinXP machines, you can find a file transfer client at:
Start->Programs->Internet and Remote Connections->SSH->Secure File Transfer ClientLaunch VMware with Start->All Programs->VMware->VMware Workstation .
Select "Open Existing Virtual Machine". If Linux is on the list, double click it, otherwise browse to it at
C:\Program Files\VMWare\vms\linux\Linux.vmxPower on the virtual machine.
Login as "root", password "rootpassword ". (To get the mouse back out of VMware, you need to hit Ctrl-Alt-Escape.)
From Windows, ftp the kernel image to 192.168.93.2. This is the IP address of the Linux system running on the virtual machine, irrespective of which WinXP machine you are using. To do this, open Internet Explorer and go to the URL, ftp://root:rootpassword@192.168.93.2 and then copy your kernel image into this directory.
The kernel image you just ftp'd should be under /root/ on VMware/Linux. Copy it to /boot/bzImage-test.
The Linux boot loader is called lilo. At boot time, lilo selects an operating system image to run. You need to instruct lilo to select your image in order to test it.
Edit /etc/lilo.conf to append the lines in this . You might want to type this up in vi or emacs rather than copying, because of newline/linefeed problems. Note that the leading space in the second and subsequent lines are tabs.
Next, from Linux, run /sbin/lilo ; this will install your new kernel, and tweak the boot sector of the disk to load into it.
Finally, reboot the virtual machine by issuing the command shutdown -r now (from the shell). When the machine reboots, you will see a LILO boot: prompt; once you see this, type test in order to boot into your new kernel image. (Note that you need to click on contents of the vmware window with the mouse in order to have keyboard input fed to vmware/linux.)