User Tools

Site Tools


tech:linux:ubuntu:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tech:linux:ubuntu:start [2022/03/04 14:13]
rk4n3
tech:linux:ubuntu:start [2023/04/21 10:11] (current)
rk4n3
Line 10: Line 10:
     * ''​lvextend -L +28G /​dev/​ubuntu-vg/​ubuntu-lv''​     * ''​lvextend -L +28G /​dev/​ubuntu-vg/​ubuntu-lv''​
     * ''​resize2fs /​dev/​ubuntu-vg/​ubuntu-lv''​     * ''​resize2fs /​dev/​ubuntu-vg/​ubuntu-lv''​
-  * Create LVM volume group on primary local storage: +  ​* If more than one disk is present, other disk(s) can be set up for LVM 
-    * ''​pvcreate -M2 /​dev/​yourdiskdevice''​ +    ​* Create LVM volume group on primary local storage: 
-    * ''​vgcreate -s 64 yourvgname /​dev/​yourdiskdevice''​ +      * ''​pvcreate -M2 /​dev/​yourdiskdevice''​ 
-  * Create ​home LV: +      * ''​vgcreate -s 64 yourvgname /​dev/​yourdiskdevice''​ 
-    * ''​lvcreate -L 64G -n home yourvgname ; mkfs -t ext4 /​dev/​yourvgname/​home''​ +  * Set up home LV, use either your default VG in case of single disk system, or new VG if other disk(s) available
-    * Edit ''/​etc/​fstab''​ and add entry to mount the new home LV on ''/​home''​ +      * ''​lvcreate -L 64G -n home yourvgname ; mkfs -t ext4 /​dev/​yourvgname/​home''​ 
-    * Move user home directories to new volume, with something like this: \\ //**NOTE**: best done as root, all other logins logged out//<​code bash>cd /+      * Edit ''/​etc/​fstab''​ and add entry to mount the new home LV on ''/​home''​ 
 +      * Move user home directories to new volume, with something like this: \\ //**NOTE**: best done as root, all other logins logged out//<​code bash>cd /
 mkdir home_ mkdir home_
 mv ./home/* ./home_/ mv ./home/* ./home_/
Line 25: Line 26:
     * For wifi: wpasupplicant     * For wifi: wpasupplicant
     * For audio: jack2 pulseaudio pulseaudio-module-jack qjackctl     * For audio: jack2 pulseaudio pulseaudio-module-jack qjackctl
-    * For X: xorg xinit xauth x11-xserver-utils xterm notion fvwm stalonetray+    * For X: xorg xinit xauth x11-xserver-utils xterm notion fvwm stalonetray ​xscreensaver xscreensaver-gl-extra xscreensaver-data-extra
     * tigervnc-viewer     * tigervnc-viewer
-  * Networking ​''/​etc/​cloud/​cloud.cfg.d/​50-curtin-networking.cfg''​ & ''/​etc/​netplan/​50-cloud-init.yaml'':​ \\ //(Note: ''​wifis''​ section optional)//<​code yaml>​network:​+  * Networking ''/​etc/​netplan/​whateveryourfilenameis.yaml'':​ \\ //(Note: ''​wifis''​ section optional)//<​code yaml>​network:​
   version: 2   version: 2
   renderer: networkd   renderer: networkd
Line 49: Line 50:
 ===== Virtualization Server ===== ===== Virtualization Server =====
 ==== Bridged Networking ==== ==== Bridged Networking ====
-  * In ''/​etc/​cloud/cloud.cfg.d/50-curtin-networking.cfg'' ​''/​etc/​netplan/​50-cloud-init.yaml'':<​code yaml> ​ bridges:+  * Packages: ''​bridge-utils''​ 
 +  * Populate ​''/​etc/​sysctl.d/20-bridge.conf''​ with:<​code>​net.bridge.bridge-nf-call-ip6tables=0 
 +  net.bridge.bridge-nf-call-iptables=0 
 +  net.bridge.bridge-nf-call-arptables=0</​code>​ 
 +  * Populate ''/​etc/​udev/​rules.d/99-bridge.rules'' ​with:<​code>​ACTION=="​add",​SUBSYSTEM=="​module",​KERNEL=="​br_netfilter",​RUN+="/​sbin/​sysctl -p /​etc/​sysctl.d/​20-bridge.conf"</​code>​ 
 +  * In ''/​etc/​netplan/​whateveryourfilenameis.yaml'':<​code yaml>network: 
 +  version: 2 
 +  renderer: networkd 
 +  ethernets:​ 
 +    enp4s0: 
 +      dhcp4: false 
 +      dhcp6: false 
 +  ​bridges:​
     br0:     br0:
-      macaddress: DE:​AD:​BE:​EF:​00:16 +      macaddress: DE:​AD:​BE:​EF:​10:01 
-      interfaces: [enp24s0]+      interfaces: [enp4s0]
       dhcp4: true       dhcp4: true
       parameters:       parameters:
Line 121: Line 134:
         * Create filesystem directly on the physical device         * Create filesystem directly on the physical device
         * Add entry to ''/​etc/​fstab''​ to mount the filesystem at desired location         * Add entry to ''/​etc/​fstab''​ to mount the filesystem at desired location
-  * Sample VM start-up script: ​<code bash> +  * Sample VM start-up script: ​[[:tech:virt:start|startvm]]
-#​!/​bin/​bash +
-VMNAME=baseline +
-VNC="​11"​ +
-MAC0="​DE:AD:BE:EF:​00:​11"​ +
-MAC1= +
- +
-VMHOME=/​var/​lib/​kvm +
-CPUT=kvm64 +
-CPUS=4 +
-VMRAM=4096 +
-XGM=headless +
-#XGM= +
- +
-# Boot device - d=cdrom, c=disk +
-BOOT="​-boot c" +
-#​SIM="​-cdrom ${VMHOME}/​iso/​CentOS-7-x86_64-Minimal-1810.iso"​ +
- +
-HD0="​-drive file=vda,​if=virtio"​ +
-#​HD1="​-drive file=/​dev/​yourvgname/​${VMNAME}home,​if=virtio,​index=1,​media=disk,​format=raw"​ +
-HD1=""​ +
-#​HD2="​-drive file=/​dev/​yourvgname/​${VMNAME}docker,​if=virtio,​index=2,​media=disk,​format=raw"​ +
-HD2=""​ +
- +
-NIC0="​-netdev bridge,​id=${VMNAME}eth0,​br=br0 -device virtio-net-pci,​netdev=${VMNAME}eth0,​mac=${MAC0}"​ +
-NIC1=""​ +
- +
-cd $VMHOME/​$VMNAME +
-if [ "​$XGM"​ = "" ​]; then +
- qemu-kvm -machine pc,​accel=kvm -name $VMNAME -cpu ${CPUT} -smp $CPUS -m $VMRAM $BOOT ${NIC0} ${NIC1} $HD0 $HD1 $HD2 $SIM +
-elif [ "​$XGM"​ = "​headless" ​]; then +
- qemu-kvm -machine pc,​accel=kvm -name $VMNAME -cpu ${CPUT} -smp $CPUS -m $VMRAM $BOOT -vnc localhost:​${VNC} -daemonize ${NIC0} ${NIC1} $HD0 $HD1 $HD2 $SIM +
-else +
- echo "​Unknown mode"​ +
-fi +
-</​code>​+
  
 ==== Advanced/​Other Virtualization ==== ==== Advanced/​Other Virtualization ====
Line 195: Line 173:
   * vim-gtk   * vim-gtk
   * openssh-server   * openssh-server
-  * ksh 
   * htop   * htop
   * git   * git
Line 220: Line 197:
  
 ==== Disable PulseAudio auto-spawn ==== ==== Disable PulseAudio auto-spawn ====
-If you want to run Jack for low-latency high-performance audio, you'll need to make sure that Jack can grab your audio interface directly, which means you won't want PulseAudio to grab it on startup. ​ Disabling PulseAudio auto-spawn is most likely necessary, so you can start it manually after Jack is running:+If you want to run Jack for low-latency high-performance audio, you'll need to make sure that Jack can 
 +grab your audio interface directly, which means you won't want PulseAudio to grab it on startup. 
 +Disabling PulseAudio auto-spawn is most likely necessary, so you can start it manually after Jack is running: 
 +  * Stop already-running (auto-spawned) instance(s):<​code>​systemctl --user stop pulseaudio.socket 
 +systemctl --user stop pulseaudio.service 
 +sudo systemctl stop pulseaudio 
 +sudo systemctl disable ​ pulseaudio</​code>​
   * Change in ''/​etc/​pulse/​client.conf'':​ <​code>​autospawn = no   * Change in ''/​etc/​pulse/​client.conf'':​ <​code>​autospawn = no
 daemon-binary = /​bin/​true ​ daemon-binary = /​bin/​true ​
 </​code>​ </​code>​
 +  * Change in ''/​etc/​pulse/​daemon.conf'':​ <​code>​daemonize = no</​code>​
   * Rename startup file: <code bash>mv /​etc/​rc2.d/​S50pulseaudio /​etc/​rc2.d/​K50pulseaudio</​code>​   * Rename startup file: <code bash>mv /​etc/​rc2.d/​S50pulseaudio /​etc/​rc2.d/​K50pulseaudio</​code>​
 +  * Completely disable any depedency service spawning: <​code>​sudo systemctl mask pulseaudio</​code>​
  
 ==== Route PulseAudio through Jack ==== ==== Route PulseAudio through Jack ====
Line 417: Line 402:
  
 ====== Some Hardware Trivia ====== ====== Some Hardware Trivia ======
 +
 +==== Mouse lag on Raspberry Pi 4b ====
 +In ''/​boot/​firmware/​cmdline.txt'',​ add to end of line:
 +<​code>​usbhid.mousepoll=8</​code>​
  
 ==== ACEPC W5 Pro: wifi ==== ==== ACEPC W5 Pro: wifi ====
tech/linux/ubuntu/start.1646424822.txt.gz · Last modified: 2022/03/04 14:13 by rk4n3