Sunday, February 06, 2022

How To Install Debian Linux on the Dell Wyse 3040 Thin Client with 8GByte RAM

The Wyse 3040 is a little machine perfect for small tasks at home.


Read all about it here: Wyse 3040 Thin Client

I bought three of these second-hand for $30 US, and I wanted to run Debian Linux. These instructions will probably work for other distributions, ymmv. I will assume you know how to install Linux and know Linux quite well. This page is just about the 3040.

I could not find an OS upgrade to ThinLinux for 8Gbyte machines on the Dell site. Seems they don't support old hardware, only the 16Gbtye image is available

You need

  • A Linux machine for creating bootable USB storage devices,
  • Debian netinst installed on a bootable USB storage key. I used Debian 11 (Bullseye). Refer: Network install from a minimal CD 
  • The 3040 all connected up to Ethernet with Internet access, screen, keyboard, mouse.

Configure the BIOS


Power on the 3040 (press the power  button after the light goes Off) and keep pressing the F2 key - this will boot into the BIOS user interface. Unlock the BIOS. It might ask for the default password, 'Fireport'. [You can remove passwords in the Security section]. Look at the 'System Information' - my 3040 has BIOS version 1.2.4. Make these settings:
  • System Configuration/USB Configuration/Enable* set all these three ON
  • POST Behavior/Keyboard Errors OFF
  • POST Behavior/Extend BIOS POST Time  10 seconds
There are many other settings you can  tweak, but the USB settings are essential.

Save the BIOS changes and power off.

Check the EFI boot path needed


Insert the USB key and reboot, but this time keep pressing the F12 key to get the boot menu to display.

You will see the USB key as a bootable option. However select the BIOS Setup option rather than booting into the USB key. In the BIOS go to the General/Boot Sequence settings. Select the View  button for each boot option. Make a note of the File Name field. In all cases my machines show \EFI\BOOT\BOOTX64.EFI  Make a note of itYou can attempt to change this but due to a bug in the BIOS this value cannot be changed. We have to add this path in the installed file system.

Install Debian LInux


Reboot the 3040 keep pressing the F12 key to get the boot menu. Select the USB key and boot from it.

You should be able to install Debian now. Do the install, we need to keep it small to fit into the 2GByte MMC/SD disk in the 3040. Here are some options I used, you may have different preferences, but when in doubt, leave it out.
  • Guided use entire disk
  • Xfce
  • SSH Server
When the install is complete, leaving the USB key in the machine, reboot and keep pressing F12 to get the boot menu. You will see debian as an option now

[My USB key is a 'SanDisk Cruzer Blade . ..] 

Add the EFI boot files in the installed boot partition

Boot into rescue mode

However, boot into the USB key where the installer lives, but boot into 'Rescue' mode


It lists the devices and whether to use a root file system. Select 'Do not use a root file system':




Copy the EFI files

We are now going to copy the debian-created boot 'efi' file into the path expected by the BIOS as noted above.

 Check you have the 3040's boot partition, and mount it:

# blkid /dev/mmcblk0p1

Check the device has 'BLOCK_SIZE="512" TYPE="vfat"'

# mkdir /mnt/p1
# mount /dev/mmcblk0p1 /mnt/p1

List all the EFI programs, and their checksums:

# md5sum $(find /mnt/p1 -name '*efi' ) | sort

Now copy the EFI code into the directory the BIOS expects

# cp -rp /mnt/p1/EFI/debian /mnt/p1/EFI/boot

And create the file it expects

# cp /mnt/p1/EFI/boot/shimx64.efi /mnt/p1/EFI/boot/bootx64.efi
# sync; sync

Check you have the bootx64.efi file

# md5sum $(find /mnt/p1 -name '*efi' ) | sort

 

Reboot into Debian Linux

Now unplug the USB key and reboot the 3040. All being well, after boot and login you will see something like this:


Epilogue

It is likely here are better ways to do this than copying 'efi files. This is a start, let me know by email if you find a more elegant way to do this, thanks.













Thursday, October 15, 2015

Markdown editing and live preview with three simple tools.

Here's a simple way to edit and preview a text markup language without a special-purpose editor. In this case we will be editing markdown in a Linux machine and preview the result almost instantly.


Here's the setup:
  • The markdown is changed with a text editor (it does not matter which one) which saves it,
  • The program when-changed notices the change and runs pandoc,
  • pandoc generates an HTML file from the markdown,
  • Firefox is continually open and is displaying the HTML file from the hard drive, and
  • the Firefox 'Auto Reload' plug notices the HTML was changed and redisplays it.
All you need to do is place the Firefox window beside the editor window and you have live updates! And this will also work for any other text-based markup tools which render to HTML...

Some Technical details:
  • Centos 6.6
  • python 2.6
  • when-changed (0.2.1) ($ pip install when-changed)
  • Firefox 31.6.0
  • Auto Reload 1.2.0
Command-line for when-changed:
when-changed mymarkdown.md pandoc --from=markdown --to=html --output=mymarkdown.md.html mymarkdown.md

Tuesday, March 12, 2013

Windows 7 Screen Saver Quenching for Kiosks

Here's a powershell script which stops the screen saver. Handy in an enterprise where screen savers are enforced by group policy. Used this for a machine set up as an annunciator/dashboard.
#
# This script emulates a user pressing the Num Lock key every two seconds. 
# When working the Num Lock light will flash on the keyboard. It will affect
# the behaviour of the numeric keypad
#
# This tricks the windows screen saver into thinking there is an a active user
# hence it prevents the screen saver. Do not use in a secured situation.
#
# For details see http://technet.microsoft.com/en-us/library/ee156592.aspx
#
$shell = New-Object -com "Wscript.Shell"

while ($True) {
  $shell.sendkeys("{NUMLOCK}")
  Start-Sleep -Seconds 2
}

Tuesday, February 26, 2013

World's buggiest web server?


This being Australia, ants built a nest in my web server.  This might explain the random system resets. Ants must conduct electricity!



Friday, January 27, 2012

Toshiba Portege M400 Debian Linux Squeeze 6.0.3 Install Note #1 - Touchscreen

The M400 tablet PC has a Wacom touch screen electronics. This appears as a serial device. Because of this, there is no need to install wacom kernel drivers! This means there's nothing found by any of dmesg , lshw nor discover !


However Squeeze does not recognize the touch screen of the M400 tablet PC. So the command
xinput list
does not show the device.


This fix is to apply the above patch to the file /lib/udev/rules.d/69-xserver-xorg-input-wacom.rules. Then reboot.

Debug aids:
You can test the device by running
cat /dev/ttyS? | od
then move the pen around. On my machine I found that running the command
cat /dev/ttyS0 | od
produced output when my pen was moved. You may have to try all the /dev/ttyS* devices.

When patched and working, you will see this:
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Microsoft Microsoft Basic Optical Mouse v2.0 id=9 [slave pointer (2)]
⎜ ↳ PS/2 Mouse id=11 [slave pointer (2)]
⎜ ↳ AlpsPS/2 ALPS GlidePoint id=12 [slave pointer (2)]
⎜ ↳ Serial Wacom Tablet eraser id=13 [slave pointer (2)]
⎜ ↳ Serial Wacom Tablet id=14 [slave pointer (2)]

And hwinfo reports:

# hwinfo
10: udi = '/org/freedesktop/Hal/devices/pnp_WACf004_serial_platform_0'
linux.device_file = '/dev/ttyS0'
linux.hotplug_type = 2 (0x2)
linux.subsystem = 'tty'
info.capabilities = { 'serial' }
info.category = 'serial'
info.subsystem = 'tty'
info.product = 'Wacom Serial Tablet PC Pen Tablet/Digitizer'
linux.sysfs_path = '/sys/devices/pnp0/00:0c/tty/ttyS0'
info.parent = '/org/freedesktop/Hal/devices/pnp_WACf004'
info.udi = '/org/freedesktop/Hal/devices/pnp_WACf004_serial_platform_0'
serial.originating_device = '/org/freedesktop/Hal/devices/pnp_WACf004'
serial.device = '/dev/ttyS0'
serial.port = 0 (0x0)
serial.type = 'platform'


Friday, September 03, 2010

Top Gear is Dr Who

I think Top Gear and Dr. Who are the same show. Look at the similarities:
  • The Stig = The Doctor, who dies and regenerates in slightly different forms and is played by different actors. First black, then white. What colour Stig next? The Stig is not human and can drive any time machine (er, car) perfectly. Ever notice how he is always discussed formally as "The Doctor" or "The Stig", never some other nomenclature?
  • Jerremy Clarkson, James May and Richard Hammond are The Assistants, each echoing a portion of the Doctor's personality.
  • The Stopwatch = The Sonic Screwdriver, part of the cast almost.
  • The Producers = Terry Nation et. al. who put the characters in strange challenges each episode.
  • The Guests = Guest stars who drop into the series to add to the ratings.
  • The company? The BBC.
Can you spot more equivalences?

Sunday, April 11, 2010

The Configuration Management Manifesto

We follow these principles:

We use source control tools to record changes to our software and configuration during development so that our source code and source data is uniquely identifiable.

Our deployable software is created by repeatable and automated builds.

We identify every item of source code and data used to create our deployable artefacts.

We provide a cryptographic checksum of all files we release.

We generate deployable software that is uniquely identified and self-identifying. No two artefacts we generate have the same identification.

We create software products whose environment configuration is externalised hence absent from the deployable software artefacts.

We provide a baseline of the unique identifiers for all parts of a delivery to our customers including software releases, test or production environments, hardware, data or any other delivery.

We record the all changes we make to our test and production environments, including software deployments, configuration changes, and hardware changes.

We only test software artefacts that are uniquely identifiable.

We only test software in environments whose hardware. and software components configurations are fully documented.