140 likes | 271 Views
Vmware and Linux kernel. COMS W4118 Columbia University. Login to your assigned CLIC machine. Find your vmware account from the file “ Vmware account assignment ” in coursework shared files folder. Example: primary: os140 : zc2109 backup: os141 : zc2109.
E N D
Vmware and Linux kernel COMS W4118 Columbia University
Login to your assigned CLIC machine • Find your vmware account from the file “Vmware account assignment” in coursework shared files folder. Example: primary: os140 : zc2109 backup: os141 : zc2109
Login to your assigned CLIC machine • According to your account, find your assigned CLIC machines from the file “Vmware machines in CLIC” in • coursework shared files folder. • Example: • Machines VM1 VM2 VM3 VM4 VM5 • lisbon.clic.cs.columbia.edu 026 064 102 140 178
Login to your assigned CLIC machine • Login to your assigned CLIC machine with the command ssh –X yourmachine.clic.cs.columbia.edu or ssh –Y yourmachine.clic.cs.columbia.edu
Prepare your vmware • After logging in to your assigned machine, create a folder named “.vmware” in your home directory by command: • mkdir .vmware • Copy the license to your “.vmware” directory cp ~w4118/vmware/license.ws.5.0 .vmware/
Get Linux kernel source code • Copy the Linux kernel 2.6.17-13 source code to a temporary location, like the current work directory cp ~w4118/vmware/linux-2.6.17.13.tar.bz2 ./ • Copy the kernel compilation configure to a temporary location cp ~w4118/vmware/config-2.6.17-13 ./
Start your vmware • From your designated machine, run vmware vmware • Load the vm from your assigned directory. File -> open -> filesystem -> /vmware[x] -> linux.vmx • Select power on, start your linux in vmware User: root Pwd: osw4118
Vmware IP address • Get your vmware IP address • From inside the vm, type command "ifconfig" to get the IP • If you don't see an IP like 172.16.85.xxx • type "dhclient"
Copy file into vmware • Copy linux kernel source code into your vmware • From the host system, your assigned CLIC machine • scp linux.2.6.17.13.tar.bz2 root@172.16.85.192: • Copy linux configure file into vmware • scp config-2.6.17-13 root@<vm_ip>:
Compile the kernel • Inside your vmware • Untar the source: • tar xvjf linux-2.6.17.13.tar.bz2 • Copy config-2.6.17-13 into the folder linux-2.6.17.13 as ".config" • cp config-2.6.17-13 linux-2.6.17.13/ • Make linked copy of the source code dir: • cp -al linux-2.6.17.13/ linux-2.6.17.13-pudding
Compile your kernel • Create configuration for your kernel compilation From inside linux-2.6.17.13-pudding, type command make oldconfig • Compile the kernel 1.make 2. make modules 3. make modules_install Now verify that /lib/modules/2.6.7.13 was created
Make an entry for your kernel • Type command depmod –ae 2.6.17.13 • Create initial image for preload modules mkinitrd /boot/initrd-2.6.17-13.img 2.6.17.13 Now verify that /boot/initrd-2.6.17.13.img was created
Make an entry for your kernel • cp linux-2.6.17.13-pudding/arch/i386/boot/ bzImage /boot/vmlinuz.hmwk1 • Modify grub loader (/boot/grub/grub.conf), add entry: title HW1 Kernel root (hd0,0) kernel /vmlinuz.hmwk1 ro root=/dev/VolGroup00/LogVol00 initrd /initrd-2.6.17-13.img
Start your kernel Reboot and Start your new kernel