Table of Contents

Documentation for Linux/*BSD Desktop install

Debian Install

  1. Upon bootup hit F12
  2. If Integrated NIC is not displayed then
    1. Reboot and hit F6
    2. … make it pxe something (must look into)
    3. Save and reboot
  3. Should be option 5 or 6 (Integrated NIC). Choose it
  4. The next screen will display 4 things. Choose 32-Bit (i386).
  5. This screen has some more options, the one required is Debian/i386 Netboot.
  6. Some more options but the one needed is Install Lenny/stable [text].
  7. Choose a language: English
  8. Choose a country: United States
  9. Keymap: American English
  10. Host Name: Unicorn
  11. Domain Name: ffbyone.lan
  12. Debian archive mirror country: Enter information manually (select this at the top)
  13. Debian archive mirror hostname: mirror
  14. Debian archive mirror directory: /debian/
  15. HTTP proxy information: leave blank
  16. Time Zone: Eastern
  17. Partitioning method: Guided - use entire disk
  18. Select disk to partition: IDE1 master (hda) - 80.0 GB Maxtor 6Y080L0
  19. Partitioning Scheme: All files in one partition
  20. Finish partitioning and write changes to disk
  21. Write the changes to the disk: Yes
  22. Root password: password
  23. Verify: password
  24. Name of user: Michael Short
  25. Username of account: ender
  26. Password for the user: god
  27. Verify: god
  28. Participate in the package usage survey: No
  29. Choose software to install: Just continue
  30. Install the GRUB boot loader to the master boot record: Yes

Finally it will bear the fruit of your children through a straw stareing at you through a glassed window… Yes

How to get into terminal:

   While on the desktop go to the top and click on Applications -> Accessories -> Terminal: ssh mshort3@lab46
   +++Additional+++
  • Dual-head Accelerated graphics with Compiz Desktop effects

System → Administration → Add/Remove Applications → System Tools → scroll down until you find: Compiz Fusion Icon or you can search it.

  1. Click the box so an 'X' appears and hit Apply.
  2. After a long drawn out battle with the midget class tanks we switched to Ubuntu. Therefore, the Debian install is no more.

Ubuntu Install

  1. Upon bootup hit F12
  2. Choose Integrated NIC should be option 5 or 6
  3. Choose 32-bit (i368)
  4. Choose Ubuntu/i386 Netboot
  5. Install Jaunty “9.04” [text]
  6. Language: English
  7. Country: United States
  8. Detect keyboard layout: no
  9. Origin of keyboard: USA
  10. keyboard layout: USA
  11. Hostname: Unicorn
  12. Mirror: Go to the top and enter manually: mirror
  13. continue
  14. continue
  15. Time Zone: Eastern
  16. Partitioning Method: Guided - use entire disk
  17. In our case: SCSI1 (0,0,0) (sda) - 40GB ATA WDC WD400BB-75FJ
  18. Write changes to disk: Yes
  19. User name: Michael Short
  20. Username: ender
  21. User password: god
  22. Verify: god
  23. Encrypt home directory: no
  24. Manage upgrades: no automatic updates
  25. Choose software to install: Ubuntu desktop
  26. Is the system clock set to UTC: Yes
  27. Continue
    1. Log in: ender
    2. Password: god

YOUR CHILD HAS BEEN DELIVERED!!! WATCH OUT FOR THE AFTERBIRTH!!!

  • In the upper right hand corner on the desktop screen there will be a small green thingy meh bob. clickz it.
    1. Then click install the driver
    2. Type in the password
    3. Close and restart the computer
      1. On the desktop in the upper right hand corner press System → Preferences → Display → Yes → x Screen 0 → Reads with your eyes
      2. Top left of the desktop screen click Applications → Accessories → Terminal → ssh mshort3@lab46 → yes → password
   +++Additional+++
  • Dual-head Accelerated graphics with Compiz Desktop effects
    1. Right click
    2. Change Desktop Background
    3. Visual Effects Tab
    4. Extra

Documentation for Linux VM Server install

  1. Upon bootup hit F12
  2. Should be option 5 or 6 (Integrated NIC). Choose it
  3. The next screen will display 4 things. Choose 32-Bit (i386).
  4. This screen has some more options, the one required is Debian/i386 Netboot.
  5. Some more options but the one needed is Install Lenny/stable [text].
  6. Choose a language: English
  7. Choose a country: United States
  8. Keymap: American English
  9. Host Name: VMServer01
  10. Domain Name: Student.lab
  11. Debian archive mirror country: Enter information manually (select this at the top)
  12. De/bian archive mirror hostname: mirror
  13. Debian archive mirror directory: /debian/
  14. HTTP proxy information: leave blank
  15. Time Zone: Eastern
  16. Partitioning method: Guided - use entire disk
  17. Select disk to partition: Select
  18. Partitioning Scheme: All files in one partition
  19. Finish partitioning and write changes to disk
  20. Write the changes to the disk: Yes
  21. Root password: gingeroot
  22. Verify: gingeroot
  23. Name of user: Michael Short
  24. Username of account: nightstalker
  25. Password for the user: ginger
  26. Verify: ginger
  27. Participate in the package usage survey: No
  28. Choose software to install: Uncheck everything and continue
  29. Install the GRUB boot loader to the master boot record: Yes
  30. Continue
  31. Restart computer
  32. Command: aptitude install openssh-client openssh-server
  33. Restart computer

Access remotely: Terminal → ssh root@vmserver01.student.lab → password: bob

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@Because i like mo betta vim@@@@@@
@@@Command: aptitude install vim@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  1. Command: aptitude install xen-linux-system-2.6.26-2-xen-686 and xen-tools
    1. continue: Yes
  2. command: vi /etc/modules
    1. type: Loop max_loop=255

network-script network-bridge setting in xend-config.sxp

  1. Command: vi etc/xen/xend-config.sxp
    1. Uncomment: network-script network-bridge
    2. Comment: network-script network-dummy
      1. with a '#'

ensure vif-script is vif-bridge, same file

  1. Command: vi /etc/xen-tools/xen-tools.conf
    1. Uncomment: vif-script
    2. Uncomment: vif-bridge

configure the grub boot entry accordingly

  1. vi /boot/grub/menu.lst
    1. Allow for the host to have 256MB
      1. Go to the very bottom
      2. Remove the two entries that look like this:
        title           Debian GNU/Linux, kernel 2.6.26-2-xen-686
        root            (hd0,0)
        kernel          /boot/vmlinuz-2.6.26-2-xen-686 root=/dev/hda1 ro quiet
        initrd          /boot/initrd.img-2.6.26-2-xen-686
        
        title           Debian GNU/Linux, kernel 2.6.26-2-xen-686 (single-user mode)
        root            (hd0,0)
        kernel          /boot/vmlinuz-2.6.26-2-xen-686 root=/dev/hda1 ro single
        initrd          /boot/initrd.img-2.6.26-2-xen-686
   

Then to the top entry add this after kernel 2.6.26-2-xen-686: dom0_mem=262144

Configure Xen-tools

  1. Command: vi /etc/xen-tools/xen-tools.conf

Create the following directories:

  1. Command: mkdir
    1. /xen
    2. /xen/images
    3. /xen/boot
    4. /xen/conf
    5. /xen/save

Then type “reboot” in the command window and thou art feeenished!

Creating Virtual Machines

  1. Command: xen-create-image – -hostname=vm06 – -mac=00:16:3E:2E:C0:06 – -role=udev - –dhcp - –force
  2. Make a new password: bob
    1. Logfile produced at: /var/log/xen-tools/vm06.log
  3. Command: xm create -c /xen/conf/vm06.cfg

To sign on type: ssh root@vm06.student.lab – Password: bob

But we used 09 -- Password: bob
  1. To detach type: ctrl + ]
  2. To reattach type: xm console vm06

Have Funs with yo new babeh

Data and Storage

If you mess up rewrite everything by typing this in the server prompt: xen-create-image – -hostname=vm09 – -mac=00:16:3E:2E:C0:09 – -role=udev - –dhcp - –force

RAID, an acronym for Redundant array of inexpensive disks or sometimes Redundant array of independent disks, is a technology that allows high levels of storage reliability from low-cost and less reliable PC-class disk-drive components, via the technique of arranging the devices into arrays for redundancy.

  1. From vmserver01 → command: xm shutdown vm09
  2. Command: xm list (to verificate)
  3. Command: cd /xen/domains/vm09
  4. Command: dd if=/dev/zero of=disk1.img bs=1M count=1024
  5. Repeat previous step 5 times while replacing disks with an incremented count up to 5
  6. Command: vi /xen/conf/vm09.cfg
  7. Copy/paste the line with 'file:/xen/domains/vm06/disk.img,xvda2,w', 5 times and put int the count of numbers after disk as well as after xvda
  8. Command: xm create -c /xen/conf/vm09.cfg
  9. Command: aptitude install mdadm
  10. Continue: yes

Raid 0 (striped raid)

  1. Command: mdadm –create –verbose /dev/md0 –level=0 –raid-device=5 /dev/xvda3 /dev/xvda4 /dev/xvda5 /dev/xvda6 /dev/xvda7
  2. Command: cat /proc/mdstat
  3. Command: mkfs.ext3 -v /dev/md0 (formats md0 found from previous step)
  4. Command: mount /dev/md0 /mnt

Raid 1 (Mirroring)

  1. Command: mdadm –create /dev/md0 –level=1 –raid-devices=4 –spare-devices=1 /dev/xvda3 /dev/xvda4 /dev/xvda5 /dev/xvda6 /dev/xvda7
  2. Command: cat /proc/mdstat
  3. Command: mkfs.ext3 -v /dev/md0
  4. Command: mount /dev/md0 /mnt

Raid 5 (Striped set with distributed parity)

  1. Command: mdadm - -create - -verbose /dev/md0 - -chunk=64 - -level=5 - -raid-devices=5 /dev/xvda3 /dev/xvda4 /dev/xvda5 /dev/xvda6 /dev/xvda7
  2. Command: mkfs.ext3 -v /dev/md0 (formats md0 found from previous step)
  3. Command: mount /dev/md0 /mnt

+++Raiding Notes+++

To unmount:

  • Command: umount “path” ie (and in our case): umount /dev/md0

To take raid offline:

  • Command: mdadm –stop /dev/md0

To zero out drives

  • Command: mdadm –zero -superblock /dev/xvda3 (repeat but replace the # in xvda# by incrementing from 3 to 7

Linux Terminal Server Project

@@@We had to install Ubuntu on a new machine, therefore, account info below@@@
User Name: bob
Pw: ginger
User Name: root
Pw: bob

  1. Command: sudo apt-get install dhcp3-server
  2. Command: sudo vi /etc/dhcp3/dhcpd.conf
  3. Command: pw: bob
    1. Change:
      1. option domain-name “Example.org”; -change “Example.org” (to whatever you want)
        1. pegasus.lan
      2. option domain-name-servers ns1.example.org, ns2.example.org; -change the domains
        1. ns1.pegasus.lan
        2. ns2.pegasus.lan
      3. #option domain-name-servers ns1.example.org; -change the domain
        1. ns1.pegasus.lan
      4. #option domain-name “internal.example.org”; -change the domain
        1. ubuntu.pegasus.lan
  1. Command: sudo vi /etc/default/dhcp3-server
    1. Change: INTERFACES=””
      1. To: INTERFACES=“eth1”
  2. Command: sudo vi /etc/network/interfaces
    1. Uncomment: iface eth0 inet dhcp
    2. ADD:
      1. auto eth1
      2. iface eth1 inet static
        1. address 10.5.5.1 (will be different for you)
        2. netmask 255.255.255.0 (will be different for you)
  1. Command: sudo vi /etc/dhcp3/dhcpd.conf
    1. Find: #A slightly different configuration for an internal subnet.
      1. This is your subnet and netmask
  2. Reboot computer
  3. Command: ifconfig
    1. Check to see if the ip address and mask took to eth1
  • Determine which eth# will be used for the interface within the file:
    • dhcp3-server
  • Command: ifconfig
    • Whichever eth# has an ip address thats the one to currently use. We used eth1.
  1. Command: sudo apt-get install openssh-server
  2. Command: sudo apt-get install install ltsp-server-standalone
  3. Command: sudo ltsp-build-client –mirror “http:\\mirror\ubuntu” –security-mirror “http:\\mirror\ubuntu-security
    1. In case of having to repeat the previous step
      1. Command: rm -rf /opt/ltsp/i386/
  4. Command: vi etc/ltsp/dhcpd.conf
    1. Change the subnet, range, option routers, option domain-name, option domain-name-server, option broadcast-address
      1. Subnet: 10.5.5.0
      2. Range: 10.5.5.10 - 10.5.5.60;
      3. Option Domain-Name: ubuntu.pegasus.lan;
      4. Option Domain-Name-Server: ns1.pegasus.lan;
      5. Option Broadcast-address: 10.5.5.255;
      6. Option Routers: 10.5.5.1;
  5. Command: vi /etc/default/tftp-hpa
    1. Change RUN DEAMON=“NO”
      1. To RUN DEAMON=“YES”
  6. Command: /etc/init.d/dhcp3-server restart
  7. Get another computer
    1. Connect new computer's ethernet port to ltsp server's second ethernet port
    2. Turn on new computer
    3. Log on with an existing account within the server

FINISHED

@@@Notes@@@
Sudo - super user do: makes a normal user Super User
Command: /etc/init.d/dhcp3-server restart

  1. ifconfig
    1. if eth0 or eth1 is not up do this
      1. Command: sudo ifconfig eth# up
      2. Command: ifconfig
        1. to check it
  2. Need an IP address? look no further!
    1. Command: sudo dhclient eth#
  1. To restart
    1. Command: sudo /etc/init.d/dhcp3-server restart

Automated Drawing

Squares

#!/bin/bash
#All sleeps helps the system keep up with the script, without them this would fail :(

pkill xpaint & #process kills xpaint to make sure its not open before hand

    sleep 2

xpaint -size 1130x940 & #opens xpaint whilst resizing the CANVAS to the specified screen size

    sleep 4

windowProcessID=`xwit -print -all | grep -i xpaint | cut -d ":" -f1` #gets JUST the window process ID and stores it in a variable

    sleep 3

    xwit -id $windowProcessID -move 0 0 #Moves the xpaint toolbar respectively

    sleep 4

        #Opens a new canvas
            xte 'mousemove 40 40'
            xte 'mousedown 1'
            xte 'mousemove 30 70'
            xte 'mousedown 1'
            xte 'mouseup 1'

    sleep 3

wPID2=`xwit -print -all | grep -i untitled | cut -d ":" -f1` #gets JUST the new "untitled" canvas's process ID

    sleep 3

    xwit -id $wPID2 -move 125 0 -resize 1150 990 #Moves and Resizes the CANVAS respectively

    sleep 3

        #Draws first box
            xte 'mousemove 200 200'
            xte 'mousedown 1'
            xte 'mousemove 200 300'
            xte 'mousemove 300 300'
            xte 'mousemove 300 200'
            xte 'mousemove 200 200'
            xte 'mouseup 1'

    sleep 2

        #Colors first box/pencil
            xte 'mousemove 30 400'   #Paint Can
            xte 'mousedown 1'
            xte 'mouseup 1'
            xte 'mousemove 200 60'   #Color Red
            xte 'mousedown 1'
            xte 'mouseup 1'
            xte 'mousemove 215 215'  #Colors First Square
            xte 'mousedown 1'
            xte 'mouseup 1'
            xte 'mousemove 30 80'    #Pencil Tool
            xte 'mousedown 1'
            xte 'mouseup 1'
            xte 'mousemove 190 70'   #Color Black
            xte 'mousedown 1'
            xte 'mouseup 1'
   sleep 2

        #Draws inner box
            xte 'mousemove 225 225'
            xte 'mousedown 1'
            xte 'mousemove 225 275'
            xte 'mousemove 275 275'
            xte 'mousemove 275 225'
            xte 'mousemove 225 225'
            xte 'mouseup 1'

    sleep 2

        #Colors inner box/pencil
            xte 'mousemove 30 400'   #Paint Can
            xte 'mousedown 1'
            xte 'mouseup 1'
            xte 'mousemove 230 70 '  #Color Green
            xte 'mousedown 1'
            xte 'mouseup 1'
            xte 'mousemove 250 250'  #Colors inner square
            xte 'mousedown 1'
            xte 'mouseup 1'
            xte 'mousemove 30 80'    #Pencil Tool
            xte 'mousedown 1'
            xte 'mouseup 1'
            xte 'mousemove 190 70'   #Color Black
            xte 'mousedown 1'
            xte 'mouseup 1'
exit 0

Circle


Notes

to get these to work properly command: chmod +x filename

Notes

if a VM gets taken down do this:

  • Command: xm create -c /xen/conf/vm09.cfg → ^] → ssh root@vm09.student.lab

Godzirra
user name: bob
pw: ginger
root
pw: bob

To sign into a VM type: ssh root@vm06.student.lab – Password: bob
But we used 09 - Password: bob

Access remotely: Terminal → ssh root@vmserver01.student.lab → password: bob

Completed Tasks

  1. Linux/*BSD Desktop Install
    1. Base
      1. 1 Star
  2. Linux VM Server Install
    1. base
      1. 1 Star
  3. Linux Terminal Server Project
    1. Real
      1. 1 Star
  4. Creating Virtual Machines
    1. Virtual
      1. 1 Star
  5. Data and Storage
    1. virtual
      1. 2 Stars
  6. Automated Drawing (Not Finished Yet)
    1. Real
      1. 2 Stars


The breakdown:

  • Total Projects Required: 8
    • Total Completed: 5
      • 2 projects need to be 'real', 2 need to be 'virtual'
        • Completed:
          • Real: 1
          • Virtual: 2
          • Base: 2
      • 1 project needs to be 3 stars
        • Completed: 0