Category Archives: Uncategorized

A deep-dive into UEFI Booting

[According to my own standards, this post about “UEFI booting” was only like 70% “ready” — I had it pending in “draft” state for many months, because I was lacking the time to finish it… I now decided to release it in its current state, simply because I believe it will still be very useful to many people interested in the topic…]

Before we actually dive deep into how UEFI booting works, a short and simple introduction is due.

Introduction

What is UEFI, anyway?

UEFI could be called the successor of the old BIOS concept. It is a unified version and successor of “EFI”, which was an architecture for a platform firmware used to boot operating systems (in the following abbreviated as “OS”), and the corresponding interface to interact with the firmware and the operating system.

The advantages of UEFI over the traditional BIOS are, among others, the following:

  • Boot disks with large partitions (over 2 TB), using GUID partitioning (GPT),
  • network capabilities already in pre-OS phase, and
  • modular design.

Boot Mechanism

So, how does booting with UEFI work?

When you enter your UEFI, you will find a user interface that shows all devices that have been detected, and that support booting. Usually that includes all your hard drives.

You can freely define a desired boot order (regardless of hardware paths, i.e. the way your drives are connected, be it via an SATA port, be it via an NVME slot), i. e. the primary OS that should be booted, if that fails the next OS that should be tried, etc. That’s called your “boot configuration”, and it resides in your motherboard’s NVRAM. (a concept that’s basically the successor of what used to be called “CMOS” in the old days of the BIOS). More specifically, we speak about “UEFI Variables“, which allow the OS and the firmware to interact.

When UEFI’s Firmware Boot Manager wants to boot an OS, it first needs to load something called the OS “Boot Manager.” Common OS boot managers are:

  • BOOTMGFW.EFI used to load Windows, or
  • SHIMX64.EFI used to load Linux

The OS boot manager is located on the “EFI system partition” (ESP). This is a small partition (usually only a few 100 M) at the start of your hard drive, formatted with basically a FAT filesystem. FAT is a very simple filesystem, so that the code to parse it and load files from it can be reasonably small and fit into a boot firmware.

A typical disk layout for a Windows installation may look as follows:

UEFI /EFI System Partition as seen under Windows

The first partition is the ESP, then comes the Windows boot and system drive (with a drive letter of C:), and then comes the recovery partition.

Apart from boot loaders, the ESP can contain kernel images or (device) drivers, e. g. to support hardware that must be initialized prior to the start of the OS, or to give access to a complex filesystem that holds the actual OS to be booted.

Depending on which OS you want to boot, the OS boot manager then loads

  • in the case of Linux: the OS kernel, and the kernel in turn loads the OS, or
  • in the case of Windows: the Windows Boot Loader (\Windows\system32\winload.efi)

Boot Configuration Details

Now that we got a good overview of the mechanism as a whole, let’s dive into the details. Let’s look at the boot configuration of my machine. To do so, invoke the below command (I did it under Ubuntu 23.04, but it should work the same under any reasonably current Linux distro where the tool is installed):

# efibootmgr -v
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0000,0002,0003
Boot0000* Windows Boot Manager    HD(1,GPT,a39d5736-7aaf-4be0-b6b6-0852ba2f7803,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS………x…B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}…R…………….
Boot0002* ubuntu    HD(1,GPT,280ea55d-c182-5242-bb52-a2b40812190c,0x800,0x219800)/File(\EFI\UBUNTU\SHIMX64.EFI)..BO
Boot0003* ubuntu    HD(1,GPT,91b56f9f-3526-404b-b681-1c684551ec4f,0x800,0xd87be)/File(\EFI\UBUNTU\SHIMX64.EFI)..BO

So, what does the above tell us? First, we see that “(Boot)0003” is the boot entry used to start the currently running system. Secondly, the order in which boot is tried is 0000, 0002, and then 0003. So by default, Windows (by the “Windows Boot Manager”) will be booted. Then we see the three boot entries. The star/asterisk (*) after the boot entry shows that all these entries are “active.”

What about the remaining info in the above command output? Immediately after the boot entry, we see the names that are also displayed on screen by the Firmware Boot Manager (“Windows Boot Manager” and two times “ubuntu”). We then see references to the ESPs used to boot these OS.

HD obviously means “hard drive”, then we see a 1 which refers to the first partition on the respective drive, then we see GPT which refers to the partitioning table format, and then we see a UUID. To find the respective partitions, we can use the below command:

# blkid --match-token TYPE=vfat
/dev/nvme0n1p1: LABEL="UBUNTU_TEMP" UUID="EC76-8E7F" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="280ea55d-c182-5242-bb52-a2b40812190c"
/dev/nvme1n1p1: SEC_TYPE="msdos" LABEL_FATBOOT="UBUNTU_MAIN" LABEL="UBUNTU_MAIN" UUID="8140-E4C0" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI" PARTUUID="91b56f9f-3526-404b-b681-1c684551ec4f"
/dev/sda1: UUID="40AD-1127" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="a39d5736-7aaf-4be0-b6b6-0852ba2f7803"

The PARTUUID values in the above output match the UUIDs in the boot configuration as shown by efibootmgr. So, the ESPs are located by searching for the partitions’ UUIDs. That means that you can replug your drives to different ports, or even copy partitions to different drives, and the UEFI boot mechanism will still find them. That’s a nice and very stable design.

UEFI User Interface

Now, let’s enter the UEFI and look at some of the details there. My PC’s motherboard is an MSI, and to enter the UEFI I need to press “F2” after the beep when powering on the PC (from “off” state, not when suspended to RAM, i.e. “sleeping”!) or restarting it.

# lspci
[...]
21:00.0 Non-Volatile memory controller: Sandisk Corp WD Blue SN570 NVMe SSD 1TB
2b:00.0 Non-Volatile memory controller: Sandisk Corp WD Blue SN570 NVMe SSD 1TB

Making Paper dragons 🐉

Hello! A couple of days ago, I made some amazing paper dragons! Let me tell you about it!😁

First, I took a piece of paper to make the base. It’s really easy! 😎 After I folded the paper pieces and glued all together, I drew the design. It was a beautiful pumpkin! 🎃 It perfectly fits with Halloween! 👻 I coloured the design and glued it on the base. And voila! I’ve got a cute tiny paperdragon! 🐉 After I was finished with that, I took my phone and made a video with my new dragon. A Halloween special! 🎃

My Halloween dragon, his name is Pumpkin.

I posted the video and waited. Sadly my video didn’t get lot’s of likes.😔 But I had fun, and that’s the most important!🤪 I also made a tornado dragon!

My tornado dragon, his name is Tornado.

For that one, I made a video, too. I really like pretty paper dragons. Making them is my hobby.

I hope you liked my blog! Bye, and try to make some paper dragons, too!😊🫶

“Excire Search 1.4” Review

This is a quick-and-dirty review of the Excire Search 1.4.1 plugin for Adobe Lightroom. I got this plugin for free in an online “advent calendar”. As it was free, I can’t expect anything, obviously. But still I can tell you what I think about the tool. 😉

Let me mention that version 1.4 is not the latest version as of today. So the more recent 2.0 version may be performing much better than the one I tested, but I have no way of verifying this.

So, what is this tool about? Excire Search is a photo organizing software that sifts thru your photos in order to organize them. The company claims Excire Search is “The best software for organizing your photo treasures”, using AI it analyzes and tags photos automatically so that “image management [is] fun again.”

Ok, let’s see how helpful the tool actually is. One category that Excire creates in your keyword hierarchy is “Image Color.” So if you are searching for images of a certain color, this should be helpful, right? Well, have a look yourself. This is the hierarchy it created for some 15K photos I have in this Lightroom catalog:

“Image Color” keywords

Let’s have a look at some of the images Excire classifies as “black”:

Continue reading “Excire Search 1.4” Review

How to manually rebuild your Windows BCD Store

I recently had a mishap where on a system that I had just upgraded from Windows 10 to Windows 11 the Windows BCD Store (Boot Configuration Data Store) was suddenly messed up, presumably by a patch update I had taken earlier:

Blue screen showing “Wiederherstellung: Der PC muss repariert werden.” (German for: “Recovery: The PC must be repaired.”), hinting to a problem with the Windows BCD Store.

Many people will recommend in that situation to boot to a Windows Recovery Environment (RE) and execute the following:

>bootrec /rebuildbcd

But what if the scan for all Windows installation turns out not to identify yours?! Like in the below photo?

Photo of a Windows RE session, failing to automatically rebuild the Windows BCD Store

Are you SOL then?

Don’t despair.

The solution is actually quite simple. Other than the above which is supposed to be fully automatic, it involves some manual tasks, but it should be quite easy if you are at least a bit tech-savvy.

Continue reading How to manually rebuild your Windows BCD Store

Mein Internet funktioniert nicht, was tun?!

Diesen Hilfeschrei hat bestimmt jeder schon oft gehört. Aber nur die wenigsten wissen, wie man heraus finden kann, wo genau das Problem liegt.

Ich versuche in diesem Blogpost einmal, eine auch für Laien verständliche bzw. leicht anwendbare Anleitung zu liefern, wie man bei Internetstörungen zu Hause dem Problem auf die Spur kommen kann…

Zunächst einmal ein paar (wenige) Grundlagen. Ohne diese geht es einfach nicht.

Egal, was Sie im Internet tun, alles passiert auf Basis sogenannter “IP-Pakete“. Jeglicher Datenverkehr wird “zerhackt” und in Form von kleinen “Häppchen”, eben dieser IP-Pakete übertragen. Alle Geräte, die am Internet teilnehmen, haben eine bestimmte Rolle. Ihr Handy, Laptop oder PC ist in der Regel ein sogenannter “Client“, also ein “Kunde”, die Dienste, die Sie in Anspruch nehmen, werden durch sogenannte “Server” (“Bediener”) erbracht. Wie findet nun Ihr Client den passenden Server? Das funktioniert über ein System namens “DNS“. Es übersetzt für den Menschen lesbare Adressen, wie z. B. “amazon.de“, in IP-Adressen, die Ihr Endgerät für die tatsächliche Kommunikation mit dem gewünschten Dienst benutzt.

Wie werden aber die IP-Pakete zwischen Ihrem Endgerät (Handy, Laptop, Tablet, PC) und den Servern im Internet übertragen? Zunächst muss Ihr Endgerät mit Ihrem eigenen lokalen Netzwerk (auch “LAN” genannt) bei sich zu Hause verbunden sein. Dies kann über WLAN (auch “WiFi” genannt) oder Netzwerkkabel (auch “Ethernet”-Kabel genannt) passieren. Von dort geht es über Ihren Router zu Ihrem Internetprovider, und dann von dort ins Internet. Welche physikalische Verbindungstechnik (Teilnehmeranschlussleitung) Sie zur Anbindung an Ihren Provider verwenden ist grundsätzlich egal: DSL, TV-Kabel, Glasfaser oder sogar Mobilfunk (z. B. über einen Vodafone GigaCube).

Continue reading Mein Internet funktioniert nicht, was tun?!

Grundlagen der Android-Bedienung

Heute möchte ich einmal die Grundlagen der Android-Bedienung erläutern sowie die wichtigsten Bezeichnungen für die Bedienelemente. Ich beziehe mich hier auf ein “nacktes” Android 11, wie es von Google ausgeliefert wird, z. B. für die Pixel-Handys oder Handys von anderen Herstellern, die Teil der Android One-Reihe sind. Bei Geräten mit Android 10 sieht das aber alles sehr ähnlich aus.

Sie können diese Details auch bei Google nachlesen, dort sind diese jedoch nicht so schön illustriert wie hier.

Wenn keine App geöffnet ist, dann befindet man sich auf dem Startbildschirm (“Home Screen“). Dieser sieht in etwa so aus:

Startbildschirm

Die Icons (korrekterweise “Verknüpfungen” genannt, im Englischen “Shortcut“)), die man dort sieht, hat entweder der Benutzer selbst “von Hand” hinzugefügt (s. u.), oder sie werden (je nach Einstellung) bei Installation einer neuen App vom System automatisch hinzugefügt.

Durch horizontales Wischen nach links oder rechts kann man zwischen verschiedenen Startbildschirmen — so vorhanden — umschalten.

Continue reading Grundlagen der Android-Bedienung

Reset Amazon Fire TV Game Controller

Yesterday my daughter was playing a race game on our original Fire TV box, when the game controller suddenly failed.

The symptom was that you could no longer move the racing car with it, and also  the Fire TV user interface was no longer responsive. Also, the four white LEDs laid out vertically were “rolling,” i.e. the first lit up briefly, then went out, then the second lit up briefly, went out, etc. After the fourth LED went out, the first lit up again, and so on. Removing the batteries to “hard-reset” it didn’t work, neither did replacing the batteries help.

So I got in touch with Amazon support. They had no clue, and in the end they advised to do a factory reset of the TV box. That was not an option for me, as it would have meant a huge effort, and it wasn’t even clear whether it would help or not.

So I continued googling the problem, and then by chance I came across an article that explained how to reset a remote control. I thought why not try this on a game controller, and surprisingly this actually did the trick.

So the procedure for the game controller is the following:

  • hold the return arrow and the menu button and move the left joy stick to the left side for 15 seconds
  • unplug Fire TV
  • take out the game controller batteries for 1 minute
  • Plug in Fire TV.
  • When it booted up put the batteries back in and push no buttons for a minute.

Afterwards, the game controller was still paired to my Fire TV, and it was responsive again.

I hope this is helpful to someone.

POSTIDENT durch Online-Ausweisfunktion

Heute habe ich nach einigen Jahren (sic!) mal wieder die eID-Funktion meines Personalausweises benutzt, diesmal auf dem Handy. Ich habe eine Lufthansa AirPlus-Kreditkarte bestellt, um mir meine Reisekostenabrechnungen etwas zu erleichtern…

Ehrlich gesagt war ich überrascht, wie relativ reibungslos das Ganze funktioniert hat. Ganz ohne Probleme war es jedoch nicht…

Die Lufthansa benutzt zur Identifikation wie viele andere Banken und Kartenherausgeber auch das POSTIDENT-Verfahren der Deutsche Post AG. Es gibt dieses nun auch in einer Variante für die Online-Ausweisfunktion. Vorteil dabei ist, dass man nicht eine Post-Filiale aufsuchen muss und auch keine Kopie seines Personalausweises abgeben muss (worauf ich extrem “allergisch” reagiere wegen des Verlustrisikos auf Seiten der Deutsche Post AG).

Bevor man den eigentlichen Identifikationsvorgang startet, sollte man zunächst die AusweisApp2 installieren. Der Webbrowser wird später mit der Ausweis-App über lokale HTTP-Aufrufe gegen localhost bzw. 127.0.0.1 kommunizieren.

Continue reading POSTIDENT durch Online-Ausweisfunktion

Huawei P8 (GRA-L09) modding

This post about “modding” of a Huawei P8 aims to summarize most of the standard procedures you need when you want to modify the device software (also called “firmware”), because you are a developer or want to be more flexible in how you use your device.

Normally, in order to gain this knowledge, you have to read a lot of “geeky” posts on sites like xda developers, which is very time consuming, and sometimes even leads to complete failure (you end up “bricking” your device), because many people there don’t bother to post clear and comprehensive instructions, but simply assume people have some pre-knowledge and know how to do things.

I don’t yet consider this post “finalized” yet (it needs some “polishing”), but I would like to make it available already now to make sure it won’t be forgotten… 😉

Fastboot Mode

“Fastboot” mode is a special mode your device can be put into in order to perform certain maintenance operations, such as (un-) locking your boot loader, flashing partition images, etc. The tool you use on your PC or Mac to communicate with the phone while it is in “fastboot” mode is also called fastboot. It is part of the Android platform tools which you can download here directly from Google.

Continue reading Huawei P8 (GRA-L09) modding

Sommer Duo Vision 650 Laufwagen schließt nicht mehr das Tor

Mein Sektional-Garagentor ist mit einem Sommer Duo Vision 650 Garagentorantrieb ausgestattet. Dieser Antrieb machte nun plötzlich gut sechs Jahre nach Bau unseres Hauses und damit Installation des Antriebs Ärger. Sporadisch bei Bedienung fuhr das Tor zwar noch hoch, schloss sich aber nicht wieder. Einige Wochen nach Beginn der Probleme war die Schließfunktion permanent ausgefallen, so dass ich die Notentriegelung benutzen musste, um das Tor manuell bedienen zu können.

Als technisch interessierter und vorgebildeter Mensch war mir das natürlich Ansporn, der Sache auf den Grund zu gehen. Also zunächst ein bisschen gemessen…

Das Gehäuse der Steuerung liess sich leicht von unten öffnen, nachdem ich die Lichthaube nach oben abgeschoben und die zwei darunter liegenden Schrauben entfernt hatte. Zum Vorschein kam die Steuerplatine, die einfach nur über einen Platinenstecker in einen entsprechenden Sockel eingesteckt ist. Auf dieser befinden sich zwei Relais, die jeweils die 24 V-Versorgungsspannung, die der Ringkerntrafo generiert, in der einen oder anderen Polung an die C-Schiene und Kette anlegt. Also einfach mal gemessen, ob die Spannungen zuverlässig anliegen — das war der Fall. Als Nächstes mal das Gehäuse des Laufwagens öffnen und dort messen. Auch dort lagen die jeweiligen Spannungen bei Bedienung des Tasters an der Steuerung an.

Hmmm. Was konnte also das Problem sein? Kann ein Motor so kaputt sein, dass er sich noch in der einen Richtung dreht, in der Gegenrichtung aber nicht mehr? Das erschien mir sehr unwahrscheinlich. Was konnte es also sonst sein?! Ob es viellecht der Endschalter war, der das Ende des Schließvorgangs verursacht? Also die Kontakte von der Motorplatine abgezogen und mit dem Multimeter gemessen — Bingo, in einer Stellung des Laufwagens, in der keiner der Endschalter betätigt wurde, hatte der eine Endschalter Durchgang, der andere war geöffnet.

Also habe ich ein entsprechendes Ersatzteil bestellt und dies gestern Abend eingebaut. Der Einbau war nicht schwierig selbst für mich als nicht sehr geübten “Schrauber”, allerdings war doch der eine oder andere “Trick” erforderlich, was ich im Folgenden schildern werde.

Continue reading Sommer Duo Vision 650 Laufwagen schließt nicht mehr das Tor