principles projects CNMI-Guam old projects |
HFDR /
Installation of customized Mint 22.1 64-bit on Generic HFDR field machinesThese master instructions are for installing a system from custom Mint 22.1 iso image, which contains all the configurations required, using the Cubic toolbox. We recommend to always perform installation through this customized image. We also recommend installing Cubic on the lab reference machine for creating additional customization. 0. First, configure BIOS:
A USB key connected to a USB-3 port (blue) may not be recognized at boot, always use a USB-2 port (black). 2. Prepare a USB key with the customized Mint 22.1 64-bit radlab desktop version; from an ubuntu laptop:
3. Select icon "Install mint 22.1". installation", then "Erase disk and install mint". Verify that the SSD disk is partitioned with a small UEFI/fat32 boot partition, and a single ext4 partition: Device Start End Sectors Size Type /dev/sda1 2048 1050623 1048576 512M EFI System /dev/sda2 1050624 488396799 487346176 232.4G Linux filesystem 4. Define user ruser (1000) (group ruser(1000) will be automatically created) and set password (defaut ruser), enable automatic login. 5. Define computer name as radlab-xxxx, the 4 letters of the site name (four letters are preferred by the international network). Some processing scripts assumes that the site name is exactly radlab- followed by 4 letters and may break if another number of characters is used. 6. Set time zone to any US time zone. Do not use another country time zone even if you set up from another country, because this will enable a non-English local setting, altering the date format, and several scripts as well as crontab may break down. Chose any US time zone now, and reset tzdata to UTC later. 7. Computer will ask to restart when installation is complete; remove the USB key; reboot into the new installation and login as ruser. 8. Add local hosts: add at the start of the file after the 127 hosts: 128.171.154.150 realtime sunrise.satlab.hawaii.edu 128.171.154.155 sunset sunset.satlab.hawaii.edu 128.171.219.11 hfr hfr.satlab.hawaii.edu
172.16.2.12 dtacq dtacq1 172.16.2.101 pa 9. Set the proper time/clock and locale: root# dpkg-reconfigure tzdata and set timezone to "Etc" then "UTC" through the menus (use TAB then ENTER to go 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 the data files time-tags. If you installed the PC being 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, mandarin, spanish or french (this affects date, and any script that would use date, which are many). root# vi /etc/default/locale and change back all entries to "en_US.UTF-8", deleting any other language. In some instances it may be necessary to run root# dpkg-reconfigure locales unselecting any other language, and to add LANG=en_US.UTF-8 to /etc/environment. Correcting a wrongly set locale can be frustrating. 10. Enable firewall:
# enable UFW ufw enable # allow all outgoing ufw default allow outgoing # disallow all incoming ufw default deny incoming on eno1 # SSH ufw allow 22 # Allow all from local net (pi, dtacq, ...) #ufw allow from 192.168.1.0/24 # UFW Status ufw status verbose
11. Listen to outside network time servers:
root# vi /etc/ntpsec/ntp.conf
# minimal /etc/ntp.conf driftfile /var/lib/ntpsec/ntp.drift leapfile /usr/share/zoneinfo/leap-seconds.list statsdir /var/log/ntpstats/ statsdir /var/log/ntpsec/ statistics loopstats peerstats clockstats filegen loopstats file loopstats type day enable filegen peerstats file peerstats type day enable filegen clockstats file clockstats type day enable pool 0.ubuntu.pool.ntp.org iburst pool 1.ubuntu.pool.ntp.org iburst pool 2.ubuntu.pool.ntp.org iburst pool 3.ubuntu.pool.ntp.org iburst
root# service ntp restart
root# ntptrace
localhost: stratum 2, offset 0.000139, synch distance 0.004383
12. Configure ruser account:
# m h dom mon dow command 29 * * * * /bin/csh /home/wera/bin/mergebeam.csh > /home/ruser/logs/mergebeam.log 2>&1 # launch acquisition, specify number of seconds as parameter 0,15,30,45 * * * * /home/ruser/bin/radar_control_gnss 650 >> /home/ruser/logs/radar_control.log 2>&1 # log of temperatures 0,10,20,30,40,50 * * * * /home/ruser/bin/gettemps # log of dtacq voltages 0 * * * * /home/ruser/bin/getvolts # launch mkdaydir 0 14 * * * /home/ruser/bin/mvdaydir # daily backup 0 0 * * * /usr/bin/rsync -av /home/wera /home/ruser /media/ruser/RADATA 13. Enable password-less login: To allow pushing the data for automated upload from this NUC machine to target hosts, copy/paste file ~/.ssh/id_rsa.pub (pre-configured with the ruser account, see below) to ~/.ssh/authorized_keys on each target machine. Verify that the password-less login works by doing ruser$ ssh remote_machine and adding key to known_hosts. 14. Format archive disk (Data) New disks MUST always be reformatted as follows: root# sudo gparted
root# blkid
root# UUID= /home/ruser/data ext4 errors=remount-ro 0 2 root# mount -a 15. Format archive disk (Backup) New disks MUST always be reformatted as follows: root# sudo gparted
root# chown -R ruser.ruser .
/dev/sdc1 /media/ruser/RADATA ext4 errors=remount-ro 0 3 16. Configure the D-Tacq Follow the separate instructions. 17. Matlab
root# chmod 755 /usr/local/MATLAB/R2014b root# find /usr/local/MATLAB/R2014b/ -type d -exec chmod 755 {} \; 18. Python ruser$ apt install python3-matplotlib ruser$ apt install python3-numpy ruser$ apt install python3-scipy |