GParted → to create the /boot & Physical LVM partitions
lvm2 pv
partition → Partition » Deactivateswap
partition → Partition » Swap offext2
Primary Partition (to be used by /boot … suggested label is bootlvm
)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 240GB 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 40G -n root lts14 # 40GiB Volume for the Linux OS # lvcreate -L 16G -n swap lts14 # 16GiB Swap # lvcreate -L 160G -n home lts14 # 160GiB for the User home directories # exit $ exit
/dev/sda1
→ Change… → Use as: Ext2
w/ Mount Point: /boot
/dev/mapper/lts14-root
→ Change… → Use as: Ext4
w/ Mount Point: /
/dev/mapper/lts14-swap
→ Change… → Use as: swap area/dev/mapper/lts14-home
→ Change… → Use as: Ext4
w/ Mount Point: /home
/dev/sda
lts14-home
is UNCHECKED to preserve the user files– including any per-user system/program configuration files– during the reinstall.
/var
on its own LVM Volume:Terminal Commands ← to put the Squid Deb Proxy data on it's own LVM volume
$ 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
RESTART SYSTEM
$ 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
# /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
… Make certain “-client
” is at the end of the above command! (Don't install a 2nd .deb server!)
$ sudo add-apt-repository ppa:otto-kesselgulasch/gimp $ sudo apt-get install python-software-properties $ sudo add-apt-repository ppa:libreoffice/ppa $ sudo add-apt-repository ppa:gottcode/gcppa $ sudo apt-get update
linux-firmware-nonfree
← Search for “firmware” to find thisRESTART SYSTEM
p7zip
p7zip-full
then p7zip-rar
← Search for “p7zip” to find all of these.xubuntu-community-wallpapers
← Search for “community wallpapers”shimmer-themes
← Search for “shimmer”ubuntustudio-icon-theme
← Search for “ubuntustudio”ttf-mscorefonts-installer
← Search for “ttf” to find thishunspell-en-ca
← Search for “en-ca” to find this … provides Canadian English dictionary supportsmplayer
← an excellent “plays everything” Media Player … that remembers where you left off viewingbanshee
audacious
$ sudo apt-get remove xscreensaver xscreensaver-data xscreensaver-gl $ sudo apt-get install light-locker light-locker-settings
$ sudo apt-get install gksu leafpad # used to make text file editing easy $ gksu leafpad /etc/X11/xorg.conf # copy/paste the below text into bottom of file
Section "ServerFlags" Option "BlankTime" "0" Option "StandbyTime" "0" Option "SuspendTime" "0" Option "OffTime" "0" Option "DontZap" "false" EndSection
audacious cdda://
vlc -f dvd:///dev/sr0
vlc
https://www.google.ca
Search engines
” & change bookmark Folder: to “Bookmarks Toolbar”gdebi-gtk
” » “Install” buttongdebi-gtk
” » “Install” buttonLVM Partition Terminal Commands ← to create a Public Drive on it's own LVM partition
$ sudo lvcreate -L 100G -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 $ gksu leafpad /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.
$ leafpad 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
$ sudo lvcreate -L 100G -n lxc lts14 $ sudo lvcreate -L 100G -n lxcsnap lts14 $ sudo mkfs -t ext4 /dev/mapper/lts14-lxc $ sudo mkfs -t ext4 /dev/mapper/lts14-lxcsnap
$ sudo mkdir /var/lib/lxc $ sudo mkdir /var/lib/lxcsnaps $ sudo nano /etc/fstab # add the following lines to this file
/dev/mapper/lts14-lxc /var/lib/lxc ext4 defaults 0 2 /dev/mapper/lts14-lxcsnap /var/lib/lxcsnaps ext4 defaults 0 2
RESTART SYSTEM
$ sudo apt-get install lxc lxctl lxc-templates screen debootstrap yum
lts14
for Ubuntu 14.04LTS, and lts12
for Ubuntu 12.04LTS.) Replace [password]
in the below command lines with a password of your choice. (For the Ubuntu template, the default username & password is ubuntu
& ubuntu
.)
$ sudo su # lxc-create -n ubuntu14lts -t ubuntu -- -a amd64 -r trusty --user lts14 --password [password] # lxc-create -n ubuntu12lts -t ubuntu -- -a amd64 -r precise --user lts12 --password [password] # exit
$ sudo apt-get install dnsmasq $ sudo nano /etc/dnsmasq.d-available/lxc # add the following @ bottom of this file
# Add the IP address for .lxc DNS resolution here. server=/lxc/10.0.3.1
$ sudo nano /etc/default/lxc-net
… In this file, remove the leading # to UNCOMMENT the following line ⇒ LXC_DOMAIN=“lxc”
$ sudo lxc-start -n ubuntu14lts -d # start ubmutu14lts container in the background $ sudo lxc-info -n ubuntu14lts # example output below:
Name: ubuntu14lts State: RUNNING PID: 7463 IP: 10.0.3.249 CPU use: 2.31 seconds BlkIO use: 40.86 MiB Memory use: 27.78 MiB Link: vethRFW7N4 TX bytes: 2.15 KiB RX bytes: 6.29 KiB Total bytes: 8.44 KiB
$ ping ubuntu14lts.lxc # example output below:
PING ubuntu14lts.lxc (10.0.3.249) 56(84) bytes of data. 64 bytes from 10.0.3.249: icmp_seq=1 ttl=64 time=0.052 ms 64 bytes from 10.0.3.249: icmp_seq=2 ttl=64 time=0.069 ms 64 bytes from 10.0.3.249: icmp_seq=3 ttl=64 time=0.065 ms 64 bytes from 10.0.3.249: icmp_seq=4 ttl=64 time=0.065 ms 64 bytes from 10.0.3.249: icmp_seq=5 ttl=64 time=0.067 ms 64 bytes from 10.0.3.249: icmp_seq=6 ttl=64 time=0.069 ms 64 bytes from 10.0.3.249: icmp_seq=7 ttl=64 time=0.070 ms 64 bytes from 10.0.3.249: icmp_seq=8 ttl=64 time=0.068 ms 64 bytes from 10.0.3.249: icmp_seq=9 ttl=64 time=0.066 ms ^C --- ubuntu14lts.lxc ping statistics --- 9 packets transmitted, 9 received, 0% packet loss, time 7999ms rtt min/avg/max/mdev = 0.052/0.065/0.070/0.010 ms
$ sudo lxc-stop -n ubuntu14lts # shutdown ubuntu14lts container