How To Update Raspberry Pi

Start by updating the list of repository packages:

sudo apt update

When this is done, run the update command:

sudo apt dist-upgrade

Follow any instructions and wait for the Pi update. When you’re done, type in:

sudo apt clean

This will delete unnecessary files that were uploaded during the update. Finish by restarting:

sudo reboot

When your Raspberry Pi is restarted, you will use the latest version of Raspbian.

For more info, read here

What is transcoding?

A Blu-ray disk contains video chapters and their corresponding audio tracks. the video is generally in h.264 format (think of that as a word document in .docx format). the audio is generally in Dolby digital or DTS formats (think of that as .flac or .mp3).

To get that data off of the disk, you need a way for shit to play it back and a way for those 2 files (the chapter and its audio) to be held together. This is where formats like .mp4 and .mkv come in. Think of those as .7z or .zip or .rar.

Now, if you dump the Blu-ray disk’s audio/video track into .mkv without touching it (ie without attempting to make it any smaller) you’ll have a very large .mkv file (20-40gb in size, depending on if it came from a single or dual layer blu ray disk).

That’s the basic setup we’re working with to answer question on transcoding.

So now there are a number of scenarios. maybe you have a computer in the same house on the same network and that computer can play back anything and everything, because its a computer and the software was designed for it. Plex will simply send the raw file over the network and the player will decode it and play it back.

lets say you’re using something special on your home network like a mobile phone or appleTV or chromecast or something. Those devices are only built to play back certain file formats (the .docx and .flac we spoke of earlier) and they can only read those formats from certain containers (.mkv and .mp4).

In this scenario, plex will do its best to not touch anything possible. but it might need to change it from .mkv to .mp4 or vice versa. it might be forced to do this if you enable subtitles. this takes practically 0 processing power and it will not affect the quality in any way.

lets say you took your video and wanted to make it smaller so you used HEVC (h.265) to re-encode it. This is a lossy encode and is very difficult to encode/decode quickly so a lot of hardware currently doesnt support it. but the resulting file size is tiny in comparison (half or less). but now your appleTV and mobile phone wont play it back because it doesnt know what the heck h.265 is. Now plex will convert on-the-fly to h.264 (this is transcoding) and also change the contianer (also transcoding) in order for the file to be of the appropriate file type for you to be able to play back.

Lets say you have friends and family on varying internet connections/speeds, with varying devices, and you yourself only have limited upload speeds available to you because fuck telecom industry and fuck the FCC.

Now plex can be told to limit bandwidth usage and limit CPU usage for transcoding tasks and limit transcode quality so that you are able to send that file to many people at the same time without completely locking down your computer or your network.

You can also tell plex to store multiple copies of 1 file in different formats so that you dont have to transcode on-the-fly. This would be especially useful for massive files that you can convert slowly to very high quality and keep laying around, so that when a user asks for the file, they are simply sent the file without your CPU and GPU going crazy.

In laymans terms for the most part you dont really need to worry about it. But realistically, you’ll run into weird boundary cases in which some people are not able to play things back properly (stuttering/buffering/freezing) and then you’ll need to understand what is happening under the hood in order to take steps to fix the underlying issue or make smart decisions about when/where to invest money into the setup.

You can read more here.

Difference between 802.3af, 802.3at and 802.3bt PoE?

IEEE has a few standards for PoE to help keep everything working properly. There are three main PoE standards, all varying in the amount of power they supply. There are 802.3af, 802.3at and 802.3bt.

All three of these are referred to as ‘auto-sensing’ PoE, which means if you plug a laptop in to a port with PoE turned on, it won’t blow the device up as a level of auto-negotiation happens between the PoE switch and device, when it asks for power.


802.3af is also known as just ‘PoE’ on most switches, it provides up to 15.4W and is most used for less powerful wireless access points and IP cameras. VoIP phones also tend to use 802.3af to as they don’t need a massive amount of power.


802.3at is basically the same as 802.3af, but it just provides more power, up to 30W and is generally referred to as ‘PoE+’ on most switches. The higher amount of power allows better quality cameras to be used, such as 4K cameras and PoE switches which are powered up by PoE and provide power down stream, such as the UniFi Switch Flex from Ubiquiti, it is powered by 802.3at on the uplink and can provide 802.3af PoE on four other ports.


802.3bt is one of the newest standards and provides up to 60W to each device it is referred to as PoE++ usually. This is used for really demanding devices, notably lighting products and screens. Ubiquiti has LED light panels for office ceilings which are powered by 802.3bt.

create virtual machine from existing windows 10 pc

Recently my ages old laptop started acting funny. I am assuming it might die soon. Before getting a new laptop I needed to crate a VHD of my old laptop for any reference.

The native tool from Microsoft to create VHD is Disk2vhd. This will create virtual machine and disk that can be attached in Hyper-V running in a separate machine. Here is the link;

Here is the installation instruction of this VHD inside Hyper-V.

First of all create a new generation 2 VM that we’ll use with our new VHDX we created using Disk2VHD. Don’t create a new vdhx but select to use an existing one and point it to the one we just created with Disk2VHD. Rename it if needed to something more suitable.

Don’t boot the VM but add a DVD and attach the Windows Server ISO of the version your vhdx contains to the DVD.

Move the DVD to the top of the boot order I firmware.

he VM will boot to the DVD when you hit a key.

Select your language and keyboard layoout when asked and the don’t install or upgrade the OS but boot

Type diskpart and  list the disks. Select the disk we need (the OS disk, the only one here) and list the volumes. You can see that volume 3 off 99MB is RAW. That’s not supposed to be that way. So let’s fix this by creating boot loader directory structure, repair the boot record by creating the boot sector & copy the needed boot files into it.


select volume 3

assign drive letter L:


That’s it we can now us that 99MB volume to make our disk bootable to windows again.  Type Exit to leave diskpart.

So now we have a formatted boot partition we can create the need folder structure and fix the boot record and configure our UEFI bootloader

Switch to the L: volume

create efi\microsoft\boot folder structure for the bootloader as show below with the md command(make directory)

Type: bootrec /fixboot to create the bootrecord

Type: bcdboot C:\Windows  /l en-us /s l: /f ALL

This creates the BCD store & copies the boot files from the windows system directory

Just click Continue to exit and continue to Windows Server 2019. Remember to eject DVD drive.

.. and voila, your new VM has now booted.

Read more here;

Disk2VHD on a Generation 2 VM

Here is the troubleshooting tips while using disk2vhd tool;

Another free tool is VMWare VCenter Converter. Here is the guide;

A Brief Introduction to Cat6 vs Cat6a vs Cat7 vs Fiber

To put it simple, the twisted pair specifications: Cat6 (Class E), Cat6a (Class EA), and Cat7 (Class F) all support 10GBASE-T applications with differentiated performances.

Check the below chart to get a full understanding of the specifications and typical applications of Cat6 vs Cat6a vs Cat7.

ALL backward compatible – you can plug a newer twisted pair cable into a device that is designed for a slower cable.

The fastest Ethernet cable yet is Cat8, which can support data rate up to 40Gbps, four times of Cat6a cable. If you are looking for high-speed data center and server room cabling, check out Cat8 Cable for 25GBASE-T and 40GBASE-T Network.

The minimum grade of cabling to be deployed in a 10GBASE-T network should be Cat6a cable.

Fiber Cable

Multimode Fiber Patch Cables are a good choice for transmitting data and voice signals over shorter distances. They are typically used for data and audio/visual applications in local-area networks and connections within buildings. Multimode cables are generally color-coded orange or aqua;

The Aqua Fiber Patch Cables are for higher performance 10Gbps, 40Gbps, and 100Gbps Ethernet and fiber channel applications.

Singlemode Fiber Patch Cables are the best choice for transmitting data over long distances. They are usually used for connections over large areas, such as college campuses and cable television networks. They have a higher bandwidth than multimode cables to deliver up to twice the throughput. Most singlemode cabling is color-coded yellow.