Monday, July 27, 2015

Installing Ubuntu 14.04 LTS to Wyse Z90D7 Windows Terminal

I recently posted how to update Wyze Z90D7 to latest available Windows firmware. Which is far from usable. Let's see how Ubuntu works on this hardware. Actual flavour I picked is Lubuntu, but hardware support should be same for all.

TL;DR: What a piece of shit this is, don't waste your time just toss it to bin already.
First you MUST update BIOS to version 3.0E. At least some of older versions have bug that corrupt contents of BIOS chip requiring taking functional BIOS chip from another identical Z90D7 and bunch of hot-swap trickery to recover device. Simply booting Lubuntu 14.04.2 x64 live mode will corrupt it resulting blinking amber/orange led and nothing else after next power cycle.

Upgrade to BIOS 3.0E by downloading firmware tool and upgrade package. Create bootable USB stick that only contains BIOS and CMOS so make sure you unselect OS image. Boot your Wyse Z-Class from this stick to update bios. This must be biggest BIOS update in the world being nearly 6 gigabytes. Of course you only need few megabytes of it, but it's only available as part of that huge bundle.

Now we can proceed with Lubuntu install.

Download lubuntu-14.04.2-desktop-amd64.iso
Download Rufus
Create bootable USB stick from ISO image using Rufus. Default settings are ok.

Next connect USB stick to Z90D7 and power it on while repeatedly pressing DEL to enter setup. Default BIOS password is "Fireport".
- Change SATA mode to AHCI
- Check that Frame Buffer Size is set to Auto
- Enable Boot From USB
- Enable ACPI P-states
- Remove BIOS password
- Exit and save changes

Boot and press "P" to enter boot menu. Select USB HDD as boot source.
Select "Try Lubuntu without Installing" to start it in live-cd mode.
Make sure you have wired network cable connected, DHCP server is available on network and there's working Internet connection.

Since this device has only 4GB SSD we need few extra steps while installing. If you have version with bigger storage or are installing to USB3 stick you can skip these steps and just do regular Ubuntu install.

 - After system has booted in live-cd mode open shell by clicking on start menu, Accessories and LXTerminal.
 - Switch to root
  sudo su -
 - Bypass disk size check
  cd /usr/lib/ubiquity/ubiquity
  sed -i -e's/min_disk_size = size.*/min_disk_size = 1/g' misc.py
 - Install btrfs-tools package (bug 1347345)
  apt-get -y install btrfs-tools
 - Close terminal window and click Install icon on desktop

Since we have so little storage we can't spend half of it as swap. When installer asks about partitions select "Something else" to manually partition disk. Click "New Partition Table" to wipe existing partitions and then create single /-partition using BTRFS as filesystem. Ignore warning about missing swap partition.

As harware is bit on slow side it'll take a while to install Lubuntu. Eventually it'll prompt for reboot and land on login screen booted from internal SSD. Don't be alarmed by black screen, for some reason boot process is really, really silent.

After login we can see that install consumed 2,7GiB of our 3,9GiB SSD. Now you may be wondering why we picked BTRFS instead of traditional EXT4? Answer is we're going to enable compression to gain some extra space.

Open LXTerminal.
 - Switch to root
  sudo su -
 - Install btrfs-tools again which are still missing due bug
  apt-get update
  apt-get -y install btrfs-tools
 - Enable lzo compression on both / and /home partitions by editing /etc/fstab
  sed -i.bak -e's|,subvol|,compress=lzo,subvol|g' /etc/fstab
 - Remount / and /home
  mount / -o remount,compress=lzo
  mount /home -o remount,compress=lzo
 - Compress all existing files on / and /home, this will take some time but saves 0,8GB
  find / /home -xdev -type f -or -type d -exec btrfs filesystem defragment -v -clzo -- {} +
 - Install zram to compensate lack of swap
  apt-get -y install zram
 - Apply latest updates available
  apt-get -y dist-upgrade
 - Free some space by wiping apt cache and then reboot 
  rm -rf /var/cache/apt/*
  reboot

If you really insist on having fileswap over btrfs you can try adding these lines to /etc/rc.local and also enable zswap. Not recommended.
  rm -f /fileswap
  touch /fileswap
  chmod 0600 /fileswap
  chattr -c +C /fileswap
  dd if=/dev/zero bs=1M count=512 >/fileswap
  losetup /dev/loop5 /fileswap
  mkswap /dev/loop5
  swapon /dev/loop5


But is Linux any more useful on this device than Windows 7 was? Not really. It's still too slow to run even browser locally with more than one tab open. You can of course use it as terminal - as it's intended. Too bad there's only hacked up versions of Citrix client for Linux and stock Windows distribution lacking updates is way too scary to use for anything.

Entire principle of these thin clients from Wyse, HP, etc. is so silly. Companies are paying 800 euros each for crappy device like Z90D7 that's nothing more than 100 euro HTPC with crippled bios to make it "more terminaly". Then they pay even more for even crappier management tool licenses. Plus don't forget that 100k€ Citrix farm project with licensing nightmares and incompetent consults. In the end you have subpar desktop environment that neither users nor admins are happy with. Finally you realize that investment made on thin clients that was supposed to last for next 10 years is worthless under 3 years because embedded display adapters is so weak it can't support requirements of all those flashy websites your users are trying to use.

OpenElec / Kodibuntu or guiless linux like ubuntu-server seems to work fine. That's probably best use you can find for these devices. I still need to check if there's digital audio coming out on DisplayPort as that's obviously requirement for HTPC use.

P.S. If you're having problems booting from USB use Rufus and select "MBR partition scheme for UEFI" instead of default "MBR partition scheme for BIOS or UEFI". You may also need to tweak boot order in bios to ensure device really boots from USB. Selecting USB from boot menu after pressing P is sometimes ignored. You might also randomly get BIOS or UEFI mode boot from USB. Using larger USB stick can also sometimes help, for example I had issues with 2GB but 16GB worked ok.


No comments:

Post a Comment

Got something to say?!