I love ZFS but it definitely doesn’t fit every situation. One situation it doesn’t fit is Surface Go. Not only device is low on RAM but it’s also low on disk space. And ZFS really hates when it doesn’t have enough disk space.
Now, one can install Ubuntu perfectly well without any shenanigans. Just follow a guide on how to boot install USB and you’re golden. But I like my installations to be a bit special. :)
After booting into Ubuntu desktop installation one needs a root prompt. All further commands are going to need root credentials anyhow.
sudo-i
The very first step should be setting up a few variables - disk, pool, host name, and user name. This way we can use them going forward and avoid accidental mistakes. Just make sure to replace these values with ones appropriate for your system.
I usually encrypt just the root partition as having boot partition unencrypted does offer advantages and having standard kernels exposed is not much of a security issue.
Since we’re dealing with encrypted data, we should auto mount it via crypttab. If there are multiple encrypted drives or partitions, keyscript really comes in handy to open them all with the same password. As it doesn’t have negative consequences, I just add it even for a single disk setup.
Finally we install out GUI environment. I personally like ubuntu-desktop-minimal but you can opt for ubuntu-desktop. In any case, it’ll take a considerable amount of time.
tasksel install ubuntu-desktop-minimal
Short package upgrade will not hurt.
apt dist-upgrade --yes
The only remaining task before restart is to create the user, assign a few extra groups to it, and make sure its home has correct owner.
When shopping for gloves it is really useful to know hand size. Normal person would find a measuring tape. Me? I decided to make a on-screen measurement grid.
First step is just figuring pixel dimensions in relation to my diagonal. A bit of Pythagorean later, the following proved to be what I needed:
var diagonal =15.6;var pixelWidth =1920;var pixelHeight =1080;var ratio =16.0/9;var height = diagonal / Math.Sqrt(ratio * ratio +1);var width = height * ratio;// not really neededvar pixelsPerInch = pixelHeight / height;var inchWidth = pixelWidth / pixelsPerInch;var inchHeight = pixelHeight / pixelsPerInch;
Notice here that I am using “witchcraft” units instead of millimetres as I normally would. Reason for that is simple - I was buying gloves on USA site and all measurements were in inches. My screen measurement was also in inches. With both these units being the same, it made no sense to convert into something else first.
Also notice I am only using height to determine pixel density thus making an assumption pixel is a perfect square. Unless you are dealing with something really strange, this assumption is perfectly good.
With these basic calculations done, it’s time to draw. Notice I have a few multiplications/divisions by 4 hear - the only reason for these is due to me finding inch-based grid way too coarse. A quarter-inch grid gives a bit more flexibility here.
using(var bmp =newBitmap(pixelWidth, pixelHeight)){using(var g = Graphics.FromImage(bmp)){
g.FillRectangle(Brushes.White,0,0, pixelWidth, pixelHeight);for(var i =0; i <(int)Math.Ceiling(inchWidth)*4; i++){var pen =(i %4==0)? Pens.Black : Pens.LightBlue;var x =(int)(i /4.0* pixelsPerInch);
g.DrawLine(pen, x,0, x, pixelHeight);}for(var i =0; i <(int)Math.Ceiling(inchHeight)*4; i++){var pen =(i %4==0)? Pens.Black : Pens.LightBlue;var y =(int)(i /4.0* pixelsPerInch);
g.DrawLine(pen,0, y, pixelWidth, y);}}
bmp.Save("Background.png");}
I made this image my background and voila! Now I can measure my hand without ever leaving my chair.
With dark mode becoming quite fast the default setup for many, I figured having it in the new QText wouldn’t hurt. And with QT it’s easy - surprisingly so. Just start with a good style (i.e. Fusion) and adjust its palette. And that’s all it took.
Every time I would run update-initramfs, I would receive the following warning on my SuperMicro machine:
update-initramfs -u
update-initramfs: Generating /boot/initrd.img-5.4.0-42-generic
W: Possible missing firmware /lib/firmware/ast_dp501_fw.bin for module ast
This issue is well-known and harmless. It’s just a hardcoded value that’s checked by ASPEED driver and, if file is not present, results in this warning.
If you are tired of it and you just want to make driver happy, create an empty file at that spot:
Longer version starts with me setting up my new Ubuntu server and deciding to use netplan to setup network interfaces. Nothing too big. Just a few bonds here and there. And all seemed fine until I tried to setup email and noticed the following message in syslog:
postfix/smtp[49721]: connect to alt1.aspmx.l.google.com[209.85.146.27]:25: Connection timed out
postfix/smtp[49721]: connect to aspmx5.googlemail.com[2607:f8b0:4002:c08::1b]:25: Network is unreachable
Once I double-checked, I noticed syslog was right - I only had link-local address assigned to interface. Ok, so DHCPv6 only turns on DHCP and not prefix delegation I use for my network. Easy-peasy, that’s surely matter of just turning on the correct setting…
Or finding a matching bug. Yep, prefix delegation that’s perfectly valid and well supported IPv6 address allocation method is not supported.
But ticket did solve my problem. As advised, I simply reverted to use networkd (don’t forget to use systemctl enable systemd-networkd).
PS: Here are my networkd files that work with IPv6 PD.