Introducing Windows Subsystem for Linux WSL Overview #blogtober

Introducing Windows Subsystem for Linux WSL Overview #blogtober

server storage I/O data infrastructure trends

Updated 1/21/2018

Introducing Windows Subsystem for Linux WSL and Overview. Microsoft has been increasing their support of Linux across Azure public cloud, Hyper-V and Linux Integration Services (LIS) and Windows platforms including Windows Subsystem for Linux (WSL) as well as Server along with Docker support.

WSL installed with Ubuntu on Windows 10

WSL with Ubuntu installed and open in a window on one of my Windows 10 systems.

WSL is not a virtual machine (VM) running on Windows or Hyper-V, rather it is a subsystem that coexists next to win32 (read more about how it works and features, enhancements here). Once installed, WSL enables use of Linux bash shell along with familiar tools (find, grep, sed, awk, rsync among others) as well as services such as ssh, MySQL among others.

What this all means is that if you work with both Windows and Linux, you can do so on the same desktop, laptop, server or system using your preferred commands. For example in one window you can be using Powershell or traditional Windows commands and tools, while in another window working with grep, find and other tools eliminating the need to install things such as wingrep among others.

Installing WSL

Depending on which release of Windows desktop or server you are running, there are a couple of different install paths. Since my Windows 10 is the most recent release (e.g. 1709) I was able to simply go to the Microsoft Windows Store via desktop, search for Windows Linux, select the distribution, install and launch. Microsoft has some useful information for installing WSL on different Windows version here, as well as for Windows Servers here.

Get WSL from Windows Store

Get WSL from Windows Store or more information and options here.

Microsoft WSL install

Click on Get the app

Select which Linux for WSL to install

Select desired WSL distribution

SUSE linux for WSL

Lests select SUSE as I already have Ubuntu installed (I have both)

WSL installing SUSE

SUSE WSL in the process of downloading. Note SUSE needs an access code (free) that you get from https://www.suse.com/subscriptions/sles/developer/ while waiting for the download and install is a good time to get that code.

launching WSL on Windows 10

Launching WSL with SUSE, you will be prompted to enter the code mentioned above, if you do not have a code, get it here from SUSE.

completing install of WSL

The WSL installation is very straight forward, enter the SUSE code (Ubuntu did not need a code). Note the Ubuntu and SUSE WSL task bar icons circled bottom center.

Ubuntu and SUSE WSL on Windows 10

Provide a username for accessing the WSL bash shell along with password, confirm how root and sudo to be applied and that is it. Serious, the install for WSL at least with Windows 10 1709 is that fast and easy. Note in the above image, I have WSL with Ubuntu open in a window on the left, WSL with SUSE on the right, and their taskbar icons bottom center.

Windows WSL install error 0x8007007e

Enable Windows Subsystem for Linux Feature on Windows

If you get the above WSL error message 0x8007007e when installing WSL Ubuntu, SUSE or other shell distro, make sure to enable the Windows WSL feature if not already installed.

Windows WSL install error fix

One option is to install additional Windows features via settings or control panel. For example, Control panel -> Programs and features -> Turn Windows features on or off -> Check the box for Windows Subsystem for Linux

Another option is to install Windows subsystem feature via Powershell for example.

enable-windowsoptionalfeature -online  -featurename microsoft-windows-subsystem-linux

Using WSL

Once you have WSL installed, try something simple such as view your present directory:

pwd

Then look at the Windows C: drive location

ls /mnt/c -al

In case you did not notice the above, you can use Windows files and folders from the bash shell by placing /mnt in front of the device path. Note that you need to be case-sensitive such as User vs. user or Documents vs. documents.

As a further example, I needed to change several .htm, .html, .php and .xml files on a Windows system whose contents had not yet changed from https://storageio.com to https://storageio.com. Instead of installing wingrep or some tools, using WSL such as with Ubuntu finding files can be done with grep such as:

grep "https://storageio.com" /mnt/c/Users/*.xml

And then making changes using find and sed such as:

find /mnt/c/Users -name \*.xml -exec sed  -i "s,https://storageio.com,https://storageio.com,g" {} \;

Note that not all Linux apps and tools can use file via /mnt in which case a solution is to create a symbolic link.

For example:

ln -s "/mnt/c/Users/Test1/Documents"  /home/Test1/Projects

Where To Learn More

Learn more about related technology, trends, tools, techniques, and tips with the following links.

Additional learning experiences along with common questions (and answers), as well as tips can be found in Software Defined Data Infrastructure Essentials book.

Software Defined Data Infrastructure Essentials Book SDDC

What This All Means

If you primarily work on (or have a preference for) Linux systems and need to do some functions from development to the administration or other activity on a Windows system, Windows Subsystem for Linux (WSL) provides a bash shell to do familiar tasks. Likewise, if you are primarily a Windows person and need to brush up on your Linux skills, WSL can help. If you need to run Linux server applications or workloads, put those into a Docker container, Hyper-V instance or Azure VM.

Overall I like WSL for what it is, a tool that eliminates the need of having to install several other tools to do common tasks, plus makes it easier to work across various Linux and Windows systems including bare metal, virtual and cloud-based. Now that you have been introduced to Windows Subsystems for Linux WSL and an overview including install as well as using, add it to your data infrastructure toolbox.

By the way, if you have not heard, its #Blogtober, check out some of the other blogs and posts occurring during October here.

Ok, nuff said, for now.

Gs

Greg Schulz – Microsoft MVP Cloud and Data Center Management, VMware vExpert 2010-2017 (vSAN and vCloud). Author of Software Defined Data Infrastructure Essentials (CRC Press), as well as Cloud and Virtual Data Storage Networking (CRC Press), The Green and Virtual Data Center (CRC Press), Resilient Storage Networks (Elsevier) and twitter @storageio. Courteous comments are welcome for consideration. First published on https://storageioblog.com any reproduction in whole, in part, with changes to content, without source attribution under title or without permission is forbidden.

All Comments, (C) and (TM) belong to their owners/posters, Other content (C) Copyright 2006-2024 Server StorageIO and UnlimitedIO. All Rights Reserved. StorageIO is a registered Trade Mark (TM) of Server StorageIO.

Securing your information assets and data, what about your storage?

Storage I/O trends

Securing your information assets and data, what about your storage?

Recently I did a piece over at the site Information Security Buzz title How Secure Is Your Data Storage? that takes a cursory look at securing your digital assets from a storage perspective. Keep in mind that data protection can mean many things to different people from various focus or technology domain perspectives. Likewise there are various threat risks to protect against and, not all of them are head-line news making events.

data protection threat risk scenarios

Protecting data and data protection

Protecting your data or data protection is a diverse topic and not exclusive to just backup/restore, business continuance (BC), disaster recovery (DR), high availability (HA), durability, archiving, privacy and compliance (PCI, Hippa, High-tech, Sarbox, etc) or security (logical [encryption, access control, identity management] and physical).

In the broader scope and context of information infrastructures and data infrastructures, think of data protection as part of or enabling protect, process, preserve and serving of information in an effective way that does not introduce complexity or compromise your digital and physical assets.

Following is an excerpt from the piece over at Information Security Buzz:

The usual belief is that information behind firewall’s and on storage attached to servers that have rights access control and find access, all is safe; hence no need to encrypt the real storage device.

There is a couple of other usual comments or statements that people make to me about encrypting storage devices that it is too difficult due to lack of good key management, and the other is that people say the encryption algorithms are no good. Both can be valid points, particular given what we are hearing with the NSA and other government activities. My usual response is a) have spare keys placed in safe trusted locations and b) do you lock the doors and windows on your home as somebody who really wants to get in probably can, hence need for multiple rings of security, however the encryption will deter the casual or more typical adversary.

Click to read more

Additional data protection topics and links

In addition to the above, also check out the following related items on the many difference faces or facets of data protection.

Various StorageIO tips and articles from different venues: Via StateTech Magazine – 5 Tips for Factoring Software into Disaster Recovery Plans and Via the StorageIO fall November 2013 news letter, Cloud and data protection perspectives.

Also via StorageIOblog: Data protection modernization, more than swapping out media and Cloud conversations: Has Nirvanix shutdown caused cloud confidence and data protection concerns? along with In the data center or information factory not everything is the same plus Securing data at rest and fast secure erase with SED’s.

Also check out BackupU (www.software.dell.com/backupU) series of webinars and Google+ hangouts that I’m involved with about modernizing and rethinking data protection. Note that while Dell is the sponsor of these events, they are also vendor and technology neutral, that’s a disclosure btw fwiw ;) ).

Closing perspective, for now…


Only you can prevent data loss as it is a shared responsibility!

Ok, nuff said (for now)

Cheers gs

Greg Schulz – Author Cloud and Virtual Data Storage Networking (CRC Press), The Green and Virtual Data Center (CRC Press) and Resilient Storage Networks (Elsevier)
twitter @storageio

All Comments, (C) and (TM) belong to their owners/posters, Other content (C) Copyright 2006-201

Enabling Bitlocker on Microsoft Windows 7 Professional 64 bit

Enabling Bitlocker on Microsoft Windows 7 Professional 64 bit
Updated 6/24/18

A while back, I added a new laptop that required Enabling Bitlocker on Microsoft Windows 7 Professional 64 bit. At that time some of my other devices run Windows 7 Ultimate 32 bit with Bitlocker security encryption enabled (since upgraded to various Windows 10 editions). However back then, I ran into a problem getting Bitlocker to work on the 64 bit version of Windows 7 Professional.

Yes I know I should not be using Windows and I also have plenty of iDevices and other Apple products lying around. Likewise to the security pros and security arm-chair quarterbacks I know I should not be using Bitlocker, instead using Truecrypt of which I have done some testing and may migrate too in the future along with self-encrypting device (SED).

However lets stay on track here ;).

Lenovo Thinkpad X1 Gen6
Image courtesy of Lenovo.com

The problem that I ran into with my then new Lenovo X1 was that it came with Windows 7 Professional 64 bit, which has a few surprises when trying to turn on Bitlocker drive encryption. Initializing and turning on the Trusted Platform Module (TPM) management was not a problem, however for those needing to figure out how to do that, check out this Microsoft TechNet piece.

The problem was as simple as not having a tab and easy way to enable Bitlocker Drive Encryption with Windows 7 Professional 64 bit. After spending some time searching around various Microsoft and other sites to figure out how to hack, patch, script and do other things that would take time (and time is money), it dawned on me. Could the solution to the problem be as simple as upgrading from the Professional version of Windows 7 bit to Windows 7 Ultimate?

Update: 6/25/18

While this post is about Windows 7, there are some new challenges with Windows 10 bit locker and removable devices including USB. These new issues are tied to Windows 10 running in BIOS instead of UEFI boot mode.

Here are some additional Windows 10 Bitlocker related resources:

  • Via Microsoft: Bitlocker Frequently Asked Questions
  • Via Microsoft: Bitlocker Overview and Requirements
  • Via Intel: Converting Windows Installation from BIOS to UEFI
  • Microsoft Windows 7 via amazon
    Windows 7 image courtesy of Amazon.com

    The answer was going to the Microsoft store (or Amazon among other venues) and for $139.21 USD (with tax) purchase the upgrade.

    Once the transaction was complete, the update was automatically and within minutes I had Bitlocker activated on the Lenovo X1 (TPM was previously initiated and turned on), a new key was protected and saved elsewhere, and the internal Samsung 830 256GB Solid State Device (SSD) initializing and encrypting. Oh, fwiw, yes the encryption of the 256GB SSD took much less time than on a comparable Hard Disk Drive (HDD) or even an HHDD (Hybrid HDD).

    Could I have saved the $139.21 and spent some time on work around? Probably, however as I did not have the time or interest to go that route, however IMHO for my situation it was a bargain.

    Sometimes spending a little money particular if you are short on or value, your time can be a bargain as opposed to if you are short on money however long on time.

    I found the same to be true when I replaced the internal HDD that came with the Lenovo X1 with a Samsung 256GB SSD in that it improved my productivity for writing and saving data. For example in the first month of use I estimate easily 2 to three minutes of time saved per day waiting on things to be written to HDDs. In other words 2 to three minutes times five days (10 to 15 minutes) times four weeks (40 to 60 minutes) starts to add up (e.g. small amounts or percentages spread over a large interval add up), more on using and justifying SSD in a different post.

    Microsoft Windows 7 Ultimate

    Samsung SSD image courtesy of Amazon.com

    If your time is not of value or you have a lot of it, then the savings may not be as valuable. On the other hand, if you are short on time or have a value on your time, you can figure out what the benefits are quite quickly (e.g. return on investment or traditional ROI).

    Where To Learn More

    Learn more about Windows, Bitlocker and related topics

    Additional learning experiences along with common questions (and answers), as well as tips can be found in Software Defined Data Infrastructure Essentials book.

    Software Defined Data Infrastructure Essentials Book SDDC

    What This All Means

    The reason I bring the topic of time and money into this discussion about Bitlocker is to make a point that there are situations where spending some time has value such as for learning, the experience, fun or simple entertainment aspect, not to mention a shortage of money. On the other hand, sometimes it is actually cheaper to spend some money to get to the solution or result as part of being productive or effective. For example, other than spending some time browsing various sites to figure out that there was an issue with Windows 7 Professional and Bitlocker, time that was educational and interesting, the money spent on the simple upgrade was worth it in my situations. While many if not most of you have since upgraded to Windows 8 or Windows 10, some may still have the need for Enabling Bitlocker on Microsoft Windows 7 Professional 64 bit.

    Ok, nuff said, for now.

    Gs

    Greg Schulz – Microsoft MVP Cloud Data Center Management, VMware vExpert 2010-2018. Author of Software Defined Data Infrastructure Essentials (CRC Press), as well as Cloud and Virtual Data Storage Networking (CRC Press), The Green and Virtual Data Center (CRC Press), Resilient Storage Networks (Elsevier) and twitter @storageio. Courteous comments are welcome for consideration. First published on https://storageioblog.com any reproduction in whole, in part, with changes to content, without source attribution under title or without permission is forbidden.

    All Comments, (C) and (TM) belong to their owners/posters, Other content (C) Copyright 2006-2024 Server StorageIO and UnlimitedIO. All Rights Reserved. StorageIO is a registered Trade Mark (TM) of Server StorageIO.

    Securing data at rest: Self Encrypting Disks (SEDs)

    Here is a link to a recent guest post that I was invited to do over at The Virtualization Practice (TVP) pertaining to Self Encrypting Disk (SEDs).

    Based on the trusted computing group (TCG) DriveTrust and OPAL disk drive security models, SEDs offload encryption to the disk drive while complimenting other encryption security solutions to protect against theft or lost storage devices. There is another benefit however for SEDs which is simplifying the process of decommissioning a storage device safely and quickly.

    If you are not familiar with them, SEDs perform encryption within the hard disk drive (HDD) itself using the onboard processor and resident firmware. Since SEDs only protect data at rest, other forms of encryption should be combined to protect data in flight or on the move.

    There is also another benefit of SEDs in that for those of you concerned about how to digital destroy, shred or erase large capacity disks in the future, you may have a new option. While intended for protecting data, a byproduct is that when a SED is removed from the system or server or controller that it has established an affinity with, its contents are effectively useless until reattached. If the encryption key for a SED is changed, then the data is instantly rendered useless, or at least for most environments.

    Learn more about SEDs here and via the following links:

    • Self-Encrypting Drives for IBM System x
    • Trusted Computing Group OPAL Summary
    • Storage Performance Council (SPC) SED and Non SED benchmarks
    • Seagate SED information
    • Trusted Computing Group SED information

    Ok, nuff said.

    Cheers gs

    Greg Schulz – Author Cloud and Virtual Data Storage Networking (CRC Press), The Green and Virtual Data Center (CRC Press) and Resilient Storage Networks (Elsevier)
    twitter @storageio

    All Comments, (C) and (TM) belong to their owners/posters, Other content (C) Copyright 2006-2024 Server StorageIO and UnlimitedIO LLC All Rights Reserved