Ubuntu Post-install Steps

Version information

These notes are being updated for Ubuntu 8.04 (as of Fall 2008)

Automatic Security Updates

Network configuration

The default is DHCP and should "just work". If you need a static config, see below:

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-persitant-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

Graphics configuration

  • This is almost certainly obsolete as of Ubuntu 9.04. A new procedure is not known as of 2009-10-5.
  • 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.

Graphic tool:

  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

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
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2013-01-14 - MikeGore
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback