FreeBSD 11 installation notes

Base install

Ports, first time
portsnap fetch
portsnap extract

Ports, updating
portsnap fetch
portsnap update

Checking installed packages against ports
Using portupgrade, (“pkg install portupgrade” first)
portversion -v
Updating, using ports binaries or source
portupgrade -vaP

Cleanup of /var/db/pkg/

Apache HTTPd

Default document root
/usr/local/www/apache24/data
Configuration location
/usr/local/etc/apache24/

MySQL

Configuration file: /usr/local/etc/mysql/my.cnf
Datadir: /var/db/mysql
Initial MySQL root password in $HOME/.mysql_secret

To change password for root
root@localhost [(none)]> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this
root@localhost [(none)]>
root@localhost [(none)]> alter user ‘root@localhost’ IDENTIFIED BY ‘new_password’;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
root@localhost [(none)]> set password = ‘new_password’;
Query OK, 0 rows affected (0.02 sec)

PHP

Configuration location
/usr/local/etc/
/usr/local/etc/php/

Prepare
pkg install png-1.6.29
pkg install jpeg
pkg install libxml2
pkg install libltdl
pkg install gmake
pkg install freetype2
pkg install curl

Install PHP and modules
pkg install php71
pkg install php71-imap
pkg install php71-mcrypt
pkg install php71-curl
pkg install php71-ctype
pkg install php71-dom
pkg install php71-fileinfo
pkg install php71-filter
pkg install php71-gd
pkg install php71-hash
pkg install php71-iconv
pkg install php71-json
pkg install php71-mysql
pkg install php71-mysqli
pkg install php71-openssl
pkg install php71-pcntl
pkg install php71-session
pkg install php71-simplexml
pkg install php71-tokenizer
pkg install php71-xml
pkg install php71-zlib

Install Apache module
pkg install mod_php71

ffmpeg / youtube-dl

Creating video or audio clips using ffmpeg

ffmpeg clip audio interval with starting and end time

Cut part from video file from start position to end position with FFmpeg

Using ffmpeg to cut up video

Convert video format without re-encoding
ffmpeg -i input.m2ts -c:v copy -c:a aac -strict experimental -b:a 128k output.mp4

Replacing audio in a video

Replacing video audio using ffmpeg

Create a single image video (for audio clips uploaded to Youtube)

Combine one image + one audio file to make one video using FFmpeg

youtube-dl

youtube-dl is a python script that allows you to download and view videos from different platforms for archiving and offline viewing
downloading videos to a specific path with youtube-dl
How to download only subtitles of videos using youtube-dl
Change youtube-dl download output location

Windows 10 (swedish)

Uppdateringshistorik för Windows 10 (1703)

https://support.microsoft.com/sv-se/help/4018124/windows-10-update-history

Uppdateringshistorik för Windows 10 (1607)

https://support.microsoft.com/sv-se/help/4000825

wmic

https://superuser.com/questions/447277/list-all-installed-software-on-pc
https://community.spiceworks.com/how_to/111076-using-wmic-to-retrieve-a-list-of-all-installed-programs
https://social.msdn.microsoft.com/Forums/vstudio/en-US/a9beeed3-99f0-4627-ba1e-aa0161fa58c9/wmic-invalid-xsl-format-or-file-name?forum=windowsgeneraldevelopmentissues

Lista alla installerade program, html
wmic /output:Installed.htm product get /format:”%WINDIR%\system32\wbem\en-US\hform”

Lista alla installerade program, csv
wmic /output:Installed.csv product get /format:”%WINDIR%\system32\wbem\en-US\csv”

VirtualBox – convert RAW image to VDI and otherwise

Cloned from: https://blog.sleeplessbeastie.eu/2012/04/29/virtualbox-convert-raw-image-to-vdi-and-otherwise/

VirtualBox – convert RAW image to VDI and otherwise

VirtualBox command-line interface (VBoxManage) provides an easy way to convert raw disk image to the VDI/VMDK format and otherwise.

Let’s assume that we have raw image of the sdb device:

sudo dd if=/dev/sdb of=./sdb.raw

To use it with VirtualBox we need to convert it to the VDI format:

VBoxManage convertdd sdb.raw sdb.vdi --format VDI

To use it with VMware we need to convert it to the VMDK format:

VBoxManage convertdd sdb.raw sdb.vmdk --format VMDK

Convert between VDI/VMDK formats:

VBoxManage clonehd sdb.vdi sdb.vmdk --format VMDK
VBoxManage clonehd sdb.vmdk sdb.vdi --format VDI

Convert to the RAW image:

VBoxManage clonehd sdb.vdi sdb.raw --format RAW

Alternative solution to get back raw image after applying modifications is to use qemu-img command from qemu package:

qemu-img convert -f vmdk sdb.vmdk -O raw sdb.raw

Now we can write image to the device:

sudo dd if=./sdb.raw of=/dev/sdb

Create a bootable USB-disk for installations and tools using .iso images

The Acronis way

This method uses Grub4Dos and standard windows/dos utilities. Works only for smaller images (less than 2GB) and only for Legacy boot (not UEFI). See links at the end of the article for other methods.

Cloned from: https://kb.acronis.com/content/57232

Downloading grub4dos

Download grub4dos utility and grub installer to your computer and unpack them.
Currently, the latest version of grub4dos is grub4dos-0.4.4.zip and the latest version of grub installer is grubinst-1.1-bin-w32-2008-01-01.zip.

Making USB bootable

1. In Windows Explorer, open the installer’s folder and select grubinst_gui.exe:

2. Run the application:
Windows XP: Double-click grubinst_gui.exe
Windows 7 or later: Right-click grubinst_gui.exe and select Run as administrator:

3. Select Disk, then click Refresh and select the drive you want to create a bootable media on:

You can detect your drive by its size. In this example an 8GB flash drive is used.

3. In Part List click Refresh.

4. From the dropdown box select Whole disk (MBR):

5. Check the Don’t search floppy option, leave all the other options unchecked:

6. Click Install.
If the installation completes successfully, you will see this message:

7. Press Enter.

8. In Windows Explorer open the grub4dos folder, locate grldr and copy it to the target drive:

Creating ISO files of Acronis products

  1. Run the media builder of Acronis True Image.
  2. Select ISO file when offered to choose media destination:
  3. Create the ISO. You can save the ISO file directly to your flash drive or copy in later.
  4. Run the media builder of Acronis Disk Director.
  5. Select ISO file when offered to choose media destination:
  6. Create the ISO. You can save the ISO file directly to your flash drive or copy in later.

Setting up multiproduct boot

  1. Copy the ISO files to the flash drive if you haven’t done it yet. Now you should have 3 files on the drive:
  2. Open Notepad.
  3. Insert this content:
    timeout 10
    default 0title Acronis Disk Director
    map –mem –heads=0 –sectors-per-track=0 (hd0,0)/<DiskDirector>.iso (hd32)
    map –hook
    chainloader (hd32)
    boot

    title Acronis True Image
    map –mem –heads=0 –sectors-per-track=0 (hd0,0)/<TrueImage>.iso (hd32)
    map –hook
    chainloader (hd32)
    boot

    title CommandLine
    commandline

    title Reboot
    reboot

    title Halt
    halt

where <DiskDirector> is the name of the ISO file created in Acronis Disk Director and <TrueImage> is the ISO file created with Acronis True Image.

4. Save the file as menu.lst to the root directory of your flash drive. In Save as type select All files, otherwise the file might be saved as a .txt-file while we need a .lst-file.

You can double-check the file extention in Windows Explorer:

If you don’t see the extention, check this article for help.

Now your USB drive is ready and you can boot your computer with it.

Other methods

YUMI – Multiboot USB Creator

Ventoy – A New Bootable USB Solution

Recommended tools to put on the USB-drive

MiniTool Partition Wizard

The best partition manager
Version 9 and 9.1 is downloadable from here: http://www.it.nrru.ac.th/download/utilities/ (140MB)

HDClone

HDClone 6 Free Edition

Trinity Rescue Kit

Trinity Rescue Kit