# fetlab ## Unlock and start after boot ```shell zfs_mount.sh mount mkdir /var/run/motioneye && chown motion /var/run/motioneye/ && service motioneye restart && service motioneye status ``` ## Update and reboot ```shell apt update && apt list --upgradable apt dist-upgrade && apt autoremove service motioneye stop zfs_mount.sh reboot ``` ## Debian Installation Boot Image Debian Netinstall on USB stick, Advanced Options->Expert Install Language: English, Location: other->Europe->Austria Locale: en_US.UTF-8, Additional Locale: de_AT.UTF-8, System Locale: en_US.UTF-8 Keyboard: German Detect and mount CD-ROM, Load installer components: no extra Detect network hardware, Configure Network: Hostname: fetlabserv, IP 128.131.95.223/24 domain htu.tuwien.ac.at Setup Users and Passwords: shadow, allow root login, no normal user Configure the clock: NTP Server: tutimea.tuwien.ac.at,tutimeb.tuwien.ac.at,tutimec.tuwien.ac.at, Detect disks, partition disks: manual msdos table, 32GB primary for RAID RAID: Create MD device RAID1 part LVM in raid1 LVM: volume group root on /dev/md0, logical volume sys 24GB, swap 6GB root-roo btrfs for / root-swap as swap Generic Kernel Mirror, no nonfree, contrib, allow backported install with ssh server and standard sys utilities Install Grub on /dev/sda(to removable media path) Install Grub on /dev/sdb(to removable media path) reboot, log in as root edit /etc/ssh/sshd_config set PermitRootlogin to yes service sshd reload ssh-copy-id root@fetlabserv from client edit /etc/ssh/sshd_config set PermitRootlogin to prohibit-password ## Setup ZFS ```shell for i in a b c d e f g h i; do echo -n "/dev/sd$i: "; hdparm -I /dev/sd$i | awk '/Serial Number/ {print $3}'; done lsblk sgdisk -n1:0:0 -t1:BF01 /dev/sda sgdisk -n1:0:0 -t1:BF01 /dev/sdb cryptsetup luksFormat /dev/disk/by-id/ata-ST4000VN008-2DR166_ZDH35RRA-part1 cryptsetup luksFormat /dev/disk/by-id/ata-ST4000VN008-2DR166_ZDH469JD-part1 zfs_mount.sh mount zpool create -o ashift=12 -o autoexpand=on -o autoreplace=on -O atime=off -O compression=lz4 -O acltype=posixacl -O xattr=sa lab mirror /dev/mapper/ata-ST4000VN008-2DR166_ZDH35RRA-part1 /dev/mapper/ata-ST4000VN008-2DR166_ZDH469JD-part1 /sbin/zpool scrub lab zfs create lab/rec mkdir /var/lib/motioneye zfs create -o mountpoint=/var/lib/motioneye lab/rec/motion ``` ## Get video input resolutions ```shell ffmpeg -f video4linux2 -list_formats all -i /dev/video0 ``` ## Formats and File sizes 96x72 1.9K 640x480 55K Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '3_2017-01-01_02-23-38.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf56.25.101 Duration: 00:15:01.96, start: 0.000000, bitrate: 203 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x480, 202 kb/s, 9.99 fps, 25 tbr, 16k tbn, 2k tbc (default) Metadata: handler_name : VideoHandler ## Mainboad DP965LT