Skip to main content

Inventions and kill switch




Inventions and Kill Switch


In the human history, just after the iron age, people looked for more. Something better than metal. Maybe stronger like diamonds? Or maybe cheaper and lighter. By 1800s people knew almost everything about metal and what they could have done with them. Multiple industrial usages like vehicles, weapons, home appliances and much more.

In 1860, an English chemist known as Joseph Swan produced the first Carbon Fibers. Later on it was identified that could be produced stronger that most metals, no corrosion, water resistant and much lighter. Still perhaps it was bit expensive to produce.

People wanted more. In 1907 a Belgian chemist known as Leo Hendrik invented an unusual material that with some improvements it was virtually indestructible by any natural cause. This was one of the great inventions ever. It could build almost everything. Home appliances, food containers even vehicles. More than anything it was really cheap to build. Now we live in 2019 more than 100 years passed. Most of the stuff that built from them are still there without any decay.

Guess what! Leo’s last name was Baekeland and his invention was Bakelite the very first synthetic polymer or plastic. Later on, scientists were able to make better plastic materials and people built almost everything with them. What they forgot to build was a proper kill switch to this indestructible material. Thus they keep piling up on the earth and in the ocean, leaving the animals and the whole world in danger. Even there were kill switches or methods of recycling, they are either expensive or  inefficient. Probably its about time that someone discover a better alternative recycling method before it is too late.

So, it could be a good idea to think about a kill switch also whenever you build something.


Did you know that there is a kill switch in Ubuntu machines? 


In older Ubuntu versions, it was enabled by default. Later on it was identified as a potential security bug and they have disabled it. Still, we can see the switch out there waiting to be found.

The idea of the usage is, whenever your system is crashed or non-responsive, you can make it reboot just by pressing a magic key sequence.

shortcut keys - Alt + sysrq + REISUB
When you type in the last key "B", the system is going to halt whatever the program that is currently running and start rebooting itself.

However, with the newer Ubuntu versions (12.10 and newer), this is turned off by default. You can see how to enable it by reading the config file

/etc/sysctl.d/10-magic-sysrq.conf


------------------------------------------------------------------------------------------
# The magic SysRq key enables certain keyboard combinations to be
# interpreted by the kernel to help with debugging. The kernel will respond
# to these keys regardless of the current running applications.
#
# In general, the magic SysRq key is not needed for the average Ubuntu
# system, and having it enabled by default can lead to security issues on
# the console such as being able to dump memory or to kill arbitrary
# processes including the running screen lock.
#
# Here is the list of possible values:
#   0 - disable sysrq completely
#   1 - enable all functions of sysrq
#  >1 - enable certain functions by adding up the following values:
#          2 - enable control of console logging level
#          4 - enable control of keyboard (SAK, unraw)
#          8 - enable debugging dumps of processes etc.
#         16 - enable sync command
#         32 - enable remount read-only
#         64 - enable signalling of processes (term, kill, oom-kill)
#        128 - allow reboot/poweroff
#        256 - allow nicing of all RT tasks
#
#   For example, to enable both control of console logging level and
#   debugging dumps of processes: kernel.sysrq = 10
#
kernel.sysrq = 176
------------------------------------------------------------------------------------------




Comments

Popular posts from this blog

Install Docker on Windows 11 with WSL Ubuntu 22.04

This is to install Docker within Ubuntu WSL without using the Windows Docker application. Follow the below steps. Install Ubuntu 22.04 WSL 1. Enable Windows Subsystem for Linux and Virtual Machine platform Go to Control Panel -> Programs -> Programs and Features -> Turn Windows features on or off 2. Switch to WSL 2 Open Powershell and type in the below command. wsl --set-default-version 2 If you don't have WSL 2, download the latest WSL 2 package and install it.  3. Install Ubuntu Open Microsoft Store and search for Ubuntu. Select the version you intend to install. I'd use the latest LTS version Ubuntu 22.04. Click on the Get button. It will take a couple of minutes to download and install. 4. Open up the installed Ubuntu version that was installed. If you get an error like the below image, make sure to install the WSL2 Kernel update .  If it's an older Ubuntu version the error message would be something like the image below. Error: WSL 2 requires an update to its ...

How to fix SSLHandshakeException PKIX path building failed in Java

TL ; DR 1. Extract the public certificate of the website/API that you are trying to connect from your Java application. Steps are mentioned in this post 2. Use the Java keytool to install the extracted certificate into the "cacerts" file (Trust store) keytool -import -trustcacerts -alias <domain name> -file <public certificate>.cert -keystore /path_to_java_home/jre/lib/security/cacerts -storepass changeit 3. Restart your Java application Exception A typical exception stack trace would look like below. javax.net.ssl. SSLHandshakeException : sun.security.validator.ValidatorException: PKIX path building failed : sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1959) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) at sun.security.ssl.Handshake...

Automatically open Chrome developer tools in a new tab

Sometimes we need to check the console or the network transactions of a link that opens up in a new tab. By default, the Chrome developer tools are not opening in a new tab. So, by the time when we hit F12 and open the dev tools, part of the information we needed could be already gone.  There's a setting in dev tools where you can keep the dev tools open automatically in a new tab. To enable that, hit F12 and open up the dev tools. Click on the settings icon in the top right corner. In the Preferences section, scroll down to the bottom. You'll be able to find the option to Auto-open DevTools for popups. Select the checkbox and we're good to go!