Expanding Windows drives

Granted this isn’t fun. But it’s virtual. We live in an era of exciting expandable disks!

first off start with a full disk. That’s great. In this case the host was proxmox. It doesn’t matter. You apparently have to shut down the VM to expand the disk. Other virtualizers don’t need that. But whatever.

now for the predictable fun. That recovery partition is in the way. Not sure why NTFS needs to be contiguous but here we are.

So now we are stuck. You Google how to expand NTFS drive, how to move recovery partition, how to make disk bigger!! All in vain as everyone is pushing these nifty partition mover programs that don’t run on server. Do you just nuke the partition and hope for the best?

No, we can back it up, delete it, expand our disk and recreate it!

Capture the partition

Dism /Capture-Image /ImageFile:C:\my-system-partition.wim /CaptureDir:S:\ /Name:"My system partition"
Microsoft DiskPart version 10.0.19041.3636

Copyright (C) Microsoft Corporation.
On computer: KOMPUTER

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          250 GB   200 GB

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary             50 MB  1024 KB
  Partition 2    Primary             49 GB    51 MB
  Partition 3    Recovery           522 MB    49 GB

DISKPART> select partition 3

Partition 3 is now the selected partition.

DISKPART> delete partition OVERRIDE

DiskPart successfully deleted the selected partition.

restore the partition

dism /Apply-Image /ImageFile:c:\my-system-partition.wim /Index:1 /ApplyDir:w:\

Then tag the partition back to being a Recovery partition.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary             50 MB  1024 KB
  Partition 2    Primary            249 GB    51 MB
  Partition 3    Primary            600 MB   249 GB

DISKPART> select partition 3

Partition 3 is now the selected partition.

DISKPART> set id=27

DiskPart successfully set the partition ID.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary             50 MB  1024 KB
  Partition 2    Primary            249 GB    51 MB
* Partition 3    Recovery           600 MB   249 GB

DISKPART>

depending on the version the command may fail setting type 27, so try:

set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac" 

and there we go!

One big happy drive! 🎉

Qemu / GCC / Tiger aka assumptions on GCC v3 performance

Well this took a shocking turn;

I’d always seen on Windows that Qemu built with GCC 3.4.5 was not only faster, but more stable than GCC 4.x when regarding version 0.10 (I’m not even going to entertain later versions, as this is about old software).

I’ll have to post more, but I’ve basically learned nothing from all my other Pentium 4 / i915 chipset disasters, and now have my 8th system up and running!

by default it has GCC 4.0.0 for i386, and a GCC 3.x for PowerPC building. Natrually, with assumption in hand, how do you build GCC 3 for Intel?

Thankfully, the question was asked on Mac OS X Hints a few decades ago:

https://web.archive.org/web/20070610073818/http://www.macosxhints.com/article.php?story=20060423105014540

And it was saved in the wayback machine, because, preserving the past is hard.

The steps are pretty simple:

$ tar -zxf gcc_os-1819.tar.gz

3. Fix a line that causes it to not compile: in the file gcc_os-1819/gcc/gcc.c, on line 5883, change the line to look like this:

(char ) v[q - vt] = 0;

4. Make a build directory and run configure. I installed my compiler in /opt/gcc3, and I only built the C compiler. This would not work for building C++ or Cocoa applications.
$ mkdir build
$ cd build
$ ../gcc_os-1819/configure --prefix=/opt/gcc3 --enable-languages=c

Which was great except where on earth am I going to find this old GCC?

In retrospect there are 2 places, naturally, archive.org kept a copy of the Apple pages, the other being github.

For the 2-3 people who will be interested in this kind of thing 20 years from now I went ahead and did the single patch, and built binaries and put them on github over at gcc_os-1819_Marklar.

For testing, I’m using a VMDK with MS-DOS 5.00 no config.sys and DooM v1.1 running the timedemo both with no sound. (gametics/realtics)*35=fps. and in this case, demo1 of DooM v1.1 is 1077 gameticks.

GCC 3.5     gcc version 3.5.0 20041003 (Apple Computer, Inc. build 3506)
GCC 4.0     gcc version 4.0.0 (Apple Computer, Inc. build 5026)

no draw (ticks)

GCC 3.5       6/7/7
GCC 4.0       6/7/6

draw-16bit screen depth (ticks)

GCC 3.5       1074/1074/1077
GCC 4.0       948/947/949

And now for the bad news, it turns out that GCC 4.0 is just slightly faster than GCC 3.3

I couldn’t believe it either.

For anyone that cares, DOSbox SVN builds more or less okay on Tiger with some small fix to the MIDI compatibility code (#ifdef stuff, the MIDI works fine!) and it’s timings are for no draw

DOSBox          566/560/565

and drawing on a 32bit screen (16bit is incompatible)

DOSBox          22/26/25

The takeaway is that the CPU is much faster on Qemu, but screen rendering is much faster with DOSBox. DOSBox uses SDL, so let’s go one further, and rebuild Qemu with SDL instead of it’s Cocoa support! So how we doing in the tick department?

GCC 3.5       1005/999/1000
GCC 4.0       885/886/882

The real killer would of course be trying a newer version of GCC. Which I tried several, but Apple had done something really strange to them, where they product self-modifying code by default. And the assembler in 10.4.1 can’t handle that.

unknown section attribute: self_modifying_code

No really, it’s a thing!

Obviously, I updated my cc-tools to 622.9, and guess what?

I tried :

  • gcc-5247
  • gcc-5250
  • gcc-5370

All give the following:

Illegal instruction

Is this some DTK Pentium 4 thing? Or a Tiger 10.4.1 thing?

verbose output for the curious:

Viglen:~/tmp2 jsteve$ gcc -v hi.c -o hi
Using built-in specs.
Target: i686-apple-darwin8.1.0
Configured with: ../gcc-5247/configure --prefix=/opt/gcc-5247 --enable-languages=c
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5247)
 /opt/gcc-5247/libexec/gcc/i686-apple-darwin8.1.0/4.0.1/cc1 -quiet -v -D__DYNAMIC__ hi.c -fPIC -quiet -dumpbase hi.c -auxbase hi -version -o /var/tmp//ccq5CJ5D.s
ignoring nonexistent directory "/opt/gcc-5247/lib/gcc/i686-apple-darwin8.1.0/4.0.1/../../../../i686-apple-darwin8.1.0/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /opt/gcc-5247/include
 /opt/gcc-5247/lib/gcc/i686-apple-darwin8.1.0/4.0.1/include
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
GNU C version 4.0.1 (Apple Computer, Inc. build 5247) (i686-apple-darwin8.1.0)
        compiled by GNU C version 4.0.0 (Apple Computer, Inc. build 5026).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 8944321fb1b2a413196eb995bbfd7ab0
hi.c: In function 'main':
hi.c:3: warning: return type of 'main' is not 'int'
 as -arch i386 -force_cpusubtype_ALL -o /var/tmp//ccFyDIlr.o /var/tmp//ccq5CJ5D.s
 /opt/gcc-5247/libexec/gcc/i686-apple-darwin8.1.0/4.0.1/collect2 -dynamic -arch i386 -weak_reference_mismatches non-weak -o hi -lcrt1.o /opt/gcc-5247/lib/gcc/i686-apple-darwin8.1.0/4.0.1/crt2.o -L/opt/gcc-5247/lib/gcc/i686-apple-darwin8.1.0/4.0.1 -L/opt/gcc-5247/lib/gcc/i686-apple-darwin8.1.0/4.0.1/../../.. /var/tmp//ccFyDIlr.o -lgcc -lSystem
Viglen:~/tmp2 jsteve$ ./hi
Illegal instruction

I’m not entirely sure.

I need a Snow Leopard machine.

Also DosBox SVN wasn’t too hard to build, and runs great.

Happy 2025!

With large language models being all the rage, I found this tweet (x?) on twitter (x?), from Alex Cheema, discussing Andrej Karpathy’s port of a LLM, to C llma2.c, and then converting it to build with Borland C v5 as llma98.c .

Well naturally I had to take that source code, and make it more C89 happy!

I found this magical sed recipe over on stack overflow:

  sed -e 'sX// *\(.*[^ ]\) *$X/*  */X' < oldfile > newfile 

Thanks Preston Crow!

llamma 89 on OS/2 6.78

So, with some really minor hacking, and my port of GCC 1.40 to OS/2, I was shockingly up and running in no time! I should add again that I do kind of enjoy the much older GCC since it was capable of being built with ‘vendor’ tools, in this case the December 1991 Windows NT pre-release C compiler.

I didn’t bother ‘fixing’ the timing code, as honestly it doesn’t matter, running this on my PS/2 Model 60 with the SLC50 upgrade card is incredibly slow.

Seriously, this is me running the llama for 3 hours!

At best it’s about a word every two minutes, getting this far was over 3 hours of runtime.

I have a feeling much like MP3, where the ideas are significantly older than when they found mainstream success, there is a lesson here to the impatient ones, that just because something doesn’t work today, or seem incredibly unwieldy, it doesn’t mean decades later it’ll be incredibly popular.

For anyone wondering, I also built one that uses the TNT extender, and it seems to require 4MB of RAM. Absolute beast of a 32bit machine for 1987, but here we are.

So yeah, Happy 2025!

Merry Christmas 2024!

While doom scrolling on eBay I always seem to stop and look at the upgrade version of Windows 3.1. It has to be the most clearly marked “why bother upgrading” version of Windows, and at the same time the ugliest. Fitting for the season’s ugly sweater theme!

The ugliest Windows ever

It’s amazing how terrible this thing has always looked to me. As far as ‘proof’ I remember being able to fake it out by doing a ‘copy con win.com ^Z’ type thing to create a fake windows directory with win.com & kernel286.exe … I think. But back when this was a NEW! product, I had to install Windows 3.0 anyways to get the CGA driver.

Windows 3.1 in CGA

I don’t know how I used Windows with CGA either.

Speaking of impossible, back in the dark ages of Windows/286 2.1 this thing snuck out:

Microsoft Windows/286 – Italian

One day I’d love to get this Italian Windows 2.1 and frame it? I don’t know who snuck in the Buone Fest onto the box art, but I’d like to think it was subversive, as I hadn’t seen anything like that on any of the other retail Operating System packaging?

It’s been a real struggle this year from the relocation, losing just about everything that I’d tried to do, then losing my job, that brief absolute terror of being unemployed with zero callbacks trying to job hunt to now spending nearly every waking hour at work.

Alcatel – Lucent saves the day

Speaking of stress, I haven’t had to build a physical network in ages, and this was news to me that all the SFP connectors are now vendor locked. Thinking I could just buy some cheap SFP DAC cables and plug away and I was greeted with the fact that neither the Dell, nor Cisco switches would recognize them. Oddly enough, Linux/Windows didn’t care at all. I had ordered some RJ45 10 gig SFPs to run across the data centre, and found out as well that I’d ordered Cisco keyed generic ones, and yes of course they don’t work in the Fortigate firewalls, nor the Dell switches. Those needed their own special ones. Luckily for me I had been pulling out all the old SFPs from decommissioned equipment as I had figured that the single mode fiber optics may be useful if I ever need anything, and there was a couple of these Alcatel-Lucent SFP-GIG-T (1gig) modules that at least saved the day in that I could connect stuff, while waiting for the trial and error of needing 2 weeks to get the appropriate 10 gig interfaces.

Also with mentioning is that Dell switches configure in cluster groups and the 25 gig clusters have to be configured down to 10gig mode to recognize and work with 10/1gig modules.

port-group 1/1/5
 mode Eth 25g-4x
