UBUNTU Install Notes

Image file location

  • See also: CscfStWrkLinuxImageUpdates - Linux images
  • Location of Files: \\asimov.cscf.uwaterloo.ca\IMAGES
  • Install the split image - see ImageDeployment
  • Partition - /etc/fstab notes:
    • Install drive will be either hda for ATA and sda for SATA drives.
      We will assume hda for this documents examples
    • / is /dev/hda5 (first partition in an extended partition)
    • swap is /dev/hda6
    • /share is */dev/hda7
  • Note There may also be a single install image that contains both Debian and Windows partitions. That one is built up from the independent Windows and Debian installs, so the following notes apply in either case.

Root access

  • NB: Ubuntu does not allow you to log in as root by default. Instead, log in as a user and either use sudo (console) or just run administrative commands (GUI) - it will prompt for your password if required.

Other tools


  • For P4P800-VM motherboards, flash the BIOS to the latest stable revision. BIOS must be at least revision 1016. 1018 is also known to work.
  • See the password box for passwords for Linux; you'll need them to complete the setup.
  • Get a rescue CD - you need this to fix/install the boot loader


Boot the rescue CD

  1. Boot the RIP rescue CD (version as of August 2006: 14.9); or use PXE to boot RIP
    • choose "Linux with no keymap".
    • root has no usable password set by default

Configure linux

