tips:ubuntu:18.04

18.04 bionic

From running ZFS ubuntu on guest install newer system in new ZFS fs

sudo su
DISTRO=bionic
apt install -y debootstrap
zfs create -o canmount=noauto -o mountpoint=/$DISTRO rpool/ROOT/$DISTRO
zfs mount rpool/ROOT/$DISTRO
mount -o remount,dev /$DISTRO
debootstrap $DISTRO /$DISTRO
mount --rbind /dev  /$DISTRO/dev
mount --rbind /proc /$DISTRO/proc
mount --rbind /sys  /$DISTRO/sys
chroot /$DISTRO /bin/bash --login

fuse

dpkg-reconfigure tzdata

keyboard localization

dpkg-reconfigure keyboard-configuration
echo 'LANG="it_IT.UTF-8"' > /etc/default/locale
 
locale-gen it_IT.UTF-8
locale-gen en_US.UTF-8
update-locale LANG=it_IT.UTF-8 LC_MESSAGES=POSIX
 
DISTRO=bionic
cat > /etc/apt/sources.list <<EOF
deb http://archive.ubuntu.com/ubuntu $DISTRO main universe
#deb-src http://archive.ubuntu.com/ubuntu $DISTRO main universe
 
deb http://security.ubuntu.com/ubuntu $DISTRO-security main universe
#deb-src http://security.ubuntu.com/ubuntu $DISTRO-security main universe
 
deb http://archive.ubuntu.com/ubuntu $DISTRO-updates main universe
#deb-src http://archive.ubuntu.com/ubuntu $DISTRO-updates main universe
EOF
 
ln -s /proc/self/mounts /etc/mtab
apt update
 
apt install --yes --no-install-recommends linux-lowlatency zfs-initramfs
 
cat > /etc/fstab <<EOF
rpool/ROOT/$DISTRO / zfs defaults,noatime 0 0
EOF

post install

sudo apt install -y ubuntu-restricted-extras
sudo apt-get -y install pigz vim inxi iftop htop xclip curl
sudo apt-get install -y gir1.2-gtop-2.0 gir1.2-networkmanager-1.0  gir1.2-clutter-1.0
sudo apt install -y gpaste gnome-shell-extensions-gpaste
sudo apt install -y gnome-shell-extension-system-monitor
sudo apt-get install -y chrome-gnome-shell
sudo apt-get install -y zsh

sudo add-apt-repository -y ppa:webupd8team/java
sudo apt update
sudo apt install -y oracle-java8-installer 

sudo apt-add-repository -y ppa:numix/ppa
sudo apt update
sudo apt install -y numix-gtk-theme numix-icon-theme-circle numix-plymouth-theme

disable spectre checking in /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=deadline noibrs noibpb nopti"

enable ethernet device management

touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf

reset gnome 3

rm -rf .gnome .gnome2 .gconf .gconfd .metacity .cache .dbus .dmrc .mission-control .thumbnails ~/.config/dconf/user ~.compiz*

paper icons (and theme ?)

sudo add-apt-repository -y ppa:snwh/pulp
sudo apt install -y paper-icon-theme

adapta gtk theme

sudo add-apt-repository -y ppa:tista/adapta
sudo apt install -y adapta-gtk-theme

disable lock screen on resume

gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend false
gsettings set org.gnome.desktop.screensaver status-message-enabled false
gsettings set org.gnome.desktop.screensaver idle-activation-enabled false

This will drop you into an initramfs shell:

  Start your computer. Wait until the Grub menu appears.
  Hit e to edit the boot commands.
  Append break=mount to your kernel line.
  Hit F10 to boot.
  Within a moment, you will find yourself in a initramfs shell.

If you want to make this behavior persistent, add GRUB_CMDLINE_LINUX_DEFAULT=“break=mount” to /etc/default/grub and run grub-mkconfig -o /boot/grub/grub.cfg.

/etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", ATTR{idProduct}=="adb0", MODE="0660", GROUP="plugdev", SYMLINK+="android%n"
sudo udevadm control --reload

latest drivers in ppa

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update

drivers

sudo apt install nvidia-driver-396 
# nvidia-cuda-dev nvidia-cuda-toolkit

cuda: * download version 9.2 binary installation

sudo ./cuda_9.2.148_396.37_linux.run

Now cuda is in /usr/local/cuda-9.2/ path. Create environment

/etc/ld.so.conf.d/cuda.conf
/usr/local/cuda-9.2/extras/CUPTI/lib64
/usr/local/cuda-9.2/lib64
sudo ldconfig
/etc/profile.d/cuda.sh
export PATH=$PATH:/usr/local/cuda-9.2/bin

testing cuda

/usr/local/cuda-9.2/extras/demo_suite/deviceQuery

testing vidia GPU

sudo apt-get install glmark2
glmark2

for example:

  • GeForce GTX 1070 Ti/PCIe/SSE2 glmark2 Score: 12257
  • GeForce GTX 750 Ti/PCIe/SSE2 glmark2 Score: 6865

phoronix testing

sudo apt-get install phoronix-test-suite

phoronix-test-suite default-benchmark openarena xonotic tesseract gputest unigine-valley

amdgpu-pro-18.20-579836.tar.xz

sudo usermod -a -G video $LOGNAME
./amdgpu-pro-install --y --opencl=legacy,rocm

grub options

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=deadline noibrs noibpb nopti amdgpu.si_support=1 radeon.si_support=0"

/etc/modules (load early)

amdgpu
update-initramfs -k all -u
reboot

testing

sudo apt-get install glmark2
glmark2

for example:

  • AMD Radeon (TM) RX 460 Graphics (POLARIS11 / DRM 3.23.0 / 4.15.0-22-lowlatency, LLVM 6.0.0) glmark2 Score: 6303
  • tips/ubuntu/18.04.txt
  • Last modified: 2018/08/21 07:01
  • by scipio