!
port-group 1/1/6
 mode Eth 10g-4x

For example.

Speaking of, setting up a LACP bundle on the Dell switch was a snap! Just remember your port-groups!


interface ethernet1/1/1
 description "WIN-HVN-100 port 0"
 no shutdown
 channel-group 1 mode active
 no switchport
 flowcontrol receive off

There isn’t all that much to do in the individual ethernet ports, but you get the idea. Since I’m short on cables, I’ve only got the first two ports populated, but I’m aiming for 4×25 per server!

interface port-channel1
 description WIN-HVN-100
 no shutdown
 switchport mode trunk
 switchport trunk allowed vlan 50,75-78,150,875,901-902

I did find that by explicitly allowing the VLANs onto the port helped a lot. And by default, the switches do LACP so there isn’t all that much to do.

And checking the LACP status is a snap as well:

hyperv-lan-core-01# show interface port-channel 1 summary
LAG     Mode      Status    Uptime              Ports
1       L2-HYBRID up        1 day 21:45:26      Eth 1/1/1 (Up)
                                                Eth 1/1/2 (Up)
                                                Eth 1/1/3 (Down)
                                                Eth 1/1/4 (Down)

Needless to say, I was happy as ‘it just worked’!

AMD Epyc 9454 48-Core Processor

Speaking of which, I deployed Hyper-V 2019 Server. Shame VMware had to go get Broadcomm’ed as there won’t be any more free Hyper-V servers, but for now it’s fine.

I had meant to write more on setting up Hyper-V as doing it through PowerShell is a bit daunting at first.

First setup your load balancing network team. In this case I’m using a 4 port 25gig card:

New-NetlbfoTeam -Name "Converged Network Team" -TeamMembers "Integrated NIC 1 Port 1-1","Integrated NIC 1 Port 2-1","Integrated NIC 1 Port 3-1","Integrated NIC 1 Port 4-1" -TeamingMode lacp

The port names are 100% system dependent, but you can get the idea. And setting the LACP was surprisingly easy.

The next step is to create a virtual switch

New-VMSwitch -Name "Converged Network Switch" -NetAdapterName "Converged Network Team"

I just load everything onto the same switch as I’m old, and trust my VLANs. And the servers are 1u so they don’t exactly have a lot of NIC’s for splitting stuff out but as always do what works for you.

The next step is to add the virtual network card onto my management VLAN in this case it’s 75

add-vmnetworkadapter -switchname "Converged Network Switch" -name Management -managementos
set-vmnetworkadaptervlan -managementos -vmnetworkadaptername "Management" -vlanid 75 -access

From there you can now use the ‘sconfig’ and setup your management IP address, load up Windows patches, load more drivers, and manage the server using the remote RSAT tools. Be sure to enable the remote desktop, unless you really love to type.

I went ahead and installed these services to get my servers onto an existing Hyper-V cluster. I’m sure some can be removed, but YMMV as always:

Install-WindowsFeature -Name FileAndStorage-Services
Install-WindowsFeature -Name File-Services
Install-WindowsFeature -Name FS-FileServer
Install-WindowsFeature -Name Storage-Services
Install-WindowsFeature -Name Hyper-V
Install-WindowsFeature -Name NET-Framework-45-Core
Install-WindowsFeature -Name NET-Framework-45-Features
Install-WindowsFeature -Name NET-WCF-Services45
Install-WindowsFeature -Name NET-WCF-TCP-PortSharing45
Install-WindowsFeature -Name Failover-Clustering
Install-WindowsFeature -Name Multipath-IO
Install-WindowsFeature -Name RSAT
Install-WindowsFeature -Name RSAT-Feature-Tools
Install-WindowsFeature -Name RSAT-Clustering
Install-WindowsFeature -Name RSAT-Clustering-PowerShell
Install-WindowsFeature -Name SNMP-Service
Install-WindowsFeature -Name Windows-Defender
Install-WindowsFeature -Name PowerShellRoot
Install-WindowsFeature -Name PowerShell
Install-WindowsFeature -Name WoW64-Support

Interestingly enough, on 2019 the option is there for the Linux Subsystem. I didn’t install it, but that’d be an interesting thing to share out.

I did have some weird issue with remoting and explicitly enabled it with a

Enable-PSRemoting -Force

It’s probably me, but it worked for me.

Then it’s a matter of adding all the other virtual networks Hyper-V seems to love:

add-vmnetworkadapter -switchname "Converged Network Switch" -name Backup -managementos
add-vmnetworkadapter -switchname "Converged Network Switch" -name "Live Migration" -managementos
add-vmnetworkadapter -switchname "Converged Network Switch" -name Cluster -managementos
set-vmnetworkadaptervlan -managementos -vmnetworkadaptername "Backup" -vlanid 76 -access
set-vmnetworkadaptervlan -managementos -vmnetworkadaptername "Live Migration" -vlanid 77 -access
set-vmnetworkadaptervlan -managementos -vmnetworkadaptername "Cluster" -vlanid 78 -access

And of course, don’t forget your shared storage, in this case my servers have that 4x25gig card, and a smaller custom 2×25 gig card that I used to storage A/B. Fun times!

From there I could use sconfig to join my machines to the domain, and then finally add them into the cluster, and start moving my workload over to the new servers, which is what I’ll be doing throughout the Christmas break.

Speaking of work:

A very Christmas Vacation like tree

They ordered this very Clark Griswald like Christmas tree. They had to cut it down to get the base to fit the lobby area with it reaching into the 2nd floor. It’d been so long since I’d seen something like this at work. But thats me working remotely for nearly 20 years.

Something awe inspiring about it.

real life Snoopy

Which reminds me of this Snoopy I saw on twitter. As terrible as life feels from time to time, there is a bit of hope, and fun here and there as my muse is always quick to point out when I’m feeling down.

And sometimes it’s better to just get it out, as who knows, maybe this could be useful in the future somehow.

Thanks for everyone’s ongoing support over on Patron and here. It really means the world to me.

Merry Christmas to all!

RCA to HDMI Converter AV to HDMI cable 3 RCA CVBS Composite to 1080P HDMI AV

Well, I had to give this a shot, at £8.49, there wasn’t much risk, right?

eBay surprise

I mean my expectations weren’t too high. My old TV is gone, and I got the TV I had originally bought in Europe many years ago, as my muses’s parents were done with it, as I’d leant it to them years ago. It’s a JVC.. .something. And the composite ports need some RCA to composite cable.

Yes, I have a few of those weird composite to mini rca jack cables, but none of them worked.

RCA to HDMI Converter

The contents are so incredibly basic. It’s crazy how small the device actually is. It’s got a slider to select between 720p and 1080p, and micro USB power port.

reverse package contents

Sadly, it had literally one job to do, to display the Playstation ONE’s composite output onto the JVC TV. And it failed. The image was far to dim, (signal loss?) and was constantly losing sync.

Very sad.

In a Hail Mary, I just plugged the RCA directly into the TV’s composite port, and it worked! Problem solved!?

So at least I got a working cable out of the deal.

So my review is basically… free cable! … not such a great device. But if you paid more than me, you def got ripped off. And I know if I took the time to order from taobao or aliexpress I could get this for a fraction of the price.

Wish I had a good story here, but I really don’t.

Also I screwed up the billing on the blog, and despite having a massive accumulated credit, they cut the service. So Ive bought myself service until March. Yay.

Re-visiting my old favorite cell phone, the Lumia 1520 in late 2024

While I have a mountain of old discarded Windows Phones from work, I’d flashed them all to Windows 10, well except for one that was stuck in a ‘happy face boot loop’. In this business we call this foreshadowing.

That’s when I saw this gem, a Nokia Lumia 1520, 32Gb, and in Red. I offered 17.77, and the seller took me up on it!

17.77!
Windows phone 8.10.14266.359

The phone arrived, running Windows 8.1. Needless to say, the store is all shutdown, so loading apps or doing anything fun is basically out of the question. So, the first thing to do is update it. I can’t download the ‘upgrade advisor’ as the 8.1 store has been shut down. Luckily the hand/dandy OTC Updater (otcupdater.zip) to the rescue!

Updating from 8.1

Just connect the phone with USB, run the CLI tool, and it’ll kick off the update.

Updating

A few minutes later, and the gears of progress grind away through the update

Updated to 10.0.10586.170 version 1511

And in no time, I’m up and running Windows 10, build 1511. I go ahead, connect up to WiFi, and run Windows update, and after downloading, updating and then rebooting…

🙁

Oh no, now my 1520 is now doing the unhappy face boot loop. 🙁 indeed.

Searching around, I see the tool to fix this all is the Windows Device Recovery Tool. Although it didn’t work for me. So, I sat there for 3 days watching my ‘new’ 1520 boot looping over and over and over.

I also need the .FFU recovery file, which is thankfully all backed up on lumiafirmware.com

I’m not sure what was going on, but I got a new USB-A cable, and suddenly, running thor manually ….

thor2.exe -mode uefiflash -ffufile \temp\RM937_02540.00019.15235.40003_RETAIL_prod_signed_942_026BB5_O2O-GB.ffu -do_full_nvi_update -do_factory_reset

As it begins, the phone switched to a nice RED

THOR2 loading
THOR2 1.8.2.18
Built for Windows @ 13:36:46 Jun 16 2015
Thor2 is running on Windows of version 6.2
thor2.exe -mode uefiflash -ffufile \temp\RM937_02540.00019.15235.40003_RETAIL_prod_signed_942_026BB5_O2O-GB.ffu -do_full_nvi_update -do_factory_reset
Process started Thu Nov 28 17:12:29 2024
Logging to file C:\temp\thor2_win_20241128171229_ThreadId-42432.log
Debugging enabled for uefiflash

