Category Archives: Linux

Re-installation of Linux, The Fuckery of Windows 10 & Microsoft Licensing

Notice: TLDR is at the very bottom.

Notice: This post may damage sensitive ears. At points it may be vulgar.

Notice: If you want to get to just the Linux parts, scroll down to the “Patience and Linux Saves The Day” headline.

The Beginning of Horror

First a few positives for Windows 10. It runs a Bash system thingy on it now, that’s pretty cool. It loads much faster than Windows 7 (and Vista, LULz). It still plays and supports basically all the games first. It has active tiles, but I guess that’s an arguable positive.

Windows 10 isn’t that horrifyingly bad, it seems, at first glance. But it requires a bunch of unnecessary work to re-map in your brain how it works in relation to the web, to bash, to Linux and the whole *nix POSIX world. You might say, but why does that even matter? Well, it matters because we’re in a web world, which is at it’s core a POSIX world of Linux and at worst MacOS, but it sure as hell isn’t a Windows world anymore. That’s just what consumers get that are powerless to do anything else about the fact they’re generally always going to be stuck with a purchase between Windows Device and Windows Device.

Now combine that with the fact in the last ~8-10 years almost every major change in the industry through the advent of a new technology, new platform, or otherwise has been released for several years on Linux or MacOS before it even attempts to come to Windows. Docker is a prime example, and it’s arguable that it still doesn’t really work on Windows. That’s the starting point of the horror for me.

The First Mistake of Mine and Microsoft’s

The real horror however started with these next few facts. I was pondering keeping Windows 10 on the machine to play games, so I got a key to update Windows 10 from whatever it is to “Professional” so that I could use Docker and Hyper-V. Because Docker doesn’t really run natively on Windows it need Hyper-V to be able to do anything. I “purchased” an upgrade from the Windows Store to Professional so that I could work with Docker and Hyper-V. It went through a process and all seemed well.

The Second Mistake

With Windows 10 upgraded, I also thought it’d be great to have a completely clean install. Windows 10 on this machine had all sorts of cruft on it. Trash games and other junk, I didn’t even realize at this time it was supposed to be the clean version from the Microsoft store. But being that it had so much cruft and other unknown settings, drivers, and configuration mess setup I figured I’d format the drive and reload. To do this I went out and downloaded a Windows 10 image. I assumed wrongly that it would give me the version pertinent to whatever the machine has on it, in this case Professional. It gave me “Enterprise” for whatever reason. This was the second mistake.

I then formatted the drive and reloaded Windows 10. I commenced to think everything was fine and dandy, you see, in the docs it says the machine should have the key bound to the hardware. Which I now know is utter bullshit, or simply software that just doesn’t work. I should have known better than to trust this stuff. But I made a mistake, I did, and now I was going to pay for it.

After re-installing Creative Cloud from Adobe, all my JetBrains software, and tons of other things I noticed a whole host of annoyances. Like the fact that the software cruft was still everywhere. I didn’t want this garbage shit, what gives. This was supposed to be a clean install. I kept digging about and installing things. I got OBS configured again specifically for Windows 10, because ya see, the folders still disagree on “\” vs “/” and Windows attaches every storage medium to an anchor letter. So all the sources were broken, and the list goes on. I spent hours upon hours getting Windows 10 setup under the notion I’d be able to use it.

Then it happened. Windows reports that it is not activated. So I began the process of activated, I click on updates and such and clicked try again. I went through the loops of help documentation. Nothing was happening. After trying every loop in the help docs that Microsoft provides I was getting frustrated. Then I noticed what the fatal issue was. I somehow now had “Enterprise” loaded and a key for “Professional”. I didn’t know, being what I suspect is a mere “consumer” now, how to actually choose which version of Windows to download. I had no MSDN, didn’t really need or want one, I thought. I also didn’t want to call in any favors because I wouldn’t want others to have to do that. Whenever I show or teach, or record things, I want to be able to tell people exactly what I’m using and why. Not that I “got the hookup” from inside Microsoft.

I continued, at this point, over 24 hours into the loading, setup, and configuration of this machine and I realize that I don’t even actually have a key, the fucking Microsoft site didn’t save the damned key, and I’m fighting with licensing to recover the OS and make sure that I can use it ongoing. This vain hope of using Windows, of catering and shaping much of my workflow around Windows just so that I could have it for games came from the initially reported (from Dell support itself) that Linux just simply wouldn’t work on the XPS 15 after I had spent 2 hours flailing around trying to install Ubuntu Linux on the machine. For reference, here’s the basic process I went through to get Linux on, but it appeared to fail by freezing up, throwing a bunch of kernel panics, and other miscellaneous nonsense. Either way I had given up and thought Windows 10 would be easier and had invested the time in it to get going.

I even recorded this effort, which is moderately useful and has some good bits of information. But mostly just the installation failure and freeze ups.  😦

It was now the end of the weekend, I’d sunk all my time in this, and Windows 10 was now in the late evening of Sunday telling me I didn’t have a legit copy of Windows. I was furious, enraged, and thought I now had a $2k+ dollar brick. I couldn’t get a legit copy of Windows without going some secret back door deal, shelling out even more money for a full copy of Windows, or so I thought. I felt screwed, shorted, and simply fucked over by Microsoft and their misleading notions of how their own software works around Windows. Honestly though, it wasn’t the first time, and I hadn’t felt this enraged with computers and software since the last time – almost a decade ago – when I used Windows and wrote primarily in Visual Studio (not Visual Studio Code).

End State Condition 1: Windows 10 loaded and not activated.

giphy

End State Condition 2: The wrong version is installed, Enterprise, instead of Professional. Based on the download from the automated consumer download option from Microsoft.

giphy (3)

End State Condition 3: I was now stuck in a support loop with the docs. No option led to a resolution.

giphy (1)

End State Condition 4: There was no contact information or way to submit a ticket without paying more money. Consumer support failure.

giphy (2)

Conclusion: I wasn’t even supposed to be here today.

wasntevensupposedtobe

I was done, even if the laptop became a very expensive paper weight I was done, screw it.

The Light At the End of the Tunnel Shines!

So I had a beer (huge shout out to North Coast Brewing, Old Rasputin ROCKS!) and settled myself down into a stupor. Kind of a technology depression I’d fallen into for this Windows garbage again. I knew better I told myself over and over again, “I knew better“! At some point about halfway through this wonderful beer, I had another thought, “I do know better and there’s obviously a way to get Linux installed on this machine!” Seriously, I’ve fought harder installations than this! I’d tried installing Red Hat 3.2 back in the day and was successful! Ok, I’m going to calmly pick up this Mac here and start researching. I started finding lots of material about how the 9750 XPS 15 basically is plagued with poor driver support for Linux, but then with a few tweaks of keywords and Google-fu coming into play, I hit a few winners! That’s when I started to climb out of this pit of despair and tweeted this.

 

 

 

I thought, even if it takes until 4am no better way for success after this complete debacle with Windows 10 then to just say I’m going to live tweet my efforts via all the hacks and tweaks on websites I’d just found right! Right. But alas, I did, and into the installation I went!

Patience and Linux Saves The Day

With the USB Stick loaded (same as I had done before in the video posted above in which the installation failed) I began. First step forward was to reboot and get into the BIOS (v1.7.0) and turn AHCI mode on under SATA options. I’m honestly not even sure why RAID On was set since there isn’t multiple drives, what even is this black magic in modern BIOS’s I do not know.

2

I booted using the F12 key for the boot options menu of the BIOS.

1

This process, because of some oddity in the Dell keyboard it’s easier to just press a bunch instead of holding down F12. I show an example in this short video in the tweet below, then selecting the right boot option once at the boot screen.

 

 

That gets us to the boot and install Linux screen. Did I mention Ubuntu looks crazy nice on this 4K screen? No? Well it does. Real glossy!

3

This is where things are kind of tricky. I need to “Try Ubuntu without installing” screen and it flashes by too fast. So a lot of fast button pushing ensues. Click, click, click, click, click, click. Like this, then hit “shift” real fast, then hit “e”! It’s like those console game secret codes practically!! 😬  Shown in the tweets below, the button pressing maneuver and the subsequent screen where the next setting needs to be made.

 

Set nomodeset after the words quiet splash.

4

