Friday, October 6, 2023

Windows 11, Bare metal and in a VM!?!

 Wait what?

Currently I run Pop OS 22.04 as my daily driver. I have the same installed on my work laptop.

This came about as I found while dipping my toes into development, I was using WSL more and more and finally decided to just make the move.

I've dabbled a bit with Linux in the past (was a nightmare trying to get a 56k MODEM running back in 2003 - no open source BroadCom drivers), tried Ubuntu, but didn't like the UX also tried KDE/Plasma and Gnome etc.
Heard about the controversy with Mint, Game based distros seemed unsuitable for a daily driver/development work and I finally decided to give Pop OS a try on bare metal instead of a VM or crappy ass laptop!

I love it, aside from my cheap crappy secondary monitor not working at first, it runs better (imo) that Windows 11 ever did!

Unfortunately there are a couple of things that I am unable to run under Linux:
  1. Microsoft Office and the Add on we have
  2. Conan Exiles/Medieval Engineers/Mass Effect
  3. Quake III
Let's put aside the first one for now and look at the last couple of items: they are all Steam games and in all honesty, I'm not going to miss them. I have *checks notes* 400 odd other games to play. And Quake III won't run under Windows anyway. The flip side, is a lot of games that won't run under Windows anymore will run under Lutris! Yay for classic gaming!

On to Office, yes this was a bit of a calamity, as when I was working in Enrolments, I would spend 99% of my day Excel!

Oh but why can't you use one of the lovely open source alternatives?

Well I tried! I mean LibreOffice comes preinstalled on Pop OS, but given that the work I do is more in the nature of string verification and not calculating numbers, I found it lacking for the task at hand.
Any spreadsheet can find the sum or average of a column of numbers, but what if I have 10,000 rows of email addresses and I want to run a REGEX over them, highlight the ones that don't match and sort by this new color?

I know how to do that in Excel without even having to touch the mouse and the Toolbox AddOn that we have used for years is in Excel only, I don't want to rewrite it (for a third time and the second time was with the original creator!) in C++ just for LibreOffice...ewww

What about online Excel? Yeah but no magic ToolBox and its seems a bit slow when you are dealing with 30,000 lines of data. (OR was that Google Sheets when I last re-wrote it, I forget)
This being said, there is a version of our ToolBox that I'm writing in TypeScript (should have stuck with JS) for the online version of Excel. Good news is that it will run on the online version (yay Linux) and the Windows Desktop version, shoot probably even the MacOS version too!

But anyway I digress, I'm literally waiting for a Windows 11 ISO to write to a stick for my next Adventure that may fuck up everything.

Ah, it appears to be done, sigh I hate USB 2.0 speeds, but why upgrade from the lovely coloured USB sticks from EMTEC.

Dual booting Windows

Well though I might give that a try, but the Windows install wanted me to provide a disk with a driver on it, but didn't bloody tell me WHAT it wanted... Wholly crap, since I upgraded to a NVMe (I PS5 grade one too) and ditched the dual boot for just Pop, I didn't even know that I couldn't install Windows anymore.

VM it, but directly on a partition instead of a file

Should be faster, and I do hear tell, I can then boot normally as well as VM it. Lets just try get the VM working as that is the least I need to be able to work on Monday!

https://www.youtube.com/watch?v=6KqqNsnkDlQ
https://www.virtualbox.org/manual/ch09.html#rawdisk

I have a small partition left just for Windows (which I intended to install onto directly...), let's install the VM directly on that.

I've created another VM (the last one keep giving me a garbled or straight black screen except for the mouse, couldn't get it to show up the log in screen, so if I'm reinstalling it anyway, lets try something new...)
instead of using a virtual disk on the host OS, I need to create a tiny file that points to the entire partition for raw disk access
VBoxManage createmedium disk --filename /home/doglitbug/VirtualBox\ VMs/Windows\ 11/Image.vmdk --format=VMDK --variant RawDisk --property RawDrive=/dev/nvme0n1 --property Partitions=1,5
So that didn't work, so tried the ol' Sudo !!

Okay so that is now created, now link the file to the new VM using NVMe as the disk type

Lets try booting it up and install Windows 11...

Damn, now getting this when trying to attach the drive:
I tried chown, naughty me, didnt work of course, so now trying:
sudo usermod -a -G disk doglitbug
sudo usermod -a -G vboxusers doglitbug
(from https://unix.stackexchange.com/questions/284704/verr-access-denied-when-trying-to-add-a-raw-disk-to-virtual-box)

Make the image without SUDO and then...

Just install the damn Extension pack

And now I get here:

Heh, forgot to enable TPM 2.0 in VirtualBox Settings
Now I can't find a drive to install to...

From https://www.virtualbox.org/ticket/17228 :

Sigh, this might not work?
VBoxManage setextradata "Windows 11" "VBoxInternal/Devices/nvme/0/Config/MsiXSupported" 0
VBoxManage setextradata "Windows 11" "VBoxInternal/Devices/nvme/0/Config/CtrlMemBufSize" 0
Hmm I can see everything now, must be careful... I should only be able to see 1 and 5...

Must only touch partition 5, as the 200 GB is all that I reserved for Windows 11

And off I go with the install!

Wholly crap...it's installed, be back later.

Ohh I see a desktop! And lets just hide that D:/ drive do not want to modify that one...

Now for Guest additions, clean up the cruft and install Excel.
Oddly enough this is the first time I've gotten away with 3d Acceleration being enabled, I wonder what it means.

Hmm can we Steam link from here to the Host?
Can we load this bare metal? (Yes)

Can I still load into Pop OS, or did Windows mess with the damn boot loaders as it is soo want to do... (Yes)

Find out next week when I get this machine up and running again... (2 minutes later, damn hyper focus)

Heh, I can still boot into Pop OS just fine and it is the default option, just like I never installed Windows.

I can boot into Windows by hitting F11 and selecting it during boot, however I was unable to log in and my pin was removed due to a change in "security settings" (I'm gonna guess the change in hardware make it require a proper log in now, props to MS for a safety feature!)
However, I couldn't be bothered reaching for my phone to find that password in 1Password, so that'll be a task for another day.(its 1.30am)

Now to install Excel and the ToolBox, then for the real test, see what happens to the VM if I install the nVidia drivers and try those unplayable Steam games listed above and then try run Excel in a VM.


2023-10-09 Hmm, I had to turn 3d Acceleration off, as I was getting dialog boxes in Windows being blank and Excel would not show anything either. Dropped down to 4 GB RAM and seems to be singing now. Can't activate Windows though, which is weird, it should be tied to my Microsoft account. Lets see what happens when on bare metal.

Wednesday, June 22, 2022

Setting up a RISC OS development Environment

Installing software:

For this I have chosen to emulate RISC OS rather than have a separate set up with multiple keyboards/mice or using VNC (also, I don't want to buy a RPi 400 atm)

For this I have gone with RPCEmu and used their Quickstart package for RISC OS Direct 5.27

While this is not the latest version (as of 2022-06-23 it is now 5.28) I think this close enough.

As far as I am aware, all other emulators out there wont run 32bit RISC OS anyway.

I did notice that a fair few of the applications included with this quick start package are available under !PackMan but are not registered with this application. Meaning that if you want to install up to date versions, you will need to uninstall the provided ones or have the new ones overwrite the location they are in - most of these are not in default locations!

Once the program is downloaded and unzipped to a location of your choose in Windows, you can run it by double clicking on RPCEmu-Recompiler.exe, this runs better than the interpreter.

After a few moments (I believe the first run takes a bit more time than subsequent ones) you will be presented with the following screen:



Changing settings:

From here you can personalize the OS. For me I choose to do the following:
  • Change screen resolution to max. 1920x1080. Later on I will try set this higher as my host machine is running 3440x1440 !AnyMode?
  • Remove CD and floppy stuff as we wont be using these
  • Choose a new background
  • Auto run !Help, !StrongEd and !Netsurf
  • Auto run !Alarm and set format for the date to 2022-06-23 format %ce%yr-%mn-%dy
  • Change Time Zone
  • Change Theme to Raspberry
  • Change Keyboard Format to USA
  • Create a My Documents folder and pin to desktop

Screen resolution:

Haven't been able to figure out how to reliably change the resolution for a larger host desktop but the following seems to work:


And yes, I've done all the mucking around with Monitor files etc that I can.



Saturday, August 29, 2020

Getting the ESP8266 connected!

 Heh, this was a tad easier than I thought, after a bit of Googling of course.

Followed the instructions here and under Board Manager, select Generic 8266 Module

Once this one done, managed to upload the Blink example sketch and it is working.

I think next step is to try and attach a 16x2 text display then see if I can get it to access the Bacon Ipson API to print out some text!


Unsure of what sort of grunt I can expect out of such a tiny board, but Wi-Fi capable makes it pretty powerful in its own right! Next plans might be using BlueTooth to control the vest (once I fix it and make a new one that fits)

Windows 11, Bare metal and in a VM!?!

 Wait what? Currently I run Pop OS 22.04 as my daily driver. I have the same installed on my work laptop. This came about as I found while d...