Initiating FFU flash operation
WinUSB in use.
isDeviceInNcsdMode
isDeviceInNcsdMode is false
Device mode 6 Uefi mode
[THOR2_flash_state] Pre-programming operations
Disable timeouts
Get flashing parameters
Lumia Boot Manager detected
Check status of battery
State of charge 61, charging current -338
Protocol version 2.6 Implementation version 2.35
Detecting UEFI responder
HELLO success
Lumia Boot Manager detected
Check status of battery
State of charge 61, charging current -381
Protocol version 2.6 Implementation version 2.35
Booting to FlashApp
Reboot to FlashApp command sent successfully.
Verifying that device is online
Device is online
Detecting UEFI responder
HELLO success
Lumia Flash detected
Protocol version 2.34 Implementation version 2.59
Disable timeouts
Get flashing parameters
Lumia Flash detected
Protocol version 2.34 Implementation version 2.59
Size of one transfer is 2363392
MMOS RAM support: 1
Size of buffer is 2359296
Number of eMMC sectors: 61071360
Platform ID of device: Nokia.MSM8974.P6081.2.2
Async protocol version: 01
Security info:
Platform secure boot enabled
Secure FFU enabled
JTAG eFuse blown
RDC not found
Authentication not done
UEFI secure boot enabled
SHK enabled
Device supports FFU protocols: 0015
Subblock ID 32
[THOR2_flash_state] Device programming started
Using secure flash method
CoreProgrammer version 2015.06.10.001.
Start programming signed ffu file \temp\RM937_02540.00019.15235.40003_RETAIL_prod_signed_942_026BB5_O2O-GB.ffu
FfuReader version is 2015061501
Send FlashApp write parameter: 0x4d544f00
Perform handshake with UEFI...
Flash app: Protocol Version 2.34 Implementation Version 2.59
Unknown sub block detected. Skip...
DevicePlatformInfo: Nokia.MSM8974.P6081.2.2
Unknown sub block detected. Skip...
Unknown sub block detected. Skip...
Supported protocol versions bitmap is 15
Secure FFU sync version 1 supported.
Secure FFU async version 1 supported.
Secure FFU sync version 2 supported.
Secure FFU async version 2 supported.
CRC header v. 1
CRC align bytes. 4
Get CID of the device...
Get EMMC size of the device...
Emmc size in sectors: 61071360
CID: Samsung, Size 29820 MB
ConnSpeedEcho: Elapsed= 0.234000, EchoSpeed= 28.85, Transferred= 7077918 bytes
Get security Status...
Security Status:
Platform secure boot is enabled.
Secure eFUSE is enabled.
JTAG is disabled.
RDC is missing from the device.
Authentication is not done.
UEFI secure boot is enabled.
Secondary HW key exists.
Get RKH of the device...
RKH of the device is 3774964A7E6AC7EF7D428DDC0C0EAD71640B0D8DD3BFC3829110AF2D8ED68D7C
Get ISSW Version...
ISSW Version: 216
Mon Aug 11 15:15:33 EEST 2014;ISSW v0216; main; OS; DNE; KCI 1244; ASIC 8974;
Get system memory size...
Size of system mem: 2097152 KB
Read antitheft status...
Requested read param 0x41545250 is not supported by this flash app version.
Send backup to RAM req...
Clearing the backup GPT...SKIPPED!
Successfully parsed FFU file. Header size: 0x000e0000, Payload size: 0x0000000066a00000, Chunk size: 0x00020000, Header offset: 0x00000000, Payload offset: 0x00000000000e0000
RKH match between device and FFU file!
Option: Skip CRC32 check in use
Start sending header data...
Start sending payload data V2Sbl in async mode...
Percents: 0
........
Percents: 100
lastDescriptorIndex: 13135 lastLocationIndex: 0
Flashing completed successfully! Status: 0x0001
Safe write descriptor index reached: true
Payload data transfer speed (31.94 MB/s) Elapsed time 51.41 sec
Payload data size 1642.022339 MB
Read flashing status..
[IN] programSecureFfuFile. Closing \temp\RM937_02540.00019.15235.40003_RETAIL_prod_signed_942_026BB5_O2O-GB.ffu
Get EMMC write speed...
EMMC write speed: 44244 KB/s
Get data verify speed...
Data verify speed: 42032 KB/s
Send restore backup from RAM req...
programming operation completed!
[THOR2_flash_state] Post programming operations
[THOR2_flash_state] Executing factory reset
[Factory reset result] 0
Factory reset done
[THOR2_flash_state] Executing Full NVI Update
Write flash options ( WriteNvi: Full )

Write parameter to device via UEFI Flash App
Write parameter Ok
Flash options set successfully.

[Full NVI update result] 0
Operation took about 58.00 seconds. Average transfer speed was 29.69 MB/s.

Exited with success

And then with the phone prepped, it then went green:

Green boot state

Now it’s just a matter of having the phone reboot, reset from using Thor yet again

thor2 -mode rnd –bootnormalmode
THOR2 1.8.2.18
Built for Windows @ 13:36:46 Jun 16 2015
Thor2 is running on Windows of version 6.2
thor2 -mode rnd -bootnormalmode
Process started Thu Nov 28 17:15:54 2024
Logging to file C:\Temp\thor2_win_20241128171554_ThreadId-3412.log
Initiating do RnD operations
WinUSB in use.
Debugging enabled for rnd

Detecting UEFI responder
Send HELLO
HELLO success
Lumia Flash App detected
Disable time-outs
Read FlashApp Build Info
Read parameter from UEFI Flash App
Read parameter Ok
FlashApp Build Info: Date:Dec 23 2014 Time:10:56:58 Info:-
Transfer size: 2363392
Sublock ID 31
Buffer size: 2359296
Number of sectors: 61071360
PlatformInfo is Nokia.MSM8974.P6081.2.2
Async protocol version: 01
Security info sublock detected
Platform secure boot enabled
Secure FFU enabled
JTAG eFuse blown
RnD Certificate not found
Authentication not done
UEFI secure boot enabled
SHK enabled
Device supports FFU protocols: 0015
Sublock ID 32
Read Root Key Hash
Read parameter from UEFI Flash App
Read parameter Ok
Root Key Hash is 3774964A7E6AC7EF7D428DDC0C0EAD71640B0D8DD3BFC3829110AF2D8ED68D7C
Read public ID
Read parameter from UEFI Flash App
Read parameter Ok
Public ID is 2D54A10E278A16A38EE918F17BBB88431406FBF5
Protocol version 2.34 Implementation version 2.59
Resetting the device

THOR2_ERROR_CONNECTION_OPEN_FAILED

THOR2 1.8.2.18 exited with error code 84001 (0x14821)

And now I was back in business!

Back from the dead

And we’re so back!

This time I re-ran the OTC Updater to bring me back to Windows 10 10.0.10586.170 version 1511. This time I just decided to keep re-running the OTC Updater.

Windows 10 10.0.14393.1066 Version 1607

I was then able to update to 10.0.14393.1066 Build 1607. Nice!

Windows 10 10.0.14393.2551 Version 1607

And one more update, and now I’m running Windows 10 10.0.14393.2551 Version 1607, aka the last version that OTC can pull.

Well that was fun!

Next up, I signed in, and I was able to retrieve my One Drive. I forgot how nice it was to be able to play music directly from OneDrive, without having to download it to flash. And wow is the UI so snappy. Kind of crazy how old and 32bit bound the old Windows Phones are. Shame Microsoft didn’t believe.

I thought Outlook would surely work, but alas, no dice. It’ll load but not sync. MSN weather, stocks, travel are all dead. Just is the map software (Even on 8.1).

MUST GO FASTER!

Of the purchased apps, Minecraft just sits at the loading screen. Sonic CD, and Final Fantasy load up and run. As does the most coveted game of 2017, Candy Crush Saga still runs as well.

So yeah, it’s nice the paid stuff still works, but with no email it’s now just barely above feature phone level of usefulness.

I guess it’s time to finally just let go.

End of the line

Time to say Goodbye.

FrogFind in trouble!

I saw this post from Action Retro over on twitter, and it just reminds me why we can’t have nice things on the internet. Some jerk is always going to destroy stuff, simply because it takes effort to create, while tearing down things only shows impotent rate.

FrogFind in trouble!

FROGFIND UPDATE: Someone has been hammering the site with a scraper using rotating proxies that I can’t block. It’s pegging my server CPU at 100%. This has caused a service interruption. Working on solutions :'(

So annoying!

However, the source to Frog Find is available on github, so why not self-host a copy?

Since I’m using WordPress (not even touching that crazy WP drama!) I’ve already got a Linux machine running PHP/Apache (good olde LAMP!) so I thought this would be simple as, make a new virtual server, git clone the repo, and add a new entry to the olde DNS & Haproxy servers, and I’d be ready to go live!

[Tue Nov 19 11:35:50.601570 2024] [php:warn] [pid 25997:tid 25997] [client 127.0.0.1:49854] PHP Warning:  require_once(vendor/autoload.php): Failed to open stream: No such file or directory in /srv/www/FrogFind/index.php on line 2

Well, that was disappointing.

Looking at the repo there is this composer.json, so obviously it’s got something to do with that.

Looking around there is an incredible amount of information for installing & using it in your projects, but I don’t know why I struggled to find out how to actually use/deploy it. But it’s super simple, and of course it just needs you to curl & run stuff, which of course will never be used as a vector to spread malware. Never.

Installing composer into the local directory is simple as:

sudo curl -sS https://getcomposer.org/installer | php

And next, just run it with the following flags:

./composer.phar update --no-dev

And that’s it! It’ll get everything needed, and now hitting the site:

Just like that!

Since mine sits behind Cloudflare it locks out old browsers. I wonder about modifying some proxy to use 2 SSL’s to support ancient SSL, and ‘modern’ to proxy stuff, although it sure wouldn’t load new pages, but it could gate to services like a Frog Find on a service like Cloud Flare and modern crypto.

I’d encourage people to run locally hosted on their own LANs a copy of FrogFind. At least that way you won’t be interrupted by jerks.

Turbo-charging the IBM PS/2 Model 60 286

While I had posted endlessly about this particular computer, as someone that I had long desired as a kid, overall, the PS/2 model 60 is an underwhelming machine, with an exceptionally high price tag. Many other fans of other 80s 16-bit computers, were able to augment their weak processors with faster 16bit CPUs, and even 32bit processors. As it turns out, the IBM PS/2 also had options:

Is another $425 worth the sunk cost of a $10,000 286?

On the one hand, I have to imagine that if you could afford a $10,000+ 286 in 1987 you probably would have upgraded to something else in the last 5 years. The Kingston upgrade heralds from 1993, and well that 10Mhz 286 is pretty much borderline useless for productivity. I’m not even going to talk about gaming! DooM is right around the corner being released at the end of the year, and how on earth can you justify this monster of a machine at your desk?

So let’s unpack this little doodad!

Installation

The old 80286 & 80287 processors removed.

The first step in the manual says you need to extract your main processor, and maths co-processor if you have one installed. The FPU’s are so cheap now, it seemed crazy to not get one. Although the only thing more bizarre is that considering the asking price of the PS/2 model 60, is that the FPU was even considered optional. This was a serious business machine afterall!

Pin 1 of the 80286 processor socket

With the processor extracted, the next big task is to identify pin 1. Looking from the top it’s impossible to see, but rotating the board around it’s easier to see the indentation that they left on the board to denote pin 1. Unfortunately, the socket they used has no visible indication, and Intel had not learned the importance of keying parts yet, making incorrect insertion impossible.

With pin 1 identified, it’s now time to gently insert the upgrade module.

Fully loaded module

I had also purchased the 80387sx 25Mhz math coprocessor. Combining this with the IBM IBM 486SLC2-50 (50G6950) should give a rather 486 like experience. And keeping with 80s tradition all the chips point in various directions making this look like a mess.

Physical installation is as simple as that, with the module socketed we are go for power on!

BOCARAM/2 strikes back

Since this is the model 60, that means I’m still using that BOCARAM/2 card that totally messes up with the BIOS settings, so I have to remove the card, and configure things one card at a time.

But it does work!

Brining up MSD it does indeed show that it is a 486, with built in math coprocessor. I didn’t try it without one, to see if it becomes a 486SX, but I guess it would?

Default performance however…

Default clock speed

For some reason it felt faster doing the initial memory test. But that was demonstrably false. By default, the upgrade module runs at the original speed, meaning you have 32bit instructions at the 286’s 10Mhz clock. There is an included driver for MS-DOS & OS/2 2.0 GA that will turn on all the fancy features, but that means that it won’t work for Windows NT, or Xenix. SAD.

Turbo CPU

However, with the driver enabled, we are talking 386DX/33 speeds! Making this 2x the speed of the PS/2 Model 80 @16mhz!

Yes it runs DooM!

And why yes, it runs DooM! Performance is terrible since the memory is all 16bit, and the VGA on the PS/2 model 60/80 motherboards is 8bit, well there is so much performance left behind.

The 32bit port of Sarien to Pharlap 386 v4 /Watcom7 is pretty fast as well!

DUMB SCSI is the best SCSI

And SCSI remains a winner with the 32bit dumb SCSI card in a 16bit MCA slot, I still get 2,318.9 Kilobytes/Second

The good

The upgrade when compared to a new system is a fantastic bit of value. People had been buying and selling 386sx machines, which are basically full feature 286 machines with the hobbled 16-bit external 386 processors. Into the early 90’s all the rage was faster clocks, internal clock doubling, and yet even more cache. The later PS/2 model 80, running at 25Mhz did include the 82385 cache controller, and soldered on the motherboard cache ram, making it the best of the 80’s.

The bad

There is literally only so much you can do with a 16bit machine, and it being 1993, the Pentium was already shipping it’s 5v 60/66Mhz variant, with the infamous FDIV bug. Over the next year the Pentium would see it’s voltage dropped to 3.3v, and clock speed increased. Good times. The Pentium would drive 64-bit memory access along with faster 33Mhz PCI bus making it an incredible machine. Even a hopped up 286 is vastly outclassed, with its ancient and laughably tiny MFM hard disks, and 16-bit memory/peripheral bus.

If you are hanging onto a computer from 1987 in 1993, odds are you have old software anyways, and this is such an incredibly compelling upgrade for such an old klunker. By default it preserves the 286 speeds on boot if you so need them, but it’s nice having some 32bit POWER.

Although I wouldn’t want to use GCC on a machine this starved of resources, not even in 1993.

Manually converting a Proxmox VM to Qemu

I know this is a weird one. I got handed a backup of a broken VM and have to fix it. I was given a vma file which of course you basically need a Proxmox machine to use the vma command to unpack it.

Luckily you can happily install Proxmox into a VM that can’t properly run Proxmox, but it’ll give access to the utility to extract it.

It’s pretty self-explanatory other than the ‘tmp’ directory to extract to mustn’t exist. Weird.

vma extract vzdump-qemu-101-2024_10_07-12_26_33.vma tmp

In this case it extracted 2 raw files, and a config file.

disk-drive-sata0.raw
disk-drive-sata1.raw
qemu-server.conf

And looking at the config file we have:

boot: order=sata1;sata0;ide2;net0
cores: 4
cpu: x86-64-v2-AES
ide2: none,media=cdrom
memory: 8192
meta: creation-qemu=8.0.2,ctime=1691052188
name: KSA-ZABBIX-01
net0: virtio=C2:39:27:42:56:6B,bridge=vmbr0,firewall=1
numa: 0
onboot: 1
ostype: l26
sata0: local-lvm:vm-101-disk-0,size=500G
sata1: local-lvm:vm-101-disk-1,size=10G
scsihw: virtio-scsi-single
smbios1: uuid=6e0757ff-565e-429d-8f47-3b425b89253e
sockets: 2
vmgenid: 70b4cbfe-de9f-4690-b7a1-64e68f4c5c30
#qmdump#map:sata0:drive-sata0:local-lvm:raw:
#qmdump#map:sata1:drive-sata1:local-lvm:raw:

Ok the first thing is those raw files are ENORMOUS. Convert them to a better container, I went with vmdk because … reasons.

qemu-img convert -f raw -O vmdk disk-drive-sata0.raw disk-drive-sata0.vmdk
qemu-img convert -f raw -O vmdk disk-drive-sata1.raw disk-drive-sata1.vmdk

I then could copy the VMDK’s to my machine and then destroy the Proxmox VM.

Since I’m weird I’m going to do this on Windows, using the Win64 port of Qemu. Because, why not? Also, I’m going to setup a different NAT network, and some port redirect:

"\Program Files\qemu\qemu-system-x86_64.exe" -net none -serial none ^
        -m 8192 ^
        -device virtio-net-pci,mac=C2:39:27:42:56:6B,netdev=net0 ^
        -netdev user,id=net0,net=192.168.1.0/24,dhcpstart=192.168.1.10,hostfwd=tcp::8080-:80,hostfwd=tcp::8022-:22 ^
        -device ahci,id=ahci ^
        -drive id=disk,file=disk-drive-sata0.vmdk,if=none ^
        -device ide-hd,drive=disk,bus=ahci.0,bootindex=2 ^
        -drive id=disk2,file=disk-drive-sata1.vmdk,if=none ^
        -device ide-hd,drive=disk2,bus=ahci.1,bootindex=1 ^
        -boot order=c,menu=on ^
        -smp 2 ^

So, I managed to keep the virtio network device, bind it to a DHCP network of 192.168.1.0/24 with the first address starting at 192.168.1.10. I also redirect port 8080 to port 80, along with 8022 to 22, allowing basic HTTP & SSH access into the VM.

The weird requirement is the 2 SATA disks, where the 2nd disk is the bootable one. I don’t know why it was configured this way, but I just preserved it.

I had to reset the root password, so this was a bit weird as I had to clear so much nonsense of the boot setup, basically pruning everything after ro, to add “rd.break enforcing=0”

With that, it was a matter of mounting the /sysroot as readwrite, chrooting into it, and then setting the password. yay.

Now I can reboot the VM on my desktop and have it running on Qemu, where I could bring up the WebUI for the mystery product and have it all running as a tame user mode application.

Nice!

The CLI syntax is always evolving and getting complex but don’t give up hope!

Windows Server 2008 IA64 guest on HP Integrity VM (HP-UX)

This is a guest post by Antoni Sawicki (aka Tenox)

This is a guide on how to install Windows Server 2008 guest on HP Integrity VM. Yes, Itanium and HP-UX are involved. Unlike installing HP-UX or OpenVMS guests, this procedure is not widely documented (or at all) and rather an obscure process. I suppose Windows on HP-UX was never popular in first place and only maybe saw some use in the enterprise. Mid 2000, HP offered virtual labs where one could spawn their very own Win2k8 IA64 guest, but that is now long gone.

Lets say you have a HP Integrity server like rx1600, rx2600 or higher. You have HP-UX 11.31 installed on it and want to setup a Windows guest VM just for fun…

Firstly, if you have already installed Integrity VM from a recent Apps DVD, you will likely have 6.x version. This absolutely does not support Windows guests. You will need to downgrade to 4.x. To do that, start by removing the packages. You will need to uninstall the main HP VM package, as well as several others: Guest/Host AVIO, VMGuest*, VMKernel and VMProvider. You will also need to delete folders /opt/hpvm and /var/opt/hpvm. Otherwise you will run in to remains of some 6.x configs and databases that are unreadable to the older version.

Then you will need to install earlier version, for example 4.2.5, which is the last version that officially supports Windows guests. However HP VM 4.3 also works pretty well and has an added benefit of a “Virtual iLO” (but don’t get your hopes for a graphical console. Virtual iLO or not, all you get is a serial console to the guest. In case of Windows – SAC. (In practice ViLO only really provides telnet access to hpvmconsole) You can download earlier HP VM versions from here. The install is pretty straight forward, just unpack the tarball and point swinstall -s /path \* at it. I did encounter a small issue with 4.3 HPVM_1105. You need to create swlock file inside catalog directory of the extracted package to get past a lock error. Reboot and run this this to verify:

hpvminfo
hpvmstatus

If all good, the next step is to create a virtual switch and boot it up:

hpvmnet -c -S switch1 -n 0
hpvmnet -S switch1 -b
hpvmnet -v 

In this case -n 0 indicates lan0 interface from ifconfig.

Then you create a blank disk image, like so:

hpvmdevmgmt -A -S 20G /vm/windows.fd

Finally you create a VM and attach all the goodies:

hpvmcreate -P win64 -O windows -c 1 -r 2048
hpvmmodify -P win64 -a disk:scsi::file:/vm/windows.fd
hpvmmodify -P win64 -a dvd:scsi::file:/vm/w2k8.iso
hpvmmodify -P win64 -a network:lan::vswitch:switch1
hpvmmodify -P win64 -K x.x.x.x -L 255.255.255.0

The last bit with -K and -L is virtual iLO, only available in 4.3 and above. If using earlier version skip that part. The IP address can be on the same segment as vswitch / lan0.

Before you boot it up, I will remind you again that THERE IS NO GRAPHICAL CONSOLE. You can’t boot to the setup and click through the options. HP offers 3 types of text only mode installation:

Option A.
Using something called HP Smart Setup Media from HP Integrity Essentials Foundation Pack for Windows. I miraculously found it on HP Support Website and archived here. Insert this .iso image instead of w2k8.iso above:

hpvmmodify -P win64 -a dvd:scsi::file:/vm/smartcd.iso

If you ever need to remove it, the command is:

hpvmdevmgmt -d gdev:/path/file.iso

Then boot it up:

hpvmstart -P win64
hpvmconsole -P win64
CO

If you have virtual iLO you can also telnet to the IP address configured earlier with -K.

In the EFI console you open shell, then navigate to fs0: and efi\boot folder then launch bootia64.efi file.

You will be presented with this lovely screen:

Pick the Express Setup option:

After few screens later you will be see this somewhat familiar form:

You will be asked to swap the iso image in to a Windows 2008 IA64 Install CD:

hpvmmodify -P win64 -m dvd:scsi:0,0,1:file:/vm/w2k8.iso

Once it loads up, you need to type some magic spells. Wait till you see a message that says “The CMD command is now available”, type cmd, enter, then press ESC+TAB to switch to it. Then navigate to drive C: and run install. This is the information screen for reference:

The install process takes quite a while. Fortunately you can play SimCity on HP-UX IA64 while you wait!

Eventually the VM will reboot and auto load to SAC prompt again. Repeat the process where you see cmd is available, launch it then switch using ESC+TAB. You will be able to login to Windows IA64 Guest VM!

Hurray we have Windows IA64 VM Running!

Next simply run ipconfig to get the IP address and you can RDP to it:

Windows 2008 IA64 VM running on HP Integrity VM on HP-UX 11.31

Option B
Using Windows RTM media + unattend.xml file. The HP VM admin guide provides a sample unattend.xml file in an appendix. I have extracted and archived it here.

This is the original instruction:

The above is complete bullshit as you need an existing VM to perform this. Starting from scratch this is no go. I have opted out to just adding the unattend.xml to the original iso image using PowerISO. Simple and easy.

The rest of the procedure is quite similar to option A.

hpvmstart -P win64
hpvmconsole -P win64
CO

If you have virtual iLO you can also telnet to the IP address configured earlier with -K.

In the EFI console you open shell, then navigate to fs0: and efi\boot folder then launch bootia64.efi file.

Then at some point you will get to the SAC prompt where you will have to type cmd then press ESC+TAB to switch to it. Then in cmd.exe prompt you launch setup /unattend:d:\unattend.xml. and wait for it to do it’s job.

Once the system reboots, you will have to do the cmd esc+tab thing again, but this time you will get a login prompt. Login as administrator with the password from unattend.xml.

You will need to enable remote desktop:

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

and allow it through the firewall:

netsh advfirewall firewall set rule group="remote desktop" new enable=yes

The Smart Setup CD does this automatically.

Option C
PXE+RIS etc. Which is not covered here.

Post Install Steps

You basically get the IP address either from your DHCP server or by running ipconfig in cmd.exe of SAC. Then RDP to the VM. Login in as administrator with password you set either in unattend.xml or EFI install tool.

The Smart Setup CD has some drivers and components that can be installed on a VM.

What can you run on this?

Not much. From the “big apps” there’s MS SQL server, SAP and whatnot. 7zip and bunch of utilities from Sysinternals to C-Kermit. You can port more apps by installing Platform SDK and Visual Studio Tools. The latest known is Windows 7.1 SDK for IA64. It requires .NET 4.x to be installed. All archived here.

From lesser known items there’s Services For Unix, aka Interix, which has a cc wrapper around cl.exe and can be used to port posix apps:

Services For Unix on Windows 2008 VM on a HP-UX 11.31 IA64 host.

Have Fun with Virtualization!

If you find or port some cool software for Windows IA64 let us know!