Next up save that and continue. Then press F10 and the installation screen will appear. Start the installation by clicking that icon up there in the left hand corner that reads “Install Ubuntu 18.04.1 LTS”! Continue through the steps choosing the standard things you’d want. Connect to your WiFi. Then on Updates and Other Software do NOT choose the 3rd part option.

5

Then boot into partially busted Ubuntu. A few more steps tho. sudo gedit /etc/default/grub and set nouveau.modeset=0 and then sudo shutdown -r now. Then sudo apt install mokutil.

6

Then it’s the tricky Nvidia Drivers. Gotta use the “Software & Updates” option. Don’t use the ppa, so goes the word. Select the “Using NVIDIA driver…” and Apply Changes. Reboot after. 😑

 

 

 

 

 

 

 

Then this will probably happen. 👩🏻‍🔧 So make a password and all, then reboot. Note, it’ll show on this screen in plain text. This isn’t 100% sure to happen at this point, based on some things I read, but it likely should happen. I’d like to hear from you if you’re going through this and it doesn’t popup at this point.

9

Then after you enter a password. Do enter a password. Don’t forget it either, even though you’ll rarely enter this one. Then this on reboot will happen, continue.

11

Then on reboot check the driver. Check the driver via command line with nvidea-smi. If it failed, do another full sudo apt-get update.

12

Then go and unselect the driver, apply, and select the driver again and apply.

13

Then I did some battery tune ups too, even though I’ve also read they’re all there already in the latest Ubuntu. Thus, it doesn’t hurt to run these to make sure.

sudo apt update<span id="mce_SELREST_start" style="overflow:hidden;line-height:0;"></span>
sudo apt install tlp tlp-rdw powertop
sudo tlp start
sudo powertop --auto-tune sudo reboot

That was it. I rebooted again, just to make sure all the services were restarted, no kernel panics, no machine freak outs and all that jazz. I then immediately went into installing all the things I wanted on the machine. But more on that later, for now, success had been achieved and the horrors of a $2k+ dollar paperweight had been avoided!

TLDR;

If you’re a coder, use Linux for the sake of us all. Throw Windows 10 in the trash bin, Microsoft already has too, note that everything is going CLI first, container based, and cloud focused Azure WHICH IS AWESOME, KEEP DOING IT MICROSOFT!! Using Windows 10 and attempting to get/keep/verify it upon an error or two is an insult to consumers of the system. It really does seem like the OS is kept around out of pity or something. Final word, Dell and all y’all gotta get that hardware support for Linux going, otherwise what are you even doing as a hardware manufacturer. Push that stuff out there, make it a priority. Dell was one of the preeminent machine options and a king among those that survived the 90’s, a company with amazing support, and a solid coder’s platform. The company is still largely there, but Linux should be an even higher priority. Take another 10-20 people and unleash and enable them on that problem space! Then we all win.

TLDR; Notice:

It also seems, just in case, always have at least one absolutely wonderful, premium, and spectacularly tasty beer handy to come out of the horrors of technology depression and calm down. It helps. I suppose one could alternate the “beer” for you’re preferred calming beverage like tea or such though.

I wish all vastly better luck in all their installations and interactions with their devices than I had, but rest assured, this XPS 15 is now a beast and beautifully runs Linux (Ubuntu so far)!

On that note, happy thrashing code all, and best of luck and skill in your endeavors!

Virtual Box Issue “Kernel driver not installed (rc=-1908)”

Alright, nothing like multi-OS environments so you can prepare for the maximum number of issues that might come up. My recent issue is re-opening some virtual machines, originally created on Windows 10, and now with intent to use them on Linux. When trying to open these existing virtual machines I’ve gotten the following error:

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

‘modprobe vboxdrv’

as root.

where: sublibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) – The support driver is not installed. On linux, open returned ENOENT.

vbox-error1908

Error Screenshot on Ubuntu Linux

Upon researching I found this could occur on multiple operating systems really, and have included the fixes for the various platforms. First however, let’s talk about the Linux fix.

Linux

For this particular situation I tried the command given in the dialog modprobe vboxdrv to see if that would fix it. But no go. I got some additional errors that seemed nonsensical.

arg

At this point I dug into the search engine. The first post I found seemed to make sense. I tried the commands.

sudo apt-get install build-essential module-assistant
sudo m-a prepare

step1.png

That went well, so on to the next step of building the virtualbox kernel driver.

sudo /etc/init.d/vboxdrv setup

That gave me “sudo: /etc/init.d/vboxdrv: command not found“. So I did a find for the file.

sudo find / -name "vboxdrv"

The results pointed out that my install of Virtual Box, done via the Ubuntu App Store, was version 5.2.8. This is clearly not going to work out well because the latest version is 6.0.4 right now. Next I uninstalled this old version via the Ubuntu App Store Application.

step2.png

Next I navigated back out the Virtual Box Download page. There I downloaded the latest version and installed it via the downloadable Ubuntu *.deb file.

This installs Virtual Box through the Ubuntu App Store application but sets up the more up to date repository to get the installation from.

step3.png

Ok, so all this at this point I ran VirtualBox after the installation, it installed according to the standard directories this time but still didn’t work. What the hell, I’ve no idea. I did another search and found Øyvind Stegard’s blog entry on fixing the “VirtualBox + Secure Boot = Fail“. He states at the start of the blog entry,

“The problem is the requirement that all kernel modules must be signed by a key trusted by the UEFI system, otherwise loading will fail. Ubuntu does not sign the third party vbox* kernel modules, but rather gives the user the option to disable Secure Boot upon installation of the virtualbox package.”

Stegard then adds two very important links with pertinent information about this issue, I’ve reposted here too:

After going through Øyvind‘s steps, I finally got the previously specified command from above.

sudo /etc/init.d/vboxdrv setup

Now VirtualBox started up just fine. Finally. Ugh! But hey, in the process I now understand a little bit more about secure boot, current BIOS’s, and related hardware concerns. Not that I had set out or wanted to deal with this right now, but boom, it’s done!

Alright, but if you fall into this with MacOS, it’s a slightly different story. Here’s some fixes around that.

MacOS

Ok, I started writing up and searching as I wrote, and instead of continuing to write it looks like this blog entry popped up with the exact error I’d gotten in the past (the reason I wanted to included MacOS for future ref). If you’ve gotten this error, check out Xilin Sun‘s post Solving VirtualBox “Solving VirtualBox “kernel driver not installed (rc=-1908)” Error on macOS“.

Fixing Windows 10 Drives for Linux Mounting

I mentioned, since I’d run into this problem, a while back in my post “Oh, exFAT Doesn’t Work on Linux” which then includes a fix. Here’s a slightly more updated fix for the same and another fix for mounting just the Windows 10 partition if you have a Windows 10 System Drive (i.e. the drive with the OS on it). First, the exFAT install can simply be done with the following, no need to go get it with git via a clone.

sudo apt-get install exfat-fuse exfat-utils

The other trick is to get a Windows 10 System Drive mounted. To do that, open up the disks application and click the gears on the drive. Then make the following settings by clicking off for “User Session Defaults”. Then you can set “Mount at system startup” and add “remove_hiberfile” to the end of the command parameters as shown. Now the drive can be mounted, just click the mount button and you should be set.

drive-setup-for-mount-windows-10-drive.png

Windows 10’s Path of Destruction and Garbage Support for Linux from Dell

At this point, I’d say do not buy a Dell XPS 15 unless you are only going to use Windows 10 apps and such on the machine. Linux runs like garbage on the machine. The generic drivers that allow one to sort of load Linux onto the machine work mediocre at best, with lot’s of crashes, kernel panics, and related wrecks within seconds and minutes (if you get that far) after starting the machine with Linux. So that the situation there.

Docker, Hyper-V, and VirtualBox Conflict

As I’ve used Windows 10 I keep hitting hard roadblocks on getting things done. After years of MacOS and Linux usage it’s kind of an ongoing, slow motion, insulting train wreck how monopolistic a lot of their applications are still built to run. For example, the latest application that I’ve tried to use that is effectively disabled is Virtual Box. Upon further research I realized I can’t used Virtual Box if I have Hyper-V installed. But that means if I want to use the latest and greatest Docker software then I either have to enable Hyper-V and use Docker or disable Docker and Hyper-V and use Virtual Box. Which means I could go back a version or two of this and that and use Docker-machine with Virtual Box, but, seriously, that’s ridiculous.

The way, from what I understand so far, is that they’ve built the operation of Hyper-V to work on Windows 10 in a way that it effectively prevents Virtual Box, and I suppose VMWare, from actually operating. So one has to go and disable Hyper-V in order to be able to run Virtual Box.

Enabling / Disabling VirtualBox and Hyper-V

Ok, here’s one way to do this with Powershell. Open up Powershell with the “Run As Administrator” option. You’ll have to do that by clicking the start menu (or whatever it’s called these days) and typing “power” which brings up the Powershell application icon. Right click on it and select “Run as Administrator”.

dism_upd

hyper-vHere’s the dialog where one can disable Hyper-V to run VirtualBox too. One this is run, or disabled, Windows 10 will likely want you to restart your computer. You’ll actually need to do this too, because VirtualBox will still die out without a clean OS launch for the base underlying operating system.

Once the restart is complete however, VirtualBox should start up and run virtual machines just fine. Emphasis as usual for Windows on the keyword of should.

Virtual Machine SITREP Resolved Poorly

At this point I’m moderately ok with this solution. It just means that I need to re-create all of my images in Hyper-V and nuke VirtualBox though. I’m really indifferent on which one I need to use, but would have liked to have RTFM’ed the docs before so I had realized upgrading to Windows 10 and using Hyper-V for Docker would kill off my VirtualBox images that I’ve been using for months. Oh well, onward!

The other thing that I find horrifying about this though, is as I’ve learned why and how Hyper-V disabled VirtualBox from running side by side, it seems like 90’s era monopolistic Microsoft building something in a way that disables competition. Ok, so I know it isn’t really because of that, but it’s close enough that it just seem dirty, nasty, and all around kind of disingenuous on Microsoft’s part. Especially considering they neglected Hyper-V for so many years and of course now are all like, “hey, Hyper-V is the way the future, nobody uses it outside of the Windows camp, but it’s the way of the future so bow down and use it Windows users!!” But whatever, I’m at least back in business to get some things done and get some development images put together in Hyper-V.

Hyper-V plus Docker for Windows 10

At this point, since Linux has such poor support on the Dell XPS 15 I’m just sticking with Windows 10 and going the Hyper-V + Docker + Virtual Machines path for what I’m working on. More on this soon, and I’ll be mentioning various things on Twitch soon too. When I get back around to getting the Linux + XPS 15 situation sorted out and tried out again I’ll be sure to blog that too!

 

 

‘bash’ A.K.A. The Solution for Everything – Bourne Shell as per v7 Unix to Today’s

In 1979 Unix v7 started being distributed with the original Bourne Shell. Simply, it’s a program that sits at /bin/sh and runs in the terminal. You may ask, “what’s the difference between a shell and the terminal?” Let’s cover that right now, because it’s something that routinely isn’t common knowledge, but it really ought to be as it sets the basis for understanding a lot of what is going on in Unix based systems (that includes almost every practical system on a PC, Server, in the cloud, on your phones, and more. Probably easiest to explain it simply as everything that isn’t the Microsoft Windows OS)

A Shell and the Terminal

Terminal – A terminal is the text input and output environment on the system.

Shell – This is the command line interpreter that is run at the terminal.

Another point of context, is that a terminal, shell, and the word console are all used in various ways and sometimes interchangeably. However, these words do not mean the same thing at all. They are distinct individual parts of the system. For example, console, which is used in a strangely disingenuous way all over Microsoft phrasing, is the physical terminal of the system, which is where the system terminal, i.e. the thing I’ve described above, actually runs in so that we can type and interface with it as humans.

Albeit, as English does, these definitions aren’t always taken as the exact, appropriate, and pedantically correct definitions today. For example, many at Microsoft argue that the console is just the terminal, that the terminal is the console. Sure, ok, that’s fine I can still follow along in the conversation, and this adds context, for when someone steps out of line and uses the more historically specific definition in context of a conversation.

Alright, that’s all groovy, so now we can get back to just talking about the shell, all the power it gives the Unix/Linux/POSIX System user, and touch on the terminal or console as we need to with full context of what these things actually are!

Gnu-bash-logo.svgIntroducing Bash!

Alright, with that little bit of context around Bourne Shell, let’s talk about what we’ve actually got today running as our shell in our terminal on our console on the computers we work with! The Bourne Shell, years later had a replacement written for it by Brian Fox. He released it in 1989 and over the years it became a kind of defacto replacement of Bourne Shell. The term ‘BASH’ stands for Bourne Again SHell.

440px-Bash_screenshotThe Bash command syntax is a superset of the Bourne Shell syntax. It provides a wide range of commands that includes ideas drawn from the Korn shell (ksh) and the C shell (csh) such as command line editing, command history, the directory stack, the $RANDOM and $PPID variables, and POSIX command substitution syntax. If many of those things make you think, “WTF are these variables and such?” have no worries, I’ll get to em’ soon enough in this series!

But with that, this is the beginning of many short entries on tips, tricks, tutorials, syntax, history, and context of bash so until next time, cheers!

References & Collected Materials

Oh, exFAT Doesn’t Work on Linux

But to the rescue comes the search engine. I found some material on the matter and, as I’ve learned frequently, don’t count out Linux when it comes to support of nearly everything on Earth. Sure enough, there’s support for exFAT (really, why wouldn’t there be?)

Check out this repo: https://github.com/relan/exfat

There’s of course the git clone and make and make install path or there’s also the apt install path.

git clone https://github.com/relan/exfat.git
cd exfat
autoreconf --install
./configure
make

Then make install.

make install

Of course, as with things on Linux, no reboot needed just use it now to mount a drive.

mount.exfat-fuse /dev/spec /mnt/exfat

To note, if you’re using Ubuntu 18.04 the support will just be available now so re-click on the attached drive or memory device you’ve just attached and it will now appear. Pretty sweet. If you want to use apt just run this command.

apt install exfat-fuse

That’s it. Now you’ve

Ubuntu

Starting an Ubuntu Dev Tools List

I’ve recently setup a completely clean virtual machine for doing web, system, and related development on Ubuntu. Here’s the shortlist of what I’ve installed after a default installation. The ongoing list of tools and related items I have installed on my Linux dev box I’m keeping here, and it will be kept as a living doc, so I’ll change it as I add new tools, apps and related changes. So lemme know what I ought to add to that list and I’ll add it to my docs page here. Here’s what I have so far…

Other To-dos

  • Always run sudo apt-get update once the system is installed. It never hurts to have the latest updates.
  • I always install Chrome as my first app. Sometimes the Ubuntu Software Center flakes out on this, but just try again and it’ll work. I use the 64-bit Chrome btw, as I’ve noticed that the 32-bit often flakes out when attempting installation on my virtual machines. Your mileage may vary.

What this enables…

At this point I can launch into about any language; Java, JavaScript, and a few others with a minimal amount of headache. Since it’s a Linux instance it gives me a full range of Linuxy things at my disposal.


Default Java Installation

  1. Run a ‘sudo apt-get update’.
  2. To install the default Java JRE and the JDK run the following commands.
    sudo apt-get install default-jre
    sudo apt-get install default-jdk


Oracle Java v8 Installation

  1. sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java8-installer


WebStorm Installation

  1. I download the application zip from JetBrains and then run
    tar xfz WebStorm-*.tar.gz
  2. Next I always move the unzipped content to the directory in which I’d like to have the application stored. It’s good practice to not keep things in the download directory, just sayin’. Generally I put these in my usr/bin directory.
    mv /downloads/WebStorm-* your/desired/spot
  3. Now at your terminal, navigate to the path where the application is stored and run the WebStorm.sh executable.
    ./bin/webstorm.sh
  4. To add WebStorm to the Quicklaunch, just right click on the icon and select to Lock to Launcher.


IDEA IntelliJ Installation

  1. Follow all the steps listed under WebStorm, it’s the exact same process.


Sublime 3

  1. Go to download the latest v3.
  2. Run the package and it should launch the actual Ubuntu installer, setup Sublime for bash use and get it installed.

(NOTE UPDATED 1/18/2016 > The installer doesn’t seem to get it installed, so I went with this link http://olivierlacan.com/posts/launch-sublime-text-3-from-the-command-line/ which has a good solution.)