Lark: Gentoo in the Windows Subsystem for Linux


Microsoft’s recent introduction of the Subsystem for Linux (awkwardly called ‘Bash on Ubuntu on Windows’) had me intrigued from the day of its announcement.

Though it’s a transparent attempt to keep developers from leaving their Windows environments behind in a world now focused on development for UNIX-like platforms, and though I’m not particularly interested in supporting such an agenda per-se, I find the notion of a new NT kernel subsystem capable of handling Linux syscalls exotic, and so I had to subject it to some stress testing.

Test 1: Gentoo Stage3

The first test was simply to see whether or not I could unpack a Gentoo stage3 tarball and replace the Ubuntu rootfs with it. This took the following form:

  1. Download the latest stage3-nomultilib tarball within the default Ubuntu environment. I used wget to do this, and I was in root’s home directory after a ‘sudo su -‘ so that proper filesystem attributes and permissions would be applied to the extracted files when I performed the next step:
  2. Unpack it into a directory I named rootfs_gentoo
  3. Exit all open ‘Bash on Ubuntu on Windows’ shells
  4. Using Windows Explorer, cut the rootfs_gentoo folder (as mentioned in 1. this was in root’s home directory – in the Windows environment, this is located at \Users\<me>\AppData\Local\lxss\root) and paste it in \Users\<me>\AppData\Local\lxss\
  5. Rename the existing ‘rootfs’ containing the Ubuntu install downloaded by Microsoft
  6. Rename my new ‘rootfs_gentoo’ folder to ‘rootfs’

I also had to make sure the Linux subsystem opened a shell as root, as this new Gentoo environment had no users created just yet. This was accomplished with:

C:\ > lxrun /setdefaultuser root

In an elevated command prompt window.

So far so good. I created a user for myself, added it to wheel, set a password, and ran the same command above to set the Linux environment to use this new user.

I also needed to manually update /etc/resolv.conf in order to perform DNS lookups.

Test 2: Rebuild @world

I wanted to quickly strain WSL’s capabilities. I made sure /etc/portage/make.conf was configured so that ~amd64 packages would be installed, and then:

# emerge gcc -u 

# gcc-config x86_64-pc-linux-gnu-6.3.0

# . /etc/profile

# emerge world -eav --keep-going

Impressively, around 200 packages were rebuilt from source using the latest GCC (elucidation for those unfamiliar with Gentoo) without an issue. Things are getting serious.

In an upcoming post I’ll discuss how I built on this basis to launch Gentoo’s OpenRC init system, and use that to run services like SSHD.

Privacy Helper for Windows 10

During my evaluation of Windows 10 I’ve cobbled together a script that disables most known anti-privacy features in the new system. It also removes the unnecessarily installed default Modern apps. The script was designed with a professional environment in mind, but applies equally well to home users, and most settings will apply to all editions of Windows, not just Pro/Enterprise

It’s alarming but not surprising that we’ve gotten to this point – Windows has always served the agenda of its maker before that of its user. This edition ships with a significant set of end user facing UI improvements, but its goals are not different. They simply take advantage of the current state of the art and the current anti-privacy climate.

The script can’t be considered complete as not all anti-privacy features are documented by Microsoft, and future updates will doubtless add more.  list of changes – comment each section of the script out if one of these is undesired:

  • Stops / Disables intrusive diagnostics services
  • Removes diagnostic scheduled tasks
  • Removes OneDrive
  • Removes access to the Windows Store
  • Removes access to Cortana
  • Block connection to Microsoft Accounts
  • Disables WiFi Sense (what’s this?)
  • Disables Windows Update peer to peer (what’s this?)
  • Requires Ctrl-Alt-Del to log on
  • Blocks “Add features to Windows 10”
  • Removes unnecessary apps (they can be reinstalled from the Store if desired, assuming you’ve left it enabled)

Standalone – an extension for Mozilla Firefox

Found this little gem today, thought I’d mention it on my corner of the web.

Creates site specific apps, like Prism used to do – for Chrome users, this is the equivalent of “Create Application Shortcuts” which I find indispensable personally.

The strange thing is, it’s been around since 2013. How did I miss it for that long? I’ve been looking everywhere for something like this.

Thoughts on Docker

I like the concept of Docker and containerization in general, but I have some pretty fundamental concerns:

Thought experiments:

  • How many deployed docker images were torn down and redeployed upon the revelation of heartbleed? Of shellshock? In practice, not in theory.
  • How many Docker images are regularly destroyed and redeployed for the purpose of updating their userlands? Again, in reality, even with the most agile orchestration.
  • How many Docker images are actually deployed with a minimal attack surface, that being only the executables and libraries they need, rather than entire userlands?
  • How many Docker images are given to IT/Ops as single filesystem images rather than multi-gigabyte change layers, contributing heavily to wasted storage space?
  • How can Docker images composed of random people’s aging Linux userlands ever be taken seriously in an environment that needs to be kept certified, stable and secure?
  • What is the benefit of Docker given the above, when LXC and Libvirt-LXC performs the same containerization and provides Ops with much greater flexibility in terms of orchestration and change management, and has for years?
  • Dan Walsh of Red Hat has much to say about the security of Docker and LXC containers – the most important statement he makes is that “containers don’t contain” – containers provide no security, they are only useful for the purpose of deploying applications in a manageable way. Given this, is it responsible to use containers based on full Linux filesystems? If you do, you’d better be ready to tear down your ENTIRE stack each and every time a major vulnerability comes to light.

Points worth pondering – these affect the future direction of container technology and shed light on the implications.

Pew Research Report – Net Threats

“There are too many institutional players interested in restricting, controlling, and directing ‘ordinary’ people’s ability to make, access, and share knowledge and creative works online — intellectual property rights holders, law enforcement and security agencies, religious and cultural censors, political movements and parties, etc. For a long time I’ve felt that the utopianism, libertarianism, and sheer technological skill of both professional and amateur programmers and engineers would remain the strongest counterbalance to these restrictive institutional pressures, but I’m increasingly unsure as the technologists themselves and their skills are being increasingly restricted, marginalized, and even criminalized.”

In A Battle For Web Traffic, Bad Bots Are Going After Grandma : All Tech Considered : NPR

If bad bots were left to their own devices, bad taste would dominate the Web. But, even worse, Kaminsky worries that this kind of advertising fraud is undermining the economics of the Web.

Though people “tend not to like advertisers, advertisers have paid for a network that allows greater interpersonal communication than any other time in history. Who paid for all this free service? They did,” he says.

Kaminsky’s firm works with advertises to fight this problem. He worries that advertisers will go back to the TV or other outlets, which are better protected against fraud.

I honestly wish they would. Such a move would radically change the current state of affairs online for the better. Profit seeking is not a solid modus operandi for building a communication / educational network that can truly benefit people.

Nearly one-third of Americans aren’t ready for the next generation of technology | Science/AAAS

A new survey suggests that the digital divide has been replaced by a gap in digital readiness. It found that nearly 30% of Americans either aren’t digitally literate or don’t trust the Internet. That subgroup tended to be less educated, poorer, and older than the average American.

I would content that the greatest level of technical literacy inspires by far the greatest mistrust in the Internet. Held together by little bits of string and the lies marketing departments try to tell everyone, those with more age / experience are wise to think twice about depending on the Internet to manage their personal lives.

Doing so is a fools errand that younger people haven’t thought through, as is the case with so many other things in their lives.

Wozniak criticizes cloud dependence in light of NSA | CNET

Apple co-founder Steve Wozniak says he has sympathy for companies at odds with the NSA and its surveillance tactics, but that their own dependence on server farms is part of the problem.

“I think most companies, just like Apple, start out young and idealistic,” Wozniak said at the Apps World North America convention here. “But now all these companies are going to the cloud. And with the cloud you don’t have any control.”

Ain’t that the god damn truth.

Open Automotive Alliance

If automakers abandon system updates as quickly as cellphone manufacturers do, this will mean vast numbers of cars on the road with always-connected built-in computers with an even larger number of remote execution vulnerabilities than currently exist.

It could also spell trouble down the road for car owners in a new way. As computing features such as navigation and automatic pilot begin to take over the driving experience, will forced obsolescence become the norm? Liability and cost of ownership could become enormous.

Encrypt the Web Report: Who’s Doing What | Electronic Frontier Foundation

We’ve asked the companies in our Who Has Your Back Program what they are doing to bolster encryption in light of the NSA’s unlawful surveillance of your communications. We’re pleased to see that four companies—Dropbox, Google, SpiderOak and—are implementing five out of five of our best practices for encryption.

Note these encryption methods relate to data in transit. Data at rest is still easily obtainable from the four providers on this chart who got perfect scores.

Your data will never be secure if you give it to other people. This is a basic concept.