Commit 0c62bf28 authored by Izaya's avatar Izaya

actually registered the deletion of the other files oops

parent b4ad74c7
-- title Balance, and "if it works for you"
-- author Izaya
-- date Some time in 2016
#### Balance, and "if it works for you"
This is probably going to be a rant, so you may want to continue scrolling.
Balance is important. It's important for deciding what you eat, it's important when designing things, it's important when building games, when playing games, and it's also important when building computers. It has to have balanced specs, you need a balance between performance and price... Off-the-shelf boxes are usually unbalanced, and boxen for specific purposes are unbalanced for a reason. Other times, a computer seems under-powered, or even simply is under-powered, due to the price/performance balance. Now, I'm sorta annoyed about all of this at the moment, and my main point relates to this.
Intel processors tend to have better instruction-per-cycle counts compared to AMD processors. AMDs tend to have more cores and are often clocked higher.
I have a number of friends with AMD boxen. Those boxen do what their users need - mostly gaming, which is somewhere AMD processors are quite solid. These boxen usually have good graphics and a reasonable amount of RAM.
I, on the other hand, have an Intel processor. i3 4160, and it does what I need, though I'm looking at upgrading to a Xeon after I get a new phone. The reason for this is that I need more IPC and less single-core performance. The Xeon has an even lower clock speed than my current i3, but it has more cores and more cache, despite not costing a huge amount. I do a lot of virtualization, and I like to run a lot of programs at once. In contrast to this, my video hardware is midrange, a 750Ti. I don't do much gaming, so this doesn't bother me.
Now, this is all well and good, but what am I even ranting about?
Well, as it turns out, some people refuse to understand the whole "if it works for you" thing - anything that isn't as good as their box isn't good enough. These people also have a tendancy to be wealthy and have rather powerful machines. As such, I've heard a lot of "AMD sucks" - and while yes, AMD stuff does have a lower IPC, for the price, it's often better value than Intel processors.
If it does what the user needs, there's nothing wrong with the choice. Some people choose to be... unsavoury and ignore that.
It just annoys me. Not like I can do anything about it, but it annoys me.
This effect in action: Plenty of people I know use AMD graphics cards, while I choose not to because NVIDIA cards have better Linux support. As Windows users, this does not bother those people.
That is all.
-- title On Social Media
-- author Izaya
-- date 2017/08/24 09:24 +1000
#### On Social Media
For a while, I've been considering setting up a GNU Social instance. Needless to say that most other forms of 'social media' are hostile, considering their data mining and restriction of freedoms, but rms has some [wonderful]( [pages]( on that so I won't get into that. However, I will write about why I'm not going to be setting up a GNU social instance. These are not technical reasons, just reasons it wouldn't be useful for me.
##### Low signal-to-noise ratio
Ever noticed that everyone seems to post a bunch of stuff but beyond a given 4-or-so set replies people never talk? People broadcast their thoughts into a space full of posts other people never read and it seems *so very pointless*. I'll admit that that's pretty much how I use this blog but it's a blog, it's not really meant to be social, it's where I write down stuff for other people to maybe-but-probably-not see.
##### Redundancy
As far as communication goes, I'm on IRC basically 24/7 on my desktop, laptop and phone.. I have an XMPP client open on my phone and desktop 24/7. My phone has a SIM card so if people really want to they can call or SMS me. I don't see how some form of indirect communication would help here. I already have 4 types of direct communication, where if people want to talk to me, they can.
The other use for social media is news, apparently, but there's this amazing thing called RSS that lets me get the news directly from the source, be it a news site, a person's blog, an automated weather station... Hell, even I have RSS on here.
##### Hardly *social*
Oddly enough, people don't want to be social on social media. I'm not entirely sure why some people use it, beyond narcissism and games.
Again, people write lots but read little. I don't see any reason to set up something that doesn't do what it's meant to.
##### Wastes time
I already waste plenty of time shitposting on IRC, playing games and looking up useless stuff. Why would I want to set up something explicitly designed to keep you looking at it for as long as possible?
##### Not social anyway
I'm not very social online anyway. I don't talk to people a huge amount, especially the people I know personally, as if I want to talk to those people, I go to them, and I talk to them like a real human being (or, if it's late or inconvenient I SMS them but whatever, it's not really online).
-- title Adventures in btrfs
-- author Izaya
-- date Some time in 2016
#### Adventures in btrfs
btrfs is quite possibly the greatest filesystem ever. Okay, I can't really say that because I haven't tried zfs yet (one day...), but it has some really cool features.
So, in the time I had off I reinstalled my laptop to be even more paranoid, the details I will not get into. However, I will say that I installed Arch, Debian and a copy of Windows 7. Let me tell you, partitioning and not breaking Windows is a real pain. Did you know Windows doesn't like it if you overwrite the System Reserved partition?
Anyway, the Windows is boring. Some of the interesting things I did are:
- I set a BIOS password required to boot the machine, and my laptop has the password stored in EEPROM instead of a battery-backed SRAM chip, so taking out the CMOS battery won't remove it
- I set up an encrypted /boot partition, which is fun because I can have passwords on GRUB and they are effectively un-bypassable, and you can't see the entries for other users without decrypting it.
- I did some fun stuff with btrfs, for example, installing two distros in the same filesystem, while having one bootable as an LXC container on the other using a considerable amount of dark magic.
How does that work?
Well, btrfs has a cool system of subvolumes, which can be mounted independantly of each other. So, I have the debian system as the root of the filesystem, and /var/lib/lxc/arch/rootfs as a subvolume containing a bootable arch system.
I also did the same thing with /boot - except Arch is the one in control here, mainly because it's easier to do fun stuff with the bootloader on Arch. The /boot partition also has subvolumes - one named debian at present, as I can use that to load the debian kernel and initramfs without doing weirder stuff with other filesystems.
So, depending on the OS running at the time, you have two possible FS layouts:
- On Arch:
- / is /dev/mapper/cryptroot -o compress=zlib,subvol=var/lib/lxc/arch/rootfs,defaults
- /boot/ is /dev/mapper/cryptboot -o compress=zlib,defaults
- On Debian:
- / is /dev/mapper/cryptroot -o compress=zlib,defaults
- /boot/ is /dev/mapper/cryptboot -o compress=zlib,subvol=debian,defaults
So this is how I have two distros on the same filesystem. You can also run Arch as an LXC container from Debian, 'cause why not?
My next experiment will be installing NixOS on the same filesystem, we'll see how well that works.
-- title Blog updates
-- author Izaya
-- date Some time in 2016
#### Blog updates
So I rewrote the backend for the whole site, including this blog page.
Major changes include:
- Runs on webservers other than apache2 (runs as CGI script)
- Cleaner HTML and CSS
- The Lua behind it all sucks less
-- title An advertising company for the advertising age
-- author Izaya
-- date Some time in 2016
#### An advertising company for the advertising age
I got bored a while ago, and came up with an idea to capitalize on people's brand-centricness.
##### Step 1: Build an advertising business
Or take over one. Google's advertising business would be a good start.
##### Step 2: Have a premium option for users.
Walk out onto the street for a moment. Or don't because you don't want to, that's fine too. The reason I wanted you to do this is simple: What does your typical normal person look like?
Now, I work somewhere that is... not cheap, shall we say. This is most unfortunate as many of the people are not my idea of a good person but there's not much I can do about that. Anyway, here's an example from my observations:
- Converse shoes
- Skinny jeans
- Branded T-shirt
- Vans bag (the brand)
- Adidas jacket
Now, I'm assuming these people have payed for these items. They might have been given them or something, but for the purposes of this article, they bought them.
Paying for branded clothing is paying several times the normal price for a cheap item with advertising on the front, back or side. Put simply, *people pay extra to display advertising on themselves*.
The idea behind the 'premium option' for users is this: their ads will be replaced with a brand logo, slogan or other advertising material of their choice. I'm not sure why people would do that rather than using some form of adblock but people pay extra for advertising so why not?
You're probably thinking "but advertisers wouldn't want their ads blocked by the service". Right you are. However, the solution to that is to give the advertisers a part of the profit from the Premium subscription. This way, they get some return even if nobody buys their product. Web 'developers' putting advertising on their site would also get a cut of the profit, as to be expected.
##### Step 3: ???
##### Step 4: Profit!
-- title Making Windows Sane to use
-- author Izaya
-- date Some time in 2016
#### Making Windows **Sane** to use
Whether you have to use Windows for work, or are still running Windows for games, if you have any form of income and work in IT you probably have to use Windows. Windows is generally known as a Bad Thing, but it's often not an individual's choice. As such, I present to you, a guide to making Windows **Sane**
##### My environment
I did this on my main home desktop:
- i3 4160
- GTX750Ti
- 500GB Windows HDD
It runs Windows 7 and for this guide I used a copy of VMWare Workstation.
##### 1. Materials
- Windows
- Linux installer(s) (I used Debian and Arch)
- [VcXsrv]( (you could use Xming but VcXsrv is a lot better, for example supporting borderless windows)
- [PuTTY]( and pageant, or your favorite fork
- Virtualisation Software - [VirtualBox]( works fine
##### 2. Setup
First, install your hypervisor. You'll want to get your linux virtual machine(s) installing. The rest of this can be done while you wait.
Get VcXsrv and PuTTY installed. Generate your keys. Ideally get pageant running at login (by placing a shortcut in the Startup directory of your start menu).
If you have a box to test X11 forwarding on, do so now.
Once your virtual machine(s) are done with the base install, you'll want to install:
- most of the xorg set (xauth is important)
- the ssh daemon
- XFCE (you could use other DE/utils but I haven't tried them) (also look into the XFCE whisker menu, it's much nicer than the standard menu)
- lxappearance (for theme changing)
- any applications you want to run in on Linux, for example LibreOffice which somehow performs better over X11 forwarding to a VM than on real Windows.
At this point it would probably be wise to reboot both the virtual machine and the host machine, because knowing Windows it might even prevent future errors.
Also look into getting the virtual machine(s) running at boot so you don't have to manually start them
##### 3. Usage
Determine the IP address of your virtual machine(s). Create a session for each. Under Connection/SSH, put xfce4-panel in the Remote Command box. Enable X11 forwarding under Connection/SSH/X11.
Unless you already put your key in it'll ask you for your password when you log in. After you enter it, there'll be some GTK warnings but it's fine. The panel should ask you about initial setup. Don't use the default, just make a single panel somewhere out of the way, make it autohide, and stick some launchers.
For some *odd reason*, Windows doesn't provide EWMH so you can't use the window buttons/menu but just about all of the other panel widgets should work.
##### 4. Enjoy a semi-sane environment
Some possible things you may want to look into:
- setting up samba on the VM so you can mount a file in your home dir to your Windows
- setting up a web server/ssh server that is forwarded from the host to a VM
- making custom live CDs so you can have disposable virtual machines
- playing with other window managers/desktop environments
-- title Remotely building Cyanogenmod 13
-- author Izaya
-- date Late 2016
#### Remotely building Cyanogenmod 13
Part 1 of why you should never try to do any form of Android development ever.
I'm away from home at the moment, with only my laptop (A Lenovo IdeaPad S10e). I've been wanting to upgrade my phone from Cyanogenmod 12 for a while, however the only nightlies availible from the cyanogenmod site are Cyanogenmod 14, which seems a little more buggy than I'd like. This seemed like a perfect time to figure out how to build Cyanogenmod, so I can learn how to enable the features I need to run LXC on Android as well.
So, obviously, the first plan was to build it on my laptop. That wasn't going to work.
##### My laptop
- 32-bit processor
- 80GB disk space
##### Requirements
- 64-bit processor
- 100GB disk space
Right, so that won't work. Fortunately, at home I have a nice, powerful server I can spin up a VM on. The CM wiki recommends using Ubuntu but I prefer Debian, so I throw up a Debian VM with two cores (of a Xeon 1231v3), 8GB of RAM and 200GB of disk space.
I follow the guides on the wiki on setting up a build environment and such, and it takes a few hours to download the 20GB of source files. Plenty of time for a dip in the pool and such.
I run into somewhat of a problem at the "Extract proprietary blobs" section. The scripts assume adb on the machine you're building on can talk to your device. To recap, the machine I'm building CM on is 300km or so away and my phone is sitting on the table next to me. What does our hero do now?
Okay, thing 1: in the Developer Options section of Settings on my phone, I can enable 'ADB over network'. This lets me connect to ADB over the network, as you may have guessed. It uses TCP. Okay, great, now I no longer need the cable to copy files to/from my phone.
Thing 2: ssh can do remote port forwarding, so I can forward a port my laptop can access to a port on a remote machine. This means that I can forward the port adb over network uses to my virtual machine 300km away.
[izaya@sks-s10e-1 ~]$ ssh -R *:5555: cmbuild
So this is where I'm at now: waiting for my files to upload from my phone over 3G.
I'll update this soon.
-- title Sanely building Cyanogenmod 13
-- author Izaya
-- date Late 2016
#### Sanely building Cyanogenmod 13
Part 2 of why you should never try to do any form of Android development ever.
So, take two. I gave up on the Debian virtual machine ... yesterday. Yeah, it was yesterday. I feel like [that xkcd strip]( is rather relevant, the last 36 hours or so have been a blur of mexican takeout, cola and compiler errors.
So, a few things I did:
- Dropped Debian in favor of Arch
- Found out that old Arch and new QXL don't get along
- Dealt with cert issues on the Cyanogenmod maven repo
- Managed to allocate 7GB RAM less than intended to a virtual machine
##### Arch and QXL
The Arch Linux iso I keep around is from 2016-09-03 because I'm too lazy to download a new one. After recent upgrades to the virtualization server, I updated all the stuff on the system as well, which updated qemu and libvert and such. Now, fun fact: on occasion Arch will hang when exposed to a version of the QXL video driver it doesn't understand, with common timing being **while you're trying to install Arch**, which is positively *wonderful*.
As much fun as that was, I've had the same issue with Haiku, so I just set it to VGA and got on with my day.
##### Cert issues
So, after waiting about 5 hours for the cyanogenmod source to download AGAIN, I got to work trying to compile it - grab the binary blobs from the [proprietary-vendor-motorola repo](, breakfast osprey, make -j8...
After about 15 minutes it [tells me it failed]( Apparently this is a known issue, caused by certificate issues on the Cyanogenmod maven repo. Okay, great. In the #cyanogenmod-dev topic on Freenode it has a [link to a workaround]( Righto, should be easy to just apply this patch, right?
Wrong. `repopick -f 174025` couldn't figure out where it was meant to put the files. Apparently it should work if you're in ~/android/system, but it sure as hell didn't. At least the solution was simple.
wget --no-check-certificate
##### Memory fun.
About 20 minutes into another build, I opened htop to check usage, mainly because I was bored. I was under the impression I'd given that virtual machine 4 threads and 8GB of RAM.
I had not.
It had 4 threads and 1GB of RAM.
Among other things, this caused several builds to crash.
I am not a clever man.
##### Success!
First compile worked! Now time to customize it (and use ccache).
#### make completed successfully (01:09:10 (hh:mm:ss)) ####
-- title More site updates
-- author Izaya
-- date 2017/07/03 15:32 +1000
#### More site updates
So I finally got fed up (during a meeting) and decided to rewrite my site to be entirely static except stuff that actually needs to be a CGI script, so that's what I'm doing as I write this.
Oh, also, it's all available [here](
-- title Customizing Windows installers
-- author Izaya
-- date 2017/07/07 18:18 +1000
#### Customizing Windows installers
I felt a need to make a custom installer image of Windows 7 for my desktop. This means including the Intel USB 3 and Pro 1000 ethernet controllers. I had a lot of uh... fun... doing so.
Seems simple enough, right? Mount the iso image, add some files, burn to a DVD? Wrong. While you do need to mount or extract the ISO, you also need to:
- mount a wim image
- extract your drivers
- add your drivers to the image using dism
- unmount the wim image
- make a new ISO
- burn new ISO to the DVD
That isn't really that much, when you think about it... Provided all the tools work correctly. So I looked up a guide on how to do it, because I'm a linux guy normally, and I found [this guide on superuser]( It looked sane enough, so I installed the Windows Automated Installation Kit and went to go through the tools:
C:\Windows\System32> cd C:\Users\izaya\Documents\Windows-7-Universal-x64\sources
C:\Users\izaya\Documents\Windows-7-Universal-x64\sources> imagex /mountrw install.wim 3 c:\wim
'imagex' is not recognized as an internal or external command, operable program or batch file.
Yeah. The tool wasn't installed with the WAIK. So, as a guess, I tried to run it from system32 (because every Windows utility is installed in system32 because what's $PATH?)
C:\Users\izaya\Documents\Windows-7-Universal-x64\sources> C:\Windows\system32\imagex.exe
'C:\Windows\System32\imagex.exe' is not recognized as an internal or external command, operable program or batch file.
Yup. Not installed.
So I looked it up to find that ImageX had been discontinued in favor of dism.exe.
So I look up the docs for dism and found the syntax:
C:\Users\izaya\Documents\Windows-7-Universal-x64\sources> dism /mount-wim /wimfile:install.wim /index:3 /mountdir:C:\wim
Deployment Image Servicing and Management tool
Version 6.1.7600.16385
Error: 87
The mount-wim option is unknown.
For more information, refer to the help.
... Okay, maybe the dism documentation only applies for Windows 10? I'll check the docs in the WAIK installer...
Dism /Mount-Wim /WimFile:C:\test\images\MyImage.wim /index:1 /MountDir:C:\test\offline
That's fine. The dism tool is just wrong. I'll reinstall the WAIK.
Nope. So I rebooted. `dism /mount-wim` worked. Great. Just needed a reboot. Return to the right dir rather than system32...
C:\Users\izaya\Documents\Windows-7-Universal-x64\sources> dism /mount-wim /wimfile:install.wim /index:3 /mountdir:C:\wim
Deployment Image Servicing and Management tool
Version 6.1.7600.16385
Error: 87
The mount-wim option is unknown.
For more information, refer to the help.
Suffice to say that I screwed around for a while until I realised the difference is that one was run from . in system32, so specifying `C:\Windows\System32\dism.exe` made it work normally.
Now I understand why people complain about the Windows PATH variable being stupid.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment