Linux Kernel Quick Boot with Kexec


by Ramses Soto-Navarro ramses@sotosystems.com, 7/12/2024

Linux Kernel Quick Boot with Kexec


Overview

Kexec quickly boots a Linux kernel and initramfs without resetting the hardware. Typically the reboot command also resets the hardware which takes longer for the entire reboot process to finish. The Kexec process is very convenient for rebooting a system very fast in order to troubleshoot or diagnose a quick reboot; it saves time, especially for servers that take very long during the BIOS post, in order to check memory and very the hardware. This technique is useful for test purposes or during times when rebooting quickly during an emergency is extremely necessary. Literally it can reboot your system in seconds. Here we run Kexec through a simple bash script which will run it in the background and then exit the script; otherwize your remote SSH remote terminal gets stuck in La La Land. The audience is experienced Linux administrators.

[Read more…]

Local Root Certificate Notes


by Ramses Soto-Navarro ramses@sotosystems.com, 3/20/2024

Local Root Certificate Notes


Overview

Notes on how to download and install a local Microsoft RootCA authority certificate and test a signed certificate in Linux; this will prevent the dreaded local self-signed certificate prompts; will only work on internal computers/servers within the same local domain where Microsoft AD RootCA servers are available. Here as an example we are using the local certificate installation on a test system called myserver.myexample.com.

[Read more…]

FreeBSD 1.0 Qemu Installation


by Ramses Soto-Navarro ramses@sotosystems.com, 9/28/2023

FreeBSD 1.0 Qemu Installation


Overview and Brief History

Brief steps on how run FreeBSD 1.0 on on Qemu under GNU/Linux. FreeBSD 1.0 was one of the first stable versions of BSD UNIX for the Intel 386 personal computer, released June 10, 1993. The intent of this document is to demonstrate how to install FreeBSD 1.0 as a virtual guest under Qemu; and as a point of reference for computer historians, and in order to study one of the first classic BSD UNIX for the 386 architecture. The first version of BSD UNIX for the Intel 386 was ported and compiled by professor William Jolitz and his wife Lynne, back in 1989. For the first time they got Unix to run on a Intel 386 IBM PC. They called it 386BSD. Before that, and beginning in the mid 70s, BSD UNIX was mostly run on the DEC VAX, the DEC PDP, and a few other similar mainframe computers.

freebsd-1.0-qemu.jpg

After 386BSD was ported to the personal computer in 1989, a few years went by with no updates. All development was stopped because AT&T was attempting to sue Berkeley University over assumed source code copyrights violations, which was settled many years later. Meanwhile in 1991 Linus Torvalds from Finland, using the Minix scholastic operating system as a starting point, wrote a new kernel, which actually became part of the most favorite Unix like open source operating system in actuality: GNU/Linux. However BSD UNIX is an initial pioneer of all things open source.

After it’s inception 386BSD was quickly abandoned, and as a result, in late 1992, a fork was begun: NetBSD 0.8. For me this version is very difficult to install because the installation method is very buggy. However, a year later, in 1993, yet another 386BSD fork beat them to it: FreeBSD 1.0. It ran very stable from the start, and it had a good installation wizard. This is the one we are installing here.

BSD UNIX has been considered as the most important software ever written. Most modern operating systems became possible because of the source code examples of BSD UNIX; including all the current versions of UNIX, Apple Darwin, the PS4 game console, iPhone, IOS. One of its most significant contributions is the TCP/IP source code, which is the main networking protocol of every operating system in use today.

The ultimate running target in this article is a virtual machine using the latest built-in package of Qemu 5.2.0 under Debian 11 x86_64. However, I could not get it to install. I had to first install it with Bochs running under an old version of Debian 5 (i386), then convert the raw disk image over to qcow2 format. After that I can then run it in any Qemu virtualization platform. Obviously, we want to run it in Qemu using it’s built in kernel hypervisor capabilities, rather than the Bochs emulator; Qemu is much faster and simpler, and offers native tap networking, and built-in kernel virtualization capabilities.

Many sites show you how to download and run their own already preinstalled Qemu image of FreeBSD 1.0, but they do not show you the steps involved for how to actually install it yourself. Here we demonstrate that briefly.

NOTE: I got FreeBSD 1.0 to run on Bochs and Qemu, but not KVM, since it does not include the NE2000 (ISA) emulation. Modern hypervisors dropped all ISA capabilities. ISA architecture was used until the mid 90s; then everything was switched to PCI DMI architecture. So it doesn’t make sense to include it in most modern virtualization platforms. Kudos to the Qemu team for still including vintage ISA device drivers.

The Plan:

1. First install the FreeBSD 1.0 OS on Bochs under Debian 5 i386. The simplest way I could get it to install. The installation floppies crash with Qemu or Bochs under any other more modern OS, including Debian 10/11 x86_64. Afterward convert the Bochs image to qcow2, then run it with any Qemu.
2. Will need another FreeBSD already running in order to extract the distribution tarballs. I used another older FreeBSD 3.3 (i386), from the late 1990s, which is compatible (itself also running on another Qemu session).
3. For native virtual networking under Qemu, you will need a GNU/Linux network bridge configured, and the ability to auto-create a tap network interface; Debian does this with script /etc/qemu-ifup. These steps are out of scope, but I may add them later.

The audience is experienced UNIX and Linux administrators.

[Read more…]