Monday, September 30, 2024

PowerDNS and MariaDB (MySQL) Replication - What do you do when things get out of whack?

I use PowerDNS to manage my fairly extensive home lab environment's DNS. Because DNS is needed for not only the lab, but also so that my wife and daughter can watch TV or to use any other 'net-based resource, keeping things up and running is critical. Because of that, I have 3 seperate DNS servers, linked via MariaDB replication. Generally, this has been very reliable, and the configuration is much simpler than my previous setup, which used PowerDNS replication.

However, a couple of times, now, things have gotten out of sync. And, because it happens very rarely, I always forget how to get things resynced. Lucky me, though, user David Espart posted an excellent step-by-step process for getting things going again, here.

I'll repeat the steps below, in case Stack Overflow ever goes away or loses the content:

This is the full step-by-step procedure to resync a master-slave replication from scratch:

At the master:

RESET MASTER;
FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;


And copy the values of the result of the last command somewhere.

Without closing the connection to the client (because it would release the read lock) issue the command to get a dump of the master:

mysqldump -u root -p --all-databases > /a/path/mysqldump.sql

Now you can release the lock, even if the dump hasn't ended yet. To do it, perform the following command in the MySQL client:

UNLOCK TABLES;


Now copy the dump file to the slave using scp or your preferred tool.

At the slave:

Open a connection to mysql and type:

STOP SLAVE;

Load master's data dump with this console command:

mysql -uroot -p < mysqldump.sql

Sync slave and master logs:

RESET SLAVE;
CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=98;


Where the values of the above fields are the ones you copied before.

Finally, type:

START SLAVE;

To check that everything is working again, after typing:

SHOW SLAVE STATUS;

you should see:

Slave_IO_Running: Yes
Slave_SQL_Running: Yes


That's it!

Hope this helps someone, some day, or just jogs my own failing memory.

Monday, September 2, 2024

The Plague of Education Debt

Today, I responded to a Facebook comment that complained about the difficulty of repaying graduate school education debt. The original poster and spouse apparently left graduate school in 2001-2002 with a total of ~$70,000 in debt. After paying $500/mo for the past 23 years, they are still $60,000 in debt.

Many would argue that $500/mo is too small of a monthly payment amount, but given average salaries after graduate school completion, it could well be all the couple could afford.

The original poster asked why education debt should not be cancelled. The responses were predictable, and varied from the sympathetic to those who thought that the borrowers had erred, and must therefore suffer the consequences, to those who commented that cancelling education debt directly adds to taxpayer burden.

Why assume that taxpayers have to foot the bill?

This is clearly (given the high interest rate) a private student loan. Loan cancellation would only affect the private lender, and since the principal amount has been paid, and then almost paid again, they have been adequately compensated. No need for a treasury outlay, just cancel the loan.

I’m sure that someone will call me “communist” or “socialist,” for this view, but I know exactly how the private lending system works. Loans are offered to young people with little experience in borrowing who are hoping that their education will lead to higher lifetime earnings, as we always tell young people. The terms are often unclear, and the interest rates border on the extortionate.

These loans have variable interest rates, and all kinds of fees and penalties, and can leave borrowers in terrible situations, with virtually no way out, since private loans are almost always not discharged in bankruptcy. (see https://scholarlycommons.law.emory.edu/ebdj/vol32/iss1/11/)

I also did not borrow much money to go to college, but the fact that I did not led me to have to both work full time and to attend college at the same time, which helped to cause me to drop out in my 5th year, as a senior. There were indeed other factors involved, including my own errors, but money was a huge concern.

If I had been offered some large private loan, I surely would have taken it, as an inexperienced young person. I am only protected from that by my age, since the cost of education in compared to average salary was much lower in the 1990s.

The rising cost of education, and the flood of high-interest private education loans are a direct threat to the future of this country. We already live in a world where it is not a good financial prospect to go to medical school and become a general practitioner. (see https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4226775/)

Given that the need for education is greater each year, since there are fewer and fewer jobs that do not require a college degree, and the complexity of the world continues to rise, why do we, as a nation, feel that it is in our best interest to place the burden of education financing on the student, who is least well equipped both to understand it, and to pay it off?

Wednesday, July 31, 2024

Creating PDFs of Vintage Manuals - Harder Than it Appears?

I have accumulated quite a bit of documentation, over the years. It's always been on my "things to do someday" list to scan what I have, and upload it to Internet Archive. However, recently, I was really annoyed because I needed a manual that the only source for was a very expensive copy, on eBay. After grinding my teeth about it for a while, I purchased the manual, and waited for it to arrive.

Once it showed up at my house, it was at least well packaged, and in good condition. After this, I tried to take apart a less valuable manual, that was also spiral bound, for scanning. I am lucky enough to have a decent Brother duplexing MFP that also has an ADF for duplex scanning. That's where my luck ran out, though. I quickly discovered that my printer both was unable to reliably feed books, with their shiny covers, and with their varying weight of paper. I found a workaround, where I would separately scan the covers on the flatbed, and then run the pages through the ADF. My next issue was that the MFP refused to duplex scan 8x10" documents. To get past that issue, I scanned all the pages single-sided, and used the really cool pdftk utility to interleave the pages together into a single PDF.

Now that the scanning part was done, I took a look at the result. Unfortunately, it wasn't fantastic. Quite a few of the pages, which were on a fairly lightweight bond paper, had significant bleed-through of the text on their backs to the front, due to the brightness of the scanner's lamp. After talking to a friend who does a lot more book scanning than I do, it was suggested to me to use GraphicConverter. That turned out to be a great idea, and I was able to change pages like this into to ones like this.

This worked, but it was a heck of a lot of work. I quickly realized that I was going to be far too lazy to do this more than a few times. I spoke to my friend again, and they suggested that I get a dedicated ADF scanner that was well-thought-of by folks who do a lot of scanning. After a bit of research, I settled on a Kodak i2600 Document Scanner that was well-used, but fully functional, and available for a reasonable price on eBay. That scanner turned out to be exactly as described, and worked immediately, after I figured out how to properly unfold the input and output trays. With that scanner, I was able to much more easily generate output that looks like this.

To document this process, here is exactly what I did:

  1. remove the spiral binding from the book
  2. split the book into ~50 page sections
  3. run each section through the Kodak i2600, generating individual page TIFF images
  4. convert each TIFF image into a PDF
    1. for doc in *; do echo $doc; convert $doc $doc.pdf; done
  5. reduce the size of the very large (>100MB) individual pages to something more reasonable
    1. for file in *; do if [ ! -d $file ]; then echo $file; pdf2ps $file ../pdf/$( echo $file | sed 's/ps$/pdf/' ); fi; done
    2. for file in *; do if [ ! -d $file ]; then echo $file; ps2pdf $file ../pdf/$( echo $file | sed 's/ps$/pdf/' ); fi; done
  6. last, I used pdftk to join the individual pages into a single book
    1. pdftk `ls -1` cat output merged.pdf
  7. that's it!

I'll be looking to improve the process, but this has worked well enough, so far.

 

Wednesday, February 21, 2024

Bluetooth Low-Energy Devices, Windows and Linux

 I've attempted, many times, to get bluetooth devices paired to multiple OSes simultaneously, on the same machine, and never succeeded. Usually, the OSes involved are Windows and Linux, as I primarily use Linux, but use Windows for certain special apps that require it.

The user 'Mygod' posted a really, really useful GitHub gist, a number of years ago, that solves the problem, rather neatly:
https://gist.github.com/Mygod/f390aabf53cf1406fc71166a47236ebf

The only dependencies are:

  1. having your Windows partition mounted somewhere on your Linux system
  2. installing the 'chntpw' package installed

Once you have both of those, download the script from the gist, which I have included here, for convenience:

#!/usr/bin/python3
"""
Copyright 2021 Mygod

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


What is this: Export your Windows Bluetooth LE keys into Linux!

Thanks to:
* http://console.systems/2014/09/how-to-pair-low-energy-le-bluetooth.html
* https://gist.github.com/corecoding/eac76d3da20c7e427a1848b8aed8e334/revisions#diff-6eeb0d27c24cc10680e8574f75648585

Usage:

$ ./export-ble-infos.py 
$ sudo bash -c 'cp -r ./bluetooth /var/lib && service bluetooth force-reload'
$ rm -r bluetooth
"""

import os
import shutil
import subprocess
import sys
import tempfile

from configparser import ConfigParser
from optparse import OptionParser

default_template = """
[General]
Name=Designer Mouse
Appearance=0x03c2
AddressType=static
SupportedTechnologies=LE;
Trusted=true
Blocked=false
Services=00001800-0000-1000-8000-00805f9b34fb;00001801-0000-1000-8000-00805f9b34fb;0000180a-0000-1000-8000-00805f9b34fb;0000180f-0000-1000-8000-00805f9b34fb;00001812-0000-1000-8000-00805f9b34fb;

[IdentityResolvingKey]
Key=

[LocalSignatureKey]
Key=
Counter=0
Authenticated=false

[LongTermKey]
Key=
Authenticated=0
EncSize=16
EDiv=
Rand=

[DeviceID]
Source=2
Vendor=1118
Product=2053
Version=272

[ConnectionParameters]
MinInterval=6
MaxInterval=6
Latency=60
Timeout=300
"""


def main():
    parser = OptionParser()
    parser.add_option("-v", "--verbose", action='store_true', dest='verbose')
    parser.add_option("-s", "--system", dest="system", metavar="FILE",
                      default="/mnt/Windows/System32/config/SYSTEM",
                      help="SYSTEM file in Windows. Usually at /Windows/System32/config/system.")
    parser.add_option("-k", "--key", dest="key", metavar="KEY",
                      default=r"ControlSet001\Services\BTHPORT\Parameters\Keys",
                      help="Registry key for BT. [default: %default]")
    parser.add_option("-o", "--output", dest="output", metavar="DIR", default="bluetooth",
                      help="Output directory. [default: %default]")
    parser.add_option("-t", "--template", dest="template", metavar="FILE", help="Template file.")
    parser.add_option("-a", "--attributes", dest='attributes', help="Additional attributes file to be copied.")
    options, args = parser.parse_args()

    if options.template:
        with open(options.template) as file:
            template = file.read()
    else:
        template = default_template

    out = tempfile.mktemp(".reg")
    reged = subprocess.Popen(["reged", "-x", options.system, '\\', options.key, out], stdout=sys.stderr)
    reged.wait()
    if reged.returncode:
        return reged.returncode
    dump = ConfigParser()
    with open(out) as file:
        reged_out = file.read()
        if options.verbose:
            print(reged_out)
        dump.read_string(reged_out.split('\n', 1)[1])
    os.unlink(out)

    for section in dump:
        path = section[len(options.key) + 2:].split('\\')
        assert not path[0]
        if len(path) == 3:
            path[1] = ':'.join([path[1][i:i + 2] for i in range(0, len(path[1]), 2)]).upper()
            path[2] = ':'.join([path[2][i:i + 2] for i in range(0, len(path[2]), 2)]).upper()
            print("Dumping {}/{}...".format(path[1], path[2]))
            config = ConfigParser()
            config.optionxform = str

            # See if device has been paired in Linux before
            existing_template = '/var/lib/bluetooth/{}/{}/info'.format(path[1], path[2])
            if (os.path.exists(existing_template)):
                with open(existing_template) as file:
                    config.read_string(file.read())
            else:
                config.read_string(template)

            def read_reg(key, expected_type):
                def read_reg_actual(key, expected_type):
                    actual_type, content = dump[section]['"{}"'.format(key)].split(':', 1)
                    if expected_type == 'hex16':
                        assert actual_type == 'hex'
                        content = content.split(',')
                        assert len(content) == 16
                        return ''.join(content).upper()
                    if expected_type == 'qword':
                        assert actual_type == 'hex(b)'
                        content = content.split(',')
                        assert len(content) == 8
                        return str(int(''.join(content[::-1]), 16))
                    if expected_type == 'dword':
                        assert actual_type == expected_type
                        return str(int(content, 16))
                    assert False
                result = read_reg_actual(key, expected_type)
                if options.verbose:
                    print("{} of type {}: {}".format(key, expected_type, result))
                return result
            config['LongTermKey']['Key'] = read_reg('LTK', 'hex16')
            # KeyLength ignored for now
            config['LongTermKey']['Rand'] = read_reg('ERand', 'qword')
            config['LongTermKey']['EDiv'] = read_reg('EDIV', 'dword')
            if '"IRK"' in dump[section]:
                config['IdentityResolvingKey']['Key'] = read_reg('IRK', 'hex16')
            if '"CSRK"' in dump[section]:
                config['LocalSignatureKey']['Key'] = read_reg('CSRK', 'hex16')
            output_dir = os.path.join(options.output, path[1], path[2])
            os.makedirs(output_dir, exist_ok=True)
            with open(os.path.join(output_dir, 'info'), 'w') as file:
                config.write(file, False)
            if options.attributes:
                shutil.copyfile(options.attributes, os.path.join(output_dir, 'attributes'))


if __name__ == "__main__":
    sys.exit(main())

Once you have the script copied to your system, do the following, noting that your keys will be different than mine:

$ chmod 0755 export-ble-infos.py
$ ./export-ble-infos.py -s /PATH TO YOUR WINDOWS PARTITION/Windows/System32/config/SYSTEM
reged version 0.1 140201, (c) Petter N Hagen
Exporting to file '/tmp/tmppe0q46xu.reg'...
Exporting key 'Keys' with 1 subkeys and 0 values...
Exporting key '50284a36a81b' with 1 subkeys and 1 values...
Exporting key 'ffffcfd7dd52' with 0 subkeys and 10 values...
Dumping 50:28:4A:36:A8:1B/FF:FF:CF:D7:DD:52...
$ sudo cp -r bluetooth /var/lib/
$ sudo systemctl force-reload bluetooth
Now, your device should be linked on Linux as well as Windows, when you boot each OS.

Thanks MyGod!

- Alex


Wednesday, November 8, 2023

New-to-me Kindle DX Graphite and My Struggles With It

At the VCF Mid Atlantic swap meet, held October 28, 2023, I acquired an Amazon Kindle DX. For some reason, I have always been fascinated with e-kink devices, and ebook readers, specifically. That doesn't mean that I actually read many books on computers, or online, it's just something about the tech that I love.

This particular Kindle DX is a "Kindle DX Graphite", and is in very nice condition, coming wrapped in a fake leather case, which I believe is the stock one from Amazon. The battery was dead, as would be expected for a >13-year-old device, but that was easily replaced. The software side would not be nearly as easy!

When I first powered the Kindle up, it seemed to work fine, showing me leftovers from the previous owner. I immediately factory-reset the device, to make sure that I didn't keep any personal data. Once reset, the Kindle informed me that it needed to be registered, which I figured would be no problem, as I do have an Amazon account, and own quite a number of free and purchased ebooks that are visible in my desktop and iOS Kindle apps. On that front, I could not possibly have been more wrong!

Apparently, the Kindle DX has a 3G modem and SIM card installed, and with the shutdown of the US 3G cellular network, there is no more connectivity. That normally wouldn't be a big deal, but the Kindle DX predates the addition of WiFi to the Kindle line.

Once I discovered this blocker, I went looking for a way around the registration problem, because it blocked my access to most of the settings on the device. I quickly found the MobleRead forum, which has an unbelievable amount of information. That amount of information was somewhat overwhelming for a Kindle newbie like me, but I eventually, through much trial-and-error, figured out how to get this device set up.

For anyone else (or even me, in the future, when I forget all about this!) with a Kindle DX Graphite, here are the steps needed:

  1. All of the links that you need are here, on MobileRead
  2. Jailbreak the Kindle
    1. Download the following archive, and extract it
    2. Connect the Kindle to your PC with a USB micro cable
      1. Make sure the cable has data capability, as many manufacturers cheaped out and made charging-only USB micro cables
    3. Copy the file "Update_jailbreak_0.13.N_dxg_install.bin" to the root directory of the "Kindle" virtual drive that was mounted on your PC
    4. Eject the "Kindle" drive
    5. Press the "Home" button on the Kindle
    6. Press the "Menu" button on the Kindle
    7. Use the joystick to move down to "Settings", and then click the joystick
    8. Press the "Menu" button, again
    9. Use the joystick to select "Update Your Kindle"
      1. If the selection is greyed out, in the menu, you have copied the wrong file. "dxg" refers to the US version of the Kindle DX Graphite. "dx" refers to the original Kindle DX
    10. The Kindle will then install the update and restart.
    11. Once the Kindle is back up, the jailbreak is complete
  3. Install USBNetwork
    1. Download the following archive, and extract it
    2. Connect the Kindle to your PC with a USB micro cable
    3. Copy the file "Update_usbnetwork_0.57.N_dxg_install.bin" to the root directory of the "Kindle" virtual drive that was mounted on your PC
    4. Eject the "Kindle" drive
    5. Press the "Home" button on the Kindle
    6. Press the "Menu" button on the Kindle
    7. Use the joystick to move down to "Settings", and then click the joystick
    8. Press the "Menu" button, again
    9. Use the joystick to select "Update Your Kindle"
    10. The Kindle will then install the update and restart.
    11. Once the Kindle is back up, the USBNetwork installation is complete
  4. Activate USBNetwork
    1. Push the "Del" button on the Kindle's keyboard, to bring up a search field
    2. Type ";debugOn" and press the Kindle's "Return" key (right below "Del", marked with an arrow)
    3. Push the "Del" button on the Kindle's keyboard, to bring up a search field
    4. Type "`usbNetwork" and press the "Return" key
      1. Note that the command starts with a backtick "`" character, and this must be typed
    5. Connect the Kindle to your PC with a USB micro cable
    6. Configure the USB network interface that now appears, as follows:
      1. IP address: 192.168.2.1
      2. Subnet mask: 255.255.255.0
      3. Disable DHCP
    7. Bring the network interface online
  5. Register the Kindle
    1. Using ssh, login to the Kindle as root:
      1. ssh root@192.168.2.2
    2. The password is blank
    3. Type "mntroot rw"
    4. Type "vi /var/local/java/prefs/reginfo" and add the following content to the file:
      1. <?xml version="1.0" encoding="UTF-8"?>                                          
        <response>                                                                      
           <user_device_name> Alex's Kindle DX </user_device_name>                      
           <global_device_name> jjacocks@mac.com </global_device_name>                  
           <given_name> kindledxg </given_name>                                         
           <name> Alex's Kindle </name>                                                 
           <alias>alex</alias>                                                          
        </response>
      2. You can edit the fields to your liking, but make sure that you leave the formatting exactly as I show it
    5. Hit the "Esc" key on your keyboard, and then ":wq" to save the file
    6. Your Kindle should now be registered
    7. As before, reboot, and you are set to go

 Hopefully this helps someone else, as it took a heck of a lot of reading and research and mistakes, on my part, to get this working.

 Here are some links that can get you started:

 

Wednesday, December 7, 2022

NetBSD pkgsrc on Solaris 10/sparc

Anyone who still has a fondness for pre-Oracle Solaris knows the hell that is getting a functional C compiler installed and building common open source packages. One common way to deal with this problem, if you want up-to-date packages, is to use the pkgsrc collection, from the NetBSD project.

pkgsrc has been around for quite some time, having been forked from FreeBSD's ports collection in the late 1990s. Solaris support (initially termed "zoularis", for the initial build script creator, Christos Zoulas) was added just before the new millennium.

The theory is that pkgsrc is easy to get going, and the basic tasks needed are:

  1. download pkgsrc.tar.gz from NetBSD
  2. extract to /usr/pkgsrc
  3. cd to /usr/pkgsrc/bootstrap
  4. run ./bootstrap

Under Solaris 10, though, the system doesn't come with a functional C compiler, making the process a bit of a chicken and egg problem. After doing quite a bit of research, and digging through a lot of blogs, here is the process that worked for me:

  • install OpenCSW
    • https://cdn.opencsw.org/manual/for-administrators/getting-started.html
  • install GCC5 from the OpenCSW collection
    • CSWgcc5core
    • CSWgcc5g++
  • Using that gcc5 and related tools, install a newer version of gcc
    • Set your path to include /usr/sfw/bin and /usr/ccs/bin
# export PATH=/usr/sbin/:/usr/bin:/opt/csw/bin:/usr/sfw/bin:/usr/ccs/bin
    • I used gcc-9.3.0, which is apparently the final version that supports Solaris 10
# gtar zxvf gcc-9.3.0.tar.gz
# mkdir objdir
# cd objdir
# ~/gcc-9.3.0/configure --enable-obsolete --prefix=/op
t/gcc-9.3.0 --enable-languages=c,c++,fortran

# gmake
# gmake install
    • Add the gcc library directories to the runtime linker paths with crle
# crle -u -l /opt/gcc-9.3.0/lib
# crle -64 -u -l /opt/gcc-9.3.0/lib/sparcv9
    • Grab pkgsrc, I used current stable, which is at the moment 2022-Q3
    • Extract to /usr/pkgsrc
    • Bootstrap pkgsrc
# cd /usr/pkgsrc/bootstrap
      • set your path to include your new gcc and the /usr/ccs/bin tools, like ar, nm and friends and remove /usr/sfw
# export PATH=/usr/sbin:/usr/bin:/opt/gcc-9.3.0/bin:/usr/ccs/bin
# env CFLAGS=-O2 ./bootstrap
    • Once this is complete, add pkgsrc tools to your path
# export PATH=/usr/pkg/sbin:/usr/pkg/bin:/usr/sbin:/usr/bin:/opt/gcc-9.3.0/bin:/usr/ccs/bin
    • Edit your pkgsrc mk.conf to use the gcc version that you built
      • Add the following lines to /usr/pkg/etc/mk.conf:
GCCBASE=                /opt/gcc-9.3.0
USE_NATIVE_GCC=         yes
 
 
Now, you should be able to use the NetBSD pkgsrc collection to build a create variety of useful software on Solaris 10.

Sunday, November 20, 2022

IBM PC and Compatible Video Standards: the Early Days

For those who did not use IBM-compatible PCs in the 1980s and 1990s, it may be surprising to hear that there were many, many possible standards of monitors, video cards, and video modes. And many of these were incompatible in both documented and undocumented ways. To start with, we had the IBM-defined original video standards:

  • MDA
    • This was defined by the original IBM Monochrome Display adapter, commonly found in the IBM 5150 PC, 5160 XT, and 5170 AT. It was capable of monochrome text only, in 80 columns by 24 lines.
    • https://www.seasip.info/VintagePC/mda.html
  • CGA
    • The first CGA card was the IBM Color Graphics Adapter, giving the standard its name. CGA was commonly found in the same IBM PCs as MDA, but was also common in early clone PCs, XTs and ATs, as it was significantly cheaper to implement than EGA. CGA was capable of 40 and 80 column text, and multiple graphics modes from 160x100 to 640x200 with monochrome, 2, or 4 colors possible, depending on the mode. The original IBM card, and some clones, supported composite output with 16 colors, at low resolution.
    • https://www.seasip.info/VintagePC/cga.html
  • PC/jr
    • The introduction of the IBM PC/jr in 1983 added support for two new video modes to the CGA standard, 160x200 and 320x200 with 16 colors and 640x200 with 4 colors. This standard would become much more widely used with the introduction of the Tandy 1000 series of personal computers, by Radio Shack.
    • https://en.wikipedia.org/wiki/IBM_PCjr#Video
  • EGA
    • This standard was created by IBM's Enhanced Graphics Adapter. The EGA card was backwards-compatible to both CGA and MDA, and added support for up to 64 colors (with additional video RAM) and resolutions of up to 640x350. There were also 2 RCA-style connectors on the backplate, but they were not designed for CGA-style composite output.
    • https://en.wikipedia.org/wiki/Enhanced_Graphics_Adapter
  • PGA
    • The IBM Professional Graphics Adapter, which supported 640x480 with 256 colors out of a palette of 4096. This is quite a rare card, mostly used for CAD drafting and other high end graphics applications on the IBM PC, XT, and AT. It requires a dedicated monitor, and is not compatible with VGA. It does feature CGA backwards compatibility.
    • https://www.seasip.info/VintagePC/pgc.html
  • VGA
    • This is the IBM Video Graphics Array, which defined the standard for 16 color graphics at a resolution of 640x480 pixels, and 256 colors at 320x200. It produced analog output, rather than the digital output of the MDA, CGA and EGA cards, and used a DE-15 connector, rather than the DE-9 connector used for MDA, CGA and EGA. VGA was backwards-compatible with MDA, CGA and EGA modes, while not being able to be connected to RGBI digital monitors.
    • https://en.wikipedia.org/wiki/Video_Graphics_Array
  • 8514/A
    • IBM introduced the 8514/A adapter in 1987, and it extended the VGA standard with basic graphics acceleration, and a 1024x768 (interlaced) graphics mode. It was available only for the PS/2 line of systems, until compatible clone versions of the card became available.
    • https://en.wikipedia.org/wiki/IBM_8514
  • XGA
    • IBM introduced the XGA display standard of 1024x768 (non-interlaced) pixels at 256 colors, in 1990, again extending the VGA standard. Additionally, XGA (which was again only available for PS/2 systems, supported 64k colors at 640x480, which was a first for IBM original video cards on the PC. Interestingly, XGA, like the 8514, lacked support for 800x600, which was quite common in VGA clone video cards, at the time. There was a minor update to XGA, called XGA-2, which added support for 256 grey scale colors, and finally the addition of 800x600, with up to 64k colors.
    • https://ardent-tool.com/video/XGA1.html

And then, we had a variety of third-party created standards:

  • Hercules monochrome
    • The Hercules Graphics Card was introduced in 1982, having been designed so that its creator could edit his masters thesis in the Thai language. It provided very high resolution (for the time) monochrome graphics at 720x348 and backwards compatible text modes with the IBM MDA card. It was extremely popular, and clones of this card were found in many PCs up until the release of the 486, when most computers were supplied with VGA.
    • https://en.wikipedia.org/wiki/Hercules_Graphics_Card
    • https://www.seasip.info/VintagePC/hercplus.html
  • Plantronics ColorPlus
    • This card was a CGA-compatible video card that added support for 16 colors at 320x200 and 4 colors at 640x200. It was not widely supported, but a surprising number of CGA clone cards supported this standard.
    • https://www.seasip.info/VintagePC/plantronics.html
  • Tandy Graphics
    • Tandy's 1000 line of personal computers were very similar to IBM's failed PC/jr line, in both graphics and sound. They popularized the 320x200 16 color graphics mode, which was very widely supported in video games for DOS.
    • https://en.wikipedia.org/wiki/Tandy_Graphics_Adapter
  • SVGA
    • SVGA was created by the Video Electronics Standards Association (VESA), founded by NEC, in 1988. It popularized the 800x600 video mode, at 16 and 256 colors, and then went on to create official, rather than de-facto, standards for PC-compatible video output formats. 
    • https://en.wikipedia.org/wiki/Super_VGA

There were also a number of other video output standards, most either clones that enhanced CGA, EGA, or VGA.

Is it a wonder that nobody understands IBM PC graphics? What a huge list of somewhat mutually incompatible standards there were!