In the instructions below, # indicates a root prompt and a command to be executed as root, and $ indicate a user prompt and a command to be executed as the current user (typically wera). Preformatted text between horizontal lines should be copied verbatim into configuration files.
1. Prepare USB key with Ubuntu 14.04.2 LTS 64-bit desktop version; from an ubuntu laptop:
- Applications->System tools->Administration->Startup Disk Creator
- shutdown laptop and plug USB key on target machine to be installed.
- start machine and select "Try Ubuntu without installing."
2. Allocate drive space.
Open terminal window
Enter sudo password
Create a partition table of type msdos, and then three partitions in the table:
/dev/sda1 Primary partition type ext4 (83) 32 Gb (1Gb = 1024 Mb)
/dev/sda2 Primary partition type swap (82) 72 Gb (3x real memory)
/dev/sda3 Primary partition type ext4 (83) remaining of the disk (~15Gb)
If a GPT partition table already exists, you must delete it and recreate a msdos table; this is important for later grub installation. Be careful not to create extended partitions; their management in case of recovery/surgery is more difficult.
Commit changes and exit.
3. Select icon "Install Ubuntu 14.04.2" Choose "Something else" when allocating disk space, and change the given partitions so that:
/dev/sda1 is ext4, formatted, and mounted as /
/dev/sda3 is ext4, formatted, and mounted as /home
DO NOT MODIFY THE PARTITION SIZE OR PARTITION TABLE TYPE! If you do, Ubuntu will create additional guid partition tables with subsequent problems.
7. Computer will ask to restart when installation is complete; remove the USB key. If the computer does not reboot, there is a GRUB problem. This happens frequently, fix as follows:
- boot again using USB key and select "Try Ubuntu 14.04 without installing"
- open a terminal window and type
- enter radlab password
- mount the partition that has Ubuntu installed on it: this is should normally be mount /dev/sda1 /mnt. Check that the correct partition is mounted with ls /mnt; you should see directories /bin, /boot, /etc ...
- install GRUB:
grub-install --root-directory=/mnt /dev/sda''
- DO NOT INCLUDE THE PARTITION NUMBER HERE!!!
- remove the USB key before the boot sequence starts.
8. Create wera account.
Open terminal window:
$ sudo su (enter ocomex password)
# useradd -u 500 -g 100 wera
# passwd wera set wera password
# cd /home
# mkdir wera
# chown wera.users wera
# vi /etc/passwd set wera shell to /usr/bin/tcsh
# vi /etc/login.defs
edit to read:
9. Enable sudoer for wera:
# vi /etc/group
edit line sudo:x:27:radlab , appending wera: sudo:x:27:radlab,wera
Verify by typing su wera, entering wera password, then sudo su and entering wera password again, that you can gain root priviledge. We no longer put root password in /etc/shadow, as there are security issues associated with allowing direct root login.
10. Update and install various packages. At this stage, it is necessary to have access to the internet. If package updates fail, check apt-get and make sure there are no damaged packages in the install function. Some package install errors occur when Ubuntu Application Installer/Updater is turned off. Simply re-enabling the Auto-update feature to "Check for updates and let me know before installing" works to resolve this issue. If issue persists, you may have to downgrade some packages and then re-upgrade after everything is installed:
# Sudo su
# (sudo pw)
# apt-get update
# apt-get -y install apache2
# apt-get -y install build-essential
# apt-get -y install bvi
# apt-get -y install chromium-browser
# apt-get -y install csh
# apt-get -y install gifsicle
# apt-get -y install gimp
# apt-get -y install gparted
# apt-get -y install gpsbabel
[[apt-get -y install ia32-libs
[[apt-get -y install icomlib1c2
[[apt-get -y install icomlib1-dev Trouble installing these packages
[[apt-get -y install icomlib-bin
[[apt-get -y install icomlib-doc
# apt-get -y install imagemagick
# apt-get -y install isc-dhcp-server
# apt-get -y install libio-socket-inet6-perl
# apt-get -y install libio-socket-ssl-perl
# apt-get -y install libnet-ssleay-perl
# apt-get -y install netpbm
# apt-get -y install nfs-kernel-server
# apt-get -y install ntp
# apt-get -y install openjdk-6-jre-headless
# apt-get -y install openssh-server
# apt-get -y install rpm
# apt-get -y install screen
# apt-get -y install setserial
# apt-get -y install smartmontools
# apt-get -y install tcsh
# apt-get -y install traceroute
----- Server Programs to Install -----
# apt-get -y install dc
# apt-get -y install xinit
# apt-get -y install gphoto2
# apt-get -y install jhead
[[apt-get -y install ffmpeg Problems installing these 2 server apps
[[apt-get -y install heirloom-mailbox
11. Set the proper time/clock and locale:
# vi /etc/default/rcS
change the variable UTC to yes if not yet set; this will ensure that the hardware clock runs on UTC, not local time. Then
# dpkg-reconfigure tzdata
and set timezone to "None of above" then UTC through the menus; this will ensure that the crontabs run on UTC, not local time. It is important to do this now to avoid irreparable confusion in data files time-tags.
If you installed the PC from outside the US, the installer may have outsmarted you by setting the default language based on where your IP is located, and you may see day/month in tagalog, spanish or french (this affects date, and any script that would use date).
# vi /etc/default/locale
and change back all entries to "en_US.UTF-8"
Sometimes the network will delay boot. Edit /etc/init/failsafe.conf and comment out all the sleep commands.
12. Install Gnome Desktop
# apt-get install gnome-session-fallback
This is the leanest gnome desktop manager distribution, which we prefer to the default unity. When you first login, click on yourname then on the gear, and select the display manager gnome-fallback (metacity). That will set gnome as the default desktop for all your subsequent logins.
# vi /etc/apache2/envvars
# chown -R wera:users /var/lock/apache2
# /etc/init.d/apache2 restart
# a2enmod include
# a2enmod userdir
# a2enmod cgid
# service apache2 restart
# vi /etc/apache2/mods-available/userdir.conf
add new stanza:
Open a browser, type localhost in the address bar and make sure apache2 answers. The page should say "Apache2 Ubuntu Default Page. It works!"
14. Enable shutdown with multiple users logged in
# vi /etc/polkit-1/localauthority/50-local.d/usershutdown.pkla
Insert the following lines and save to create the file:
15. Google earth
If post-processed kml files need to be displayed:
dpkg -i google-earth-stable_current_amd64.deb
apt-get install -f
Useful to install for support when working on the field.
dpkg --add-architecture i386
add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
apt-get install skype pulseaudio:i386
# apt-get install jfsutils
Install 4 WesternDigital RED (NAS) 4Tb drives in front drive bays
Use sgdisk to edit /dev/sdb1 to contain 128 GB partition for swap and /dev/sdb2 as the remainder of the disk space 3.4 TB to ext4
Duplicate /dev/sdb to /dev/sdc,d,e with sgdisk -R (capital R, not lowercase), be careful as sgdisk does not use logical argument forms and has very different command line arguments from sfdisk. sgdisk must be used because GUID partitions exist on the disk, sfdisk will see the GUID partitions and refuse to copy the drives. GUID partitions must be used because msdos partitions have a maximum size of 2 Tb.
# sgdisk -R /dev/sdc /dev/sdb
# sgdisk -R /dev/sdd /dev/sdb
# sgdisk -R /dev/sde /dev/sdb
# apt-get install mdadm
# mdadm --create /dev/md0 --raid-devices=4 --level=raid6 /dev/sdb2 /dev/sdc2 /dev/sdd2 /dev/sde2
# mdadm --assemble /dev/md0
# mdadm --detail /dev/md0
# mkfs.ext4 /dev/md0
22. Change the swap file and mount /dev/md0 into home directory.
# vi /etc/fstab
Comment out the swap partition on /dev/sda2 (72 Gb swap partition on SSD), SSD should not be used as swap file because of limited number or writes, only uncomment swap on /dev/sda2 if swap partitions on raid disks fail.
Edit /dev/md0 to be /home
Save changes and exit.
23. Last cleanup and update:
Launch update manager, and update all packages one more time. Then exit the update manager, open terminal window as root,
# apt-get update
# apt-get install -f
# apt-get upgrade
# apt-get autoremove