wiki.allensmith.net

Personal "Rough Notes & Useful Links

User Tools

Site Tools


kb:linux:studio14p04_workstation_install_notes

Ubuntu Studio 14.04: Production Workstation Install

These are Rough Notes for how I installed Ubuntu Studio 14.04 as a replacement for Mint 13 Xfce on my Production Workstation. As I continue to Install this LTS version of Ubuntu for others, the information in these notes will continue to expanded and evolve.

Please Note: This document uses both the Command Shell and the Root Command Shell. That is why when Terminal Commands are given below, the command prompt that is expected (ending either in $ or #) is at the beginning of each line − so do not copy & paste that 1st character.

To create the LVM partitions and then to install Ubuntu, use the Ubuntu Studio 14.04 live boot (The top “Try Ubuntu Studio without installing” option in the menu.)

Manually Create the LVM Partions

Doing the below will erase all data on the physical drive that GParted is used to setup! This should be done only once, when first loading Ubuntu Studio 14.04 – as any reload would use the existing 14.04 partitions, with the option to not Format/Erase the lts14-home (/home) drive partition.

GParted → to create the /boot & Physical LVM partitions

  • IF Linux was already installed on a “to be repurposed” hard drive, stop using the swap partition so the drive can be repartitioned.
    • If Linux was installed using LVM → select the lvm2 pv partition → Partition » Deactivate
    • if Linux installed w/o LVM → select the swap partition → Partition » Swap off
  • Device » Create Partition Table (This will cause all data on the HDD to be lost.)
  • Create a 2000MiB ext2 Primary Partition (to be used by /boot)
I have seen systems that cannot be updated when /boot somehow runs out of space, while some extremely old (DOS based) utilities might have trouble when the boot partition gets to just under 2GiB (2048MiB). So hopefully 2000MiB is the “safest” boot partition size to use on a large hard drive. (I expect a production Workstation to have a HDD between 240GB to 3TB.)
  • Create an lvm2 pv partition using the remainder of the drive space. (pv01 is a suggested Label for this.)

Terminal Commands → to create the LVM volumes

The below is assuming that at least a 320GB hard drive is used for this. Also, with how LVM works, leaving any remaining space unused – to permit resizing (enlarging) LVM Volumes as needed, creating other “purpose specific” Logical Volumes, etc.– is very desirable.

$ sudo -i
# blkid     # to confirm LVM2_member is on /dev/sda2
# vgcreate lts14 /dev/sda2
# lvcreate -L 100G -n root lts14
# lvcreate -L 16G -n swap lts14
# lvcreate -L 200G -n home lts14
# exit
$ exit
Note: Above I have created the LVM Volumes, but I have not created the file system on them. Since Ubuntu Studio 14.04 is “LVM aware”, that just means the 1st time Ubuntu Studio is installed, the Format boxes need to be CHECKED when running the Installer.

Run the Ubuntu Studio 14.04 Installer

  • Run the “Install Ubuntu Studio 14.04” application on the desktop
  • Download updates while installing ← UNCHECKED
  • Install this third-party software ← CHECKED
  • Ubuntu Studio installation options:
    • CHECK ubuntustudio-photography & ubuntustudio-publishing
    • UNCHECK everything else
  • Installation Type →select Something Else
    • /dev/sda1 → Ext2 … /boot
    • /dev/mapper/lts14-root → Ext4 … /
    • /dev/mapper/lts14-swap → swap area
    • /dev/mapper/lts14-home → Ext4 … /home
IF you are doing a reinstall on the same LVM volumes, and there is data on the LVM /home volume from the previous install, make certain that the '“Format” box for lts14-home is UNCHECKED to preserve the user files– including any per-user system/program configuration files– during the reinstall.
  • Select the correct Time Zone, then the correct Keyboard Layout
  • Enter the appropriate information for Your Name, Your Computer's Name, etc.
  • Click the button to Reboot the computer once the installer is finished.

Start Initial Setup of OS

Note: Normally I'd install the Squid-Deb-Proxy Client right now. However, it is my main Workstation PC that provides the Squid-Deb-Proxy Server to my network. So in this one instance, That must wait until I setup that server– using a separate LVM partition for the cache & log files.
  • Use the Update Manager to do all updates.
  • Install the Additional Drivers for the Nvida video
  • Reboot, then configure the Dual Monitors on this PC.

Install Squid Deb Proxy

Terminal Commands ←to put the Squid Deb Proxy data on it's own LVM partition

$ sudo -i
# lvcreate -L 50G -n debproxy lts14
# mkfs -t ext4 /dev/mapper/lts14-debproxy
# mkdir /mnt/squid-deb-proxy
# chown proxy:proxy /mnt/squid-deb-proxy
# nano /etc/fstab    # add the following line to this file
/dev/mapper/lts14-debproxy /mnt/squid-deb-proxy   ext4   defaults   0    2
# exit
$ sudo reboot

Terminal Commands Continued ←finish the squid-deb-proxy setup

$ sudo -i
# mkdir /mnt/squid-deb-proxy/log
# mkdir /mnt/squid-deb-proxy/cache
# ln -s /mnt/squid-deb-proxy/log /var/log/squid-deb-proxy
# ln -s /mnt/squid-deb-proxy/cache /var/cache/squid-deb-proxy
# exit
$ sudo apt-get install squid-deb-proxy
$ cd /etc/squid-deb-proxy/mirror-dstdomain.acl.d
$ sudo mv 10-default 10-default.old
$ sudo nano 10-default    # copy & paste the following into this empty file
10-default
# /etc/squid-deb-proxy/mirror-dstdomain.acl.d/10-default
#
# network destinations that are allowed by this cache
 
# linux distro archives
.linuxmint.com
uberstudent.net
archive.ubuntustudio.org
repo.linuxliteos.com
packages.medibuntu.org
# Medibuntu repository no longer exits ... permit Internet DNS error
 
# launchpad personal package archives
ppa.launchpad.net
 
# system & development package archives
.mate-desktop.org
download.bitdefender.com
download.virtualbox.org
dlc-cdn.sun.com
download.opensuse.org
nginx.org
dl.hhvm.com
 
# additional mirror domains
mega.nz
mega.co.nz
linux.dropbox.com
deb.torproject.org
dl.google.com
deb.opera.com
 
repo.steampowered.com
archive.getdeb.net
mirrors.dotsrc.org
$ sudo apt-get install squid-deb-proxy-client
$ sudo reboot

Create & Configure Public LVM folder

I want things like Linux .iso files or the pictures used as Desktop Wallpaper to be easily accessible to all user accounts created on my Workstation system. That is why I create a separate LVM partition to put those files on, and then link that “Public files” partition to the ~/Public folder in each user account.

LVM Partition Terminal Commands ← to create a Public Drive on it's own LVM partition

$ sudo lvcreate -L 200G -n public lts14
$ sudo mkfs -t ext4 /dev/mapper/lts14-public
$ sudo mkdir /home/public
$ sudo chown 1000:100 /home/public    # 1000 => 1st user account  100 => users
$ sudo chmod 0775 /home/public
$ sudo nano /etc/fstab    # add the following line to this file
/dev/mapper/lts14-public /home/public   ext4   defaults   0    2
$ sudo reboot

User Account Terminal Commands ← do this for each [user] added to system

$ sudo usermod -a -G users [user]
$ sudo rmdir Public
$ ln -s /home/public /home/[user]/Public
$ ls -l    # notice how Public is listed in the [user] home directory
$ exit

Script to set group in ~/Public/ to “users”

The below will create a script “allSameGroup.sh” in ~/Public/ – which when double-clicked in the file manager, will open up a Terminal window to prompt for the users Password, then recursively change the group for all folders & file in ~/Public/ to “users”. That with how ~/Public/ was setup, the default group permissions are: rwx for directories, and rw files. Thus with all user accounts added to the “users” group, this script ensures full access to the Public folder.

$ nano Public/allSameGroup.sh    # copy & paste the following into this empty file
#!/bin/bash
# Change the group for everything in ~/Public to users
xfce4-terminal -x bash -c "sudo -s chgrp -R users ~/Public/*"
exit
$ chmod 0755 Public/allSameGroup.sh
  • Now rsync the Public files back into /home/public from the backup drive.

Continue Initial Setup of OS

  • System Settings » Language Support
    • IF “Language support not installed completely” then select “Install”
  • Ubuntu Software Center
    • install 7zip → CHECK “Non-free rar module for p7zip”
    • Install VLC
    • Install Xubuntu Restricted Extras → UNCHECK Adobe Flash plug-in
    • Install Non-free firmware for Linux kernel drivers
    • top of window menu → “Edit” » “Software Sources”
      • “Other Software” tab → CHECK “Canonical Partners” & “Independent” (4 boxes total)
      • “Updates” tab → “Notify me of a new Ubuntu version:” set to “Never”
$ sudo apt-get update
$ sudo /usr/share/doc/libdvdread4/install-css.sh    # to enable playing purchased DVDs
$ sudo apt-get install xubuntu-artwork xfce4-artwork xubuntu-community-wallpapers
$ sudo ln -s /usr/share/xfce4/backdrops/ 'Pictures/System Wallpaper'   # make above easy to find
$ sudo apt-get remove xscreensaver xscreensaver-data
$ sudo apt-get install light-locker
$ sudo nano /etc/X11/xorg.conf    # copy & paste the following into bottom of the file
Section "ServerFlags"
    Option "BlankTime"   "0"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime"     "0"
    Option "DontZap" "false"
EndSection
$ sudo nano /Fix_Xfce_Desktop.sh    # copy & paste the following into this empty file
#!/bin/bash
# Fix the Xfce 4.10 Desktop "Behaves Badly"
xfwm4 --replace
exit
$ sudo chmod +x /Fix_Xfce_Desktop.sh
$ sudo apt-get install gksu    # Gtk+ frontend to su & sudo
$ sudo apt-get install cryptsetup    # support for Linux encrypted drives
$ sudo apt-get install cifs-utils    # needed to mount network drives
$ sudo apt-get install libav-tools    # missing due to unchecked options
$ sudo reboot
  • Settings Manager » Desktop
    • Background → White Hexagon w/ Blue Ubuntu Studio symbol
    • Menus → UNCHECK Desktop Menus items
    • Icons → CHECK only Removable Devices
  • Settings Manager » Appearance
    • Style → Bluebird
    • Icons → Ubuntu Studio (already selected)
    • Fonts » Default Font → Droid Sans 10 (already selected)
    • Settings » Event sounds → CHECK “Enable event sounds
  • Settings Manager » Removable Drives and Media
    • Storage
      • CHECK Mount removable drives when hot-plugged
      • CHECK mount removable media when inserted
    • Multimedia
      • CHECK Play audio CDs when Inserted
      • Audio CDs Command: audacious cdda:// ← to auto-play Audio CDs when inserted
      • CHECK Play video CDs and DVDs when inserted
      • Video CDs/DVDs Command: vlc -f dvd:///dev/sr0 ← to auto-play DVDs (full-screen) when inserted
  • Settings Manager » Power Manager
    • On AC » Monitor
      • Switch off Display → Never
      • Put Display to Sleep → 60 Minutes
  • Settings Manager » Workspaces » Number of Workspaces
    • 1st workspace name → On Internet
    • 2nd workspace name → On this PC
  • Panel Preferences » Panel 1 → Remove
  • Office » Extra Office Applications → CHECK libreoffice office productivity suite (metapackage) » OK
    • $ sudo apt-get install libreoffice-style-sifr
  • Set Firefox homepage to https://www.google.ca
  • http://www.google.com/linuxrepositories/ → download the correct .deb file & install Google Chrome
    • in Downloads right-click the .deb file » open with Ubuntu Software Centre » Install Package
    • run Chrome → UNCHECK Make Google Chrome default browser → Start Chrome
    • run Chrome again → Don't ask again → skip for now
  • download the correct .deb file & install the “Google Voice and Video Chat” Plugin
  • Panel audio icon » Sound Settings » check/configure the audio controls/settings

Additional Configuration Performed

  • Rsync the following backed up folders back into my home directory:
    • Documents
    • eBooks
    • FireStore ← where I store Downloads files that I am keeping long-term.
    • Music
    • Pictures
    • Videos
    • VOIP
    • Websites
    • .conkyrc ← my current/existing Conky configuration file
    • .rednotebook ← data files for RedNoteBook
    • .gconf/apps/gnome-gmail-notifier ← data files for GNOME Gmail Notifier
    • Settings Manager » Session and Startup » Application Autostart → Add
      • Name: Conky
      • Description: conky system monitor
      • Command: conky -p 30
  • Synaptic Package Manager » Quick filter → linux kernel
    • Install “linux-headers-generic” and “linux-image-generic”
To boot the Generic Kernel:
Hold down the left shift key to get the Grub Boot menu → Select the “Advanced” boot option → Now select the Generic Kernel to boot. (Both low-latency and the Ubuntu menu items boot the low-latency kernel)
  • Ubuntu Software Centre
    • install RedNoteBook
    • install GNOME Gmail Notifier
    • Install FBReader
    • Install XSane Image scanning program
  • Install the current version of gscan2pdf
    $ sudo add-apt-repository ppa:jeffreyratcliffe/ppa
    $ sudo apt-get update
    $ sudo apt-get install gscan2pdf libsane-perl
YouTube-dl GUI is a “good enought” solution – as the audio quality this can download is limited. That with the newer uploaded videos (since 2012?) an “mp4 [1280×720]” video should give you 192kbps audio. Otherwise, the audio is limited to 128kbps– due to the way YouTube itself now limits the quality of what an application like this can download.
kb/linux/studio14p04_workstation_install_notes.txt · Last modified: 2016/01/13 20:35 (external edit)