For SATA drives (check sticker on side of PC)

  1. Mount the Linux root partition to /mnt. /dev/sda5 for SATA drives
    • mount /dev/sda5 /mnt
  2. chroot /mnt (if you don't know what chroot does, you shouldn't really be trying this on your own)
  3. Edit /boot/grub/menu.lst if the drive type does not match your configuration
    1. edit /boot/grub/menu.lst - see example
      • Change "default 0" to "default saved"
    2. Edit /etc/fstab see example
      • Comment out the line /dev/sda1 (eg: #/dev/sda1 ...)

For PATA drives (check sticker on side of PC)

  1. Mount the Linux root partition to /mnt. /dev/hda5
    • mount /dev/hda5 /mnt
  2. chroot /mnt (if you don't know what chroot does, you shouldn't really be trying this on your own)
  3. Edit /boot/grub/menu.lst if the drive type does not match your configuration
    1. edit /boot/grub/menu.lst - see example
      • Change "default 0" to "default saved"
      • Change # kopt=root=/dev/sda5 ro to kopt=root=/dev/hda5 ro (around Line 66)
      • From "End Default Options" and on (around line 109), change all "sda" to "hda" (eg: :s/sda/hda/g999)
    2. Edit /etc/fstab - if required - see example
      • do a global change of sda to hda
      • Comment out the line /dev/hda1 (eg: #/dev/hda1 ...)
      • Change /dev/hda /media/cdrom0 to /dev/hdc /media/cdrom0

Complete grub installation

  • # grub
  • > root (hd0,4)
  • > setup (hd0)
  • > quit gets you back to prompt.

Fix network configuration

DHCP configuration

  1. Edit /etc/hostname replacing localhost with the system hostname
    • will just be single, unqualified name-only, eg: scspc013
    • Note: in DNS: create "scspc013.cs" with scspc013.uwaterloo.ca as a CNAME
  2. Edit /etc/hosts modifying the entry
    • scspc013 scspc013.cs scspc013.cs.uwaterloo.ca scspc013.uwaterloo.ca
  3. Delete /etc/iftab this file reserves the hardware MAC of the network interface (from the image master - which we don't want)
  4. Delete the contents of /etc/udev/rules.d/70-persistant-net.rules - see https://www.cs.uwaterloo.ca/twiki/view/CF/Udev

Note you can use dhclient eth0 to ask for DHCP settings

Static IP configuration (not generally used - DHCP recommended)

  • Note the following may no longer be correct (as of August 2006) as we're not doing it this way anymore
  1. Edit /etc/network/interfaces - ONLY if you are going to use static addressing - see example
    NOTE You should use VLAN 7 or 84 which have DHCP
    • Make sure you update inventory or DNS with the MAC address
    • Please consider renumbering the machine if it is not on VLAN 7 or 84
  2. Edit /etc/hostname replacing localhost with the system hostname - this can be the fully qualified domain name
    • will just be single, unqualified name-only, eg: scspc013
    • Note: in DNS: create "scspc013.cs" with scspc013.uwaterloo.ca as a CNAME
  3. Edit /etc/hosts adding the ip and host name of the system (ie " csgradpc49 csgradpc49.cs csgradpc49.cs.uwaterloo.ca csgradpc49.uwaterloo.ca")
    • Note if you use DHCP add the name to the localhost entry! otherwise various things will break
      • depends on how fast your network comes up
    • Note2 MikeP says - Legato will break if you do this!!!
  4. Edit /etc/resolv.conf removing entry, and add options ndots:2 to the bottom

Cleanup /tmp (optional/not needed?)

  1. Remove contents of /tmp, if they exist


  • When you reboot, grub should come up correctly. Choose the first Ubuntu option.

Check Graphical Resolution

  • Confirm that the Graphical Login window has the correct resolution
  • if incorrect, fix it using the following:
    1. Try Ctrl-Alt-Backspace. If it comes up correctly, you're done. If not:
      1. login as cscf-adm
      2. System -> Preferences -> Screen Resolution
      3. See if you can choose 1280x1024, if so, choose it. If not:
        1. Open a console session (Ctrl-Alt-F1)
        2. login as cscf-adm
        3. start a root shell (sudo -s)
        4. # dpkg-reconfigure xserver-xorg
        5. Accept all defaults up until it does the monitor detection, shortly after you will be shown a list of screen resolutions - make sure that all appropriate resolutions for your monitor are selected (select/deselect with cursor keys and space bar)
        6. Accept the rest of the defaults
        7. Restart GDM: # /etc/init.d/gdm restart

Distribution update

  • login as cscf-adm
  • become root: sudo -s
  • # apt-get update (Respond "Y" when asked)
  • # apt-get dist-upgrade (Respond "Y" when asked)

Cleanup ssh keys

  1. # rm /etc/ssh/*key* and # dpkg-reconfigure openssh-server (to generate new host keys)
    • on the recent 7.10 image, openssh-server is not installed, so do # apt-get install openssh-server

Add new user

  1. Log in to GNOME and go to the add user control panel, add user as an Administrator (look under the Advanced tab)
  2. (Non-grad PCs) As of Ubuntu Dapper (6.10), you will need to do the following:
    • Under "User privileges", make sure "Executing System Administration tasks" is checked
    • This will add the user to the Admin group, which allows sudo and other privileges
    • Under "Groups", check "lpadmin"

(Not necessary?) Arrange for user to have print queue access

  1. Send email to accounts@cs to request access to quota lj_cs for the new user on the new machine
    • this will allow the user to print to the Grad PC or any other CS core printers

Setup printing

Automatically (Using Browsing - 6.06 confirmed, 6.10 doesn't seem to work like this)

  1. cd /etc/cups/cups.d
  2. edit browse.conf
    • change it to look like the following:
            Browsing On
            BrowsePoll print.cs
  3. restart cups: /etc/init.d/cupsys restart
  4. Open Print Administration ( UNNECESSARY if you edit browse.conf as directed above)
    • System -> Administration -> Printing (must have gnome-cups-manager package installed)
    • Global Settings -> Detect LAN Printers (turns it on for now) (Specifically this has the effect of putting Browsing On in the /etc/cups.d/browse.conf)
    • turn it off again: Global Settings -> Detect LAN Printers (This puts Browsing Off into /etc/cups.d/browse.conf file).
    • remove the BrowsePoll directive to avoid the machine "spinning" later.

Ubuntu 7.10

Important: To setup the printer, you have to be member of "lpdadmin" group.

  1. Add the following lines to the file /etc/cups/cupsd.conf
              Browsing On
              BrowsePoll print.cs
              BrowseInterval 3600
              BrowseTimeout 3700
  2. restart cups: /etc/init.d/cupsys restart

In previous instances of Ubuntu a separate browse.conf and ports.conf file may have been present---largely because it permitted dpkg-reconfigure cupsys to ask certain specific questions.

Ubuntu 7.10, Gnome or KDE:

  1. Use the System -> Administration -> Printing
  2. Click "New Printer"
    • Step 1:
      • Select Network Printer: Unix Printer (LPD)
        (Ubuntu 7.10, LPD/LPR host or printer)
      • Host: print.cs.uwaterloo.ca
      • Queue: lj_csgrad (printer name on Ubuntu 7.10)
      • Click "Forward"
    • Step 2 - Select Printer Driver
      • HP - LaserJet 4200 Series Postscript
      • Apply
  3. Setup duplexing:
    • Right-click -> Properties -> Paper -> Double-sided -> Long-side

Ubuntu 8.04 (Gnome or KDE)

  1. In the menu System -> Administration -> Printing
  2. Click "New Printer"
    • Step 1:
      • Select "Windows Printer via SAMBA"
      • In "smb://" enter "smb-printers.cs.uwaterloo.ca\lj_csgrad" (lj_csgrad or whatever printer's name)
      • Check the box "Authentication required" and fill
        Username : "cs-general\userid"
        Password : "user password (windows/mail password)"
      • Click on "Verify..." if OK it'll say "This print share is accessible".
      • Click "Forward"
    • Step 2 - Select Printer Driver
      • HP - LaserJet 4250 Series Postscript
      • Click "Forward"
  3. Setup duplexing (in Installed Options):
    • Check "Duplex Unit" for printing both sides of the page.
    • Click "Forward"
    • Printer Name: "lj_csgrad" or something similar.
    • Description: "HP Lasejet 4250" (Printer's manufacturer and Model)
    • Location: DC3316 (room where the printer is)
  4. Click on "Apply"

If the previous procedure is not helpful, it may work with "Internet Printing protocol" (ipp). ipp://services102.cs.uwaterloo.ca:631/printers/lj_csgrad (or whatever printer's name) or try using AppSocket/HP JetDirect". From there specify printer's IP address or CS name. (socket://xxx.yyy.zzz.nnn:9100)

List of Cups printers

File Examples

/boot/grub/menu.lst edit example

  • Example changes for converting sda to hda
vi /boot/grub/menu.lst
or -
 sed -e 's/sda/hda/' /boot/grub/menu.lst  > /boot/grub/menu.new
 mv /boot/grub/menu.new /boot/grub/menu.lst
  • Edit the file /boot/grub/menu.lst and look for the line kopt . Uncomment it and change the root= segment appropriately (hda for ATA and sda for SATA ).
  • If you need to change the default root partition (shouldn't be necessary) Uncomment and change the root= line. ( grub will automatically reconfigure itself the next time you boot.)
  • NOTE. The program update-grub manipulates the /boot/grub/menu.lst in buggy ways, see https://bugs.launchpad.net/ubuntu/+source/grub/+bug/62195 for details with respect to kopt option (it's not a grub option but an update-grub option!).

/etc/fstab example for ATA drives

  • Replaced hda with sda for SATA drives
# /etc/fstab: static file system information.
proc            /proc           proc    defaults        0       0
/dev/hda5       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda8       /home           ext3    defaults        0       2
/dev/hda7       /shared         vfat    rw,user,auto    0       0
/dev/hda6       none            swap    sw              0       0
/dev/hdc        /media/cdrom0   udf,iso9660 ro,user,noauto  0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0

Static IP Example

Note Use this section only if you insist on deploying a machine with a static IP
  • comment out the DHCP line if you are using static addressing - see example below for details
  • uncomment the static section of /etc/network/interfaces like this (replace the xxx with your subnet)
  • do something with resolv.conf

iface eth0 inet static
 address 129.97.xxx.xxx
 broadcast 129.97.xxx.255
 network 129.97.xxx.0
 gateway 129.97.xxx.1
 # maybe you'll need this, ensure that ethtool is present on the system
 # post-up ethtool -s eth0 speed 100 duplex full autoneg off

-- MikePatterson - 12 Aug 2005, with help from AlexRoman ; MikePatterson - updated for Ubuntu 5.10 and new VLAN setups - 29 November 2005

Edit | Attach | Watch | Print version | History: r35 < r34 < r33 < r32 < r31 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r35 - 2009-02-06 - LawrenceFolland
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback