Add blog section and first blog page
authorNick Downing <nick@ndcode.org>
Sun, 14 Jun 2020 09:14:00 +0000 (05:14 -0400)
committerNick Downing <nick@ndcode.org>
Sun, 14 Jun 2020 09:14:00 +0000 (05:14 -0400)
blog.html.jst [new file with mode: 0644]
blog/20200331.html.jst [new file with mode: 0644]
index.html.jst

diff --git a/blog.html.jst b/blog.html.jst
new file mode 100644 (file)
index 0000000..5f882c0
--- /dev/null
@@ -0,0 +1,27 @@
+return async env => {
+  let _out = []
+  _out.push('<!DOCTYPE html>')
+  html {
+    head {
+      link(rel="stylesheet" type="text/css" href="olly.css") {}
+      title {
+        'Blog'
+      }
+    }
+    body.olly {
+      h1 {
+        'Olly\'s Blog'
+      }
+
+      ul {
+        li {
+          a("href=blog/20200331.html") {
+            b {'31/03/2020'}
+            ' Today we got Linux running on my new Asus Zenbook UM433DA'
+          }
+        }
+      }
+    }
+  }
+  env.site.serve(env, 200, Buffer.from(_out.join('')), 'circle.html.jst')
+}
diff --git a/blog/20200331.html.jst b/blog/20200331.html.jst
new file mode 100644 (file)
index 0000000..0fda7e8
--- /dev/null
@@ -0,0 +1,90 @@
+return async env => {
+  let _out = []
+  _out.push('<!DOCTYPE html>')
+  html {
+    head {
+      link(rel="stylesheet" type="text/css" href="olly.css") {}
+      title {'Blog: 31/03/2020'}
+    }
+    body.olly {
+      h1 {'Olly\'s Blog: 31/03/2020'}
+
+      p {'Today we got Linux running on my new Asus Zenbook UM433DA. My dad was hassling me for ages about Linux versus Windows. And I decided to give Linux a try. My dad was working from home, but he said no worries, I can just help you each time you get stuck.'}
+
+      p {'So first we went into the BIOS, we tried various ways to get into the BIOS like Del, Shift-F11 and so on. It turns out you have to press F2 on this laptop. So then we went into the boot options and chose the USB with Linux Mint 19.3 on it.'}
+
+      p {'This is where we ran into the first of many problems! Booting from the USB just gave us a boot menu and then a black screen when we tried to proceed. Choosing "compatibility mode" helped us to get past this to a desktop.'}
+
+      p {'Now we discovered the keyboard and mouse did not work! Fun, fun, fun. My dad thought about this for a while and pulled the USB keyboard and mouse off our TV media PC. This let us get going again.'}
+
+      p {'Except there were not enough USB ports because the Linux Mint 19.3 USB needed to be in and so we could only have the keyboard or the mouse, not both. With a lot of swapping between them we could navigate the installer.'}
+
+      p {'We chose to overwrite Windows 10 with Linux Mint\'s default partitioning scheme, and chose a name and a computer name. The installer completed, so then we rebooted into what should have been the live (installed) system.'}
+
+      p {'Unfortunately, it was back to the black screen and this time there was no option for compatibility mode. If you pressed shift at the right time in bootup you could force it to a boot menu but it only had normal and recovery mode and neither of these worked.'}
+
+      p {
+        'We tried turning off the splash screen (by editing kernel commands in the boot menu and then pressing F10 to boot). The messages showed it seemed to be crashing and saying something about apic, so we booted with the '
+        code{'noapic'}
+        ' option and this worked.'
+      }
+
+      p {
+        'The next thing to do once we had booted into the installed system was an '
+        code {'apt update'}
+        ' and an '
+        code {'apt upgrade'}
+        '. We were hoping it would install a later kernel but it didn\'t so we had to do this ourselves.'
+      }
+
+      p {
+        'To see the available kernels we tried '
+        code {'apt-cache search linux-image'}
+        ' and then narrowed down the search to '
+        code {'apt-cache search linux-image-5.3.0-.*-generic'}
+        ', the final command to upgrade the kernel was: '
+        code {'apt install linux-image-5.3.0-45-generic linux-headers-5.3.0-45-generic'}
+        '.'
+      }
+
+      p {
+        'With the new kernel there was a black screen again and now the '
+        code{'noapic'}
+        ' option didn\'t work anymore. With some searching around other users with similar problems we settled on the workaround '
+        code{'amd_iommu=on ivrs_ioapic[4]=00:14.0 ivrs_ioapic[5]=00:00.2'}
+        ' which is working well for us and we installed it in '
+        code{'/etc/default/grub'}
+        ' permanently to run on every boot.'
+      }
+
+      p {
+        'A final problem was that the desktop failed to start, at first we thought it had crashed during the boot, but going to Ctrl-Alt-F1 gave us a console and we could investigate the problem. Looking in '
+        code{'/var/log/Xorg.0.log'}
+        ' showed that it didn\'t even seem to be trying to load any AMD GPU drivers, so this was a bit puzzling.'
+      }
+
+      p {
+        'Some more searching indicated there needed to be a kernel module like '
+        code {'amdgpu.ko'}
+        ' loaded, and this wasn\'t there and neither was it found in '
+        code {'/lib/modules/5.3.0-45-generic'}
+        ', although strangely there was one under '
+        code {'/lib/modules/5.0.0-32-generic'}
+        ' (the original kernel from the Linux Mint 19.3 installation USB).'
+      }
+
+      p {
+        'This problem was solved with another '
+        code {'apt install'}
+        ' command, the missing package was '
+        code {'linux-modules-extra-5.3.0-45-generic'}
+        ' which seems to be an overflow package created by Debian or Ubuntu developers since we last did this sort of thing, to combat bloatage given the Linux device tree now has thousands of drivers in it.'
+      }
+
+      p {
+        'Now my ASUS ZenBook Ryzen 3500U is totally awesome, I am looking forward to doing some cool web development and maybe some game developing in Python with SDL. My dad will help me when I get stuck (if he is lucky he will be able to do some of his own work in between but I doubt it).'
+      }
+    }
+  }
+  env.site.serve(env, 200, Buffer.from(_out.join('')), 'circle.html.jst')
+}
index d4d94c7..ce1edf0 100644 (file)
@@ -12,12 +12,22 @@ return async env => {
       h1 {
         'Olly\'s Website'
       }
-      a(href="/circle.html") {
-        'Go to Circle Calculator'
-      }
-      br {}
-      a(href="/trapezium.html") {
-        'Go to Trapezium Area Calculator'
+      ul{
+        li{
+          a(href="/circle.html") {
+            'Go to Circle Calculator'
+          }
+        }
+        li{
+          a(href="/trapezium.html") {
+            'Go to Trapezium Area Calculator'
+          }
+        }
+        li{
+          a(href="/blog.html") {
+            'Go to Daily Blog'
+          }
+        }
       }
     }
   }