How to Update the Windows Bash Shell to Ubuntu 16.04

Starting with the Windows 10 Creators Update, anyone who installs the Bash environment will get Ubuntu 16.04 (Xenial). But, if you’ve previously installed Bash in the Anniversary Update, you’ll be stuck with Ubuntu 14.04 (Trusty) until you manually upgrade.

Ubuntu 16.04 contains more modern, up-to-date software packages. Ubuntu 14.04 was originally released in April, 2014, while Ubuntu 16.04 was released in April, 2016.

Update: Starting with the Fall Creators Update, Linux distributions are now delivered via the Store. If you previously installed the Ubuntu Bash environment, just open the Microsoft Store, search for “Ubuntu”, and install it to get the latest version.

How to Check Which Version of Ubuntu You Have

RELATED: Everything You Can Do With Windows 10’s New Bash Shell

If you’re not sure which version of Ubuntu is being used in your current Bash environment, open a Bash window and run the following command:

lsb_release -a

It’ll show you whether you’re running Ubuntu 14.04 or Ubuntu 16.04. If you’re running Ubuntu 14.04 and want to upgrade, read on. But ensure you have the Creators Update installed: You can’t upgrade to Ubuntu 16.04 LTS without upgrading to the Creators Update first.

Option One: Uninstall and Reinstall Bash With lxrun

RELATED: How to Uninstall (or Reinstall) Windows 10’s Ubuntu Bash Shell

If you don’t care about any customizations you’ve made to your bash environment (or you’re prepared to customize it again), you don’t have to worry about performing an Ubuntu upgrade. You can simply remove your current Ubuntu image and then tell Windows to reinstall a new Ubuntu image. This is the fastest way to upgrade your Bash environment.

To do this, first open a Command Prompt window by right-clicking the Start button or pressing Windows+X on your keyboard and selecting “Command Prompt”. Run the following command to uninstall the Bash shell. This will keep your Linux user account’s files and preferences, but will erase the system files, including any installed programs and system-level settings changes.

lxrun /uninstall

Type y to continue and Windows will uninstall the Ubuntu 14.04 Bash environment.

Your Bash system files are now removed. To reinstall Bash—which will give you Ubuntu 16.04 instead of Ubuntu 14.04—run the following command:

lxrun /install

Type y to continue and Windows will install the Ubuntu 16.04 Bash environment. Windows will automatically suggest you use the same username you used previously. You’ll be asked to enter a password after.

When it’s done, run the lsb_release -a command once again and you’ll see you’re now using Ubuntu 16.04. You have access to the newer software available in Ubuntu 16.04’s package repositories.

Option Two: Upgrade Ubuntu With do-release-upgrade

If you’ve customized your Bash environment and installed software, you may not want to completely erase everything. In this case, you can perform an upgrade command from within the Bash shell. This will upgrade Ubuntu from version 14.04 to 16.04, just like you’d upgrade a full Ubuntu environment to a new release. However, this will take longer than simply removing and reinstalling the Bash files.

To do this, open the Bash shell and run the following command:

sudo do-release-upgrade

This is the process officially recommended by Microsoft.

How to Migrate Windows 10 from HDD to SSD Using Clonezilla

This tutorial represents a practical excerpt on how to migrate (also known as cloning) a Windows 10 Operating System from a large HDD with multiple partitions, such as C:D:, to a smaller SSD using a Linux distribution which includes Clonezilla utility.

Clonezilla utility can run from PartedMagic Linux distribution CD ISO image or directly from Clonezilla Linux distribution CD ISO image.

This guide assumes that both disks (old HDD and SSD) are physically plugged-in into your machine simultaneously and Windows OS is installed on a disk with MBR partition scheme table. Fdisk command line utility should display the disklabel type as DOS.

Read Also8 Open Source Disk Cloning and Backup Solutions for Linux

If disk in partitioned in MBR layout from UEFI, you should clone all partitions, such as Windows RE partition, EFI System partition, Microsoft Reserved partition and Microsoft basic data partition which holds the Windows OS partition, typically the C: drive. In this case Fdisk command line utility should report the disklabel type as GPT.

On the below screenshots you can review the initial Windows partitioning scheme in case of a MBR layout style and GPT partition layout performed from UEFI.

MBR Partition Layout from Disk Management

Check MBR Partition Layout

Check MBR Partition Layout

GPT Partition Layout from Disk Management

Check MBR Partition Layout

Check MBR Partition Layout

Step 1: Shrink C: Partition of Windows System

Be aware that in the case your windows C: partition from the HDD is larger than the total size of your SSD you will need reduce its size to fit on the SSD.

The calculations for this step are simple:

System Reserved + Recovery + EFI partition + Windows C: partitions must be smaller or equal than the total size of the SSD reported by a utility such as fdisk.

1. To shrink C: partition from Windows, first open a Command Prompt window and execute the diskmgmt.mscto open Windows Disk Management utility which will be used to Shrink the volume (assuming that windows is installed at the beginning of the disk on the second partition, after the System Reserved partition and has C:letter assigned) in order to reduce its size to minimal.

Shrink C Partition

Shrink C Partition

Feel free to use other partitioning tools for this step, such as Gparted run from a live Linux ISO, to reduce C:drive size to minimal.

2. After you’ve reduced the size of C: partition, plug the SSD drive to your machine motherboard and reboot the machine into Clonezilla utility (use Clonezilla ISO image or <arel=”nofollow” href=”https://partedmagic.com/downloads/” target=”_blank”>Parted Magic ISO), enter to Bash shell interface and check both disks partition table and size using the below commands.

# fdisk -l /dev/sda
# fdisk -l /dev/sdb
Check Partition Table Size

Check Partition Table Size

Be aware that your drives names would be sda for the first disk, sdb for the second and so on. Choose the disk with maximum attention so you won’t end-up cloning the wrong device and destroy all data.

To match the correct disk source (HDD in this case) and disk destination target (SSD) use the size and the partition table reported by fdisk command. Fdisk output will show that the SSD should be smaller in size than your HDD disk and should have no partition table created by default.

In case of a GPT disk, the HDD partition table should look as illustrated on the below screenshot.

$ su -
# fdisk -l /dev/sda
# fdisk -l /dev/sdb
Check Partition Disk Label

Check Partition Disk Label

Step 2: Clone Disks Using Clonezilla

3. Next , clone only the MBR (stage one bootloader + partition table) from the HDD to the SSD target disk using one of the below commands (assuming that sda represents the drive where Windows OS is installed and sdbthe SSD disk).

# dd if=/dev/sda of=/dev/sdb bs=512 count=1
or
# sfdisk -d /dev/sda | sfdisk -f /dev/sdb
Clone Disks Using Clonezilla

Clone Disks Using Clonezilla

In case of a GPT partition style you should clone the first 2048 bytes:

# dd if=/dev/sda of=/dev/sdb bs=2048 count=1

Or use sgdisk utility. Be aware that if you copy partition table from sda to sdb you should inverse the order of disks when using sgdisk.

# sgdisk -R /dev/sdb /dev/sda

After cloning the MBR/GPT, run fdisk command again with the -l flag to verify if the partition table matches on both disks.

# fdisk -l /dev/sda
# fdisk -l /dev/sdb
Verify Partition Table

Verify Partition Table

4. By now both drives should have the exact partition table. On the target disk now delete all the partitions that follow after the Windows partition in order to start with a clean partition table with the entries necessaries only for system reserved and windows.

You won’t clone data from D: (or other partitions that follow Windows) from the old drive. You’re basically cloning only the first two partitions from the old HDD. Later you will use this unallocated space left behind to extend the C: partition by incorporating all the unused space from SSD.

Use fdisk utility as described below to delete partitions. First run the command against your SSD target drive (/dev/sdb this case), print partition table with p key, press d key to start delete partitions and choose the last partition number from the prompt (in this case the third partition) as illustrated in the below screenshots.

# fdisk /dev/sdb
Delete Partition Table

Delete Partition Table

In case your drive has more than one partition following after the Windows partition, make sure you delete all of them. After you’ve finished removing all unneeded partitions, press p key again to print partition table and if, by now, only the two required Windows partitions are listed, you are safe to hit on w key in order to apply all changes.

Confirm Partition Changes

Confirm Partition Changes

The same procedure for deleting last partitions applies for GPT disks also, with the mention that you should use cgdisk utility which is intuitive to work with in manipulation a disk layout.

Don’t worry about destroying backed-up partition table at the end of the GPT disk, cgdisk will make the appropriate changes on both partition tables and will save the new disk layout table at the end of the disk automatically.

# cgdisk /dev/sdb
Delete GPT Partition

Delete GPT Partition

And the final GPT disk report with the last 4,9 GB partition deleted.

Verify GPT Partition Table

Verify GPT Partition Table

5. Now, if everything is in place, start Clonezilla utility, select device-device mode, run from beginner wizard and select part-to-local_part cloning option.

Use the below screenshots for guide.

Select Clonezilla Device Mode

Select Clonezilla Device Mode

Select Clonezilla Beginner Mode

Select Clonezilla Beginner Mode

Select Clonezilla Local Partition Clone

Select Clonezilla Local Partition Clone

6. Choose the first local partition from the list (sda1 – System Reserved ) as source and press Enter key to continue.

Select Partition to Clone

Select Partition to Clone

7. Next, choose the local target partition, which will be the first partition from the second disk, (/dev/sdb1) and press Enter key to continue.

Select Local Target Partition

Select Local Target Partition

8. On the next screen choose to Skip check/repair file system and press Enter key again to continue.

Skip Check Repair Filesystem

Skip Check Repair Filesystem

9. Finally, press Enter key again to Continue and answer with yes (y) twice to accept the warnings and start the cloning process.

Confirm Partition Changes

Confirm Partition Changes

Start Cloning Partition

Start Cloning Partition

10. After the cloning process of the first partition finishes select to enter command line prompt, run clonezillaand repeat the same steps for next partitions (source sda2 – target sdb2, etc).

Clone Second Partition

Clone Second Partition

11. After all windows partitions are cloned, reboot the system and physically unplug the HDD drive or, better, tamper BIOS settings in order to set SSD as primary boot drive instead of old HDD.

Step 3: Resize Windows Partition

12. You can run Gparted utility to check partitions sanity and extend windows partition from Linux or you can just boot into Windows and use Disk Management utility to do this job. The below screenshots illustrate how to use both utilities.

Extend Partition using Gparted Live CD

Resize Partition Using GParted

Resize Partition Using GParted

Resize Partition Size

Resize Partition Size

Extend Partition using Windows Disk Management utility directly from Windows.

Extend Windows Partition

Extend Windows Partition

Select Disk to Extend

Select Disk to Extend

That’s all! The C: partition is now expanded to the maximum size of your SSD and Windows can now run at its maximum speed on a brand new SSD. The old HDD has all data intact.

Connect the hard-disk again in order to use it in case you’ve physically removed it from the motherboard. You can delete system reserved partition and windows partition from the old HDD and create a new partition instead of these two. The other old partitions (D:E: etc) will remain intact.

Conclusion

With Clonezilla you can also choose to image the partitions and save them to an external HDD or a network location. In this case you must also backup HDD MBR/GPT with one of the following commands and save the MBR image to the same directory where your clonezilla images are kept.

MBR backup to file:

# dd if=/dev/sda of=/path/to/MBR.img bs=512 count=1
or
# sfdisk -d /dev/sda > =/path/to/sda.MBR.txt

GPT Backup to file:

# dd if=/dev/sda of=/path/to/GPT.img bs=2048 count=1
or
# sgdisk --backup=/path/to/sda.MBR.txt /dev/sda

For a future restoration of your Windows system from a network location, first restore the MBR sector from the saved imaged above using one of the below commands, then proceed with restoring each clonezilla partition image one by one.

MBR image restore from file:

# dd if=/path/to/MBR.img of=/dev/sda bs=512 count=1
or
# sfdisk /dev/sda < =/path/to/sda.MBR.txt

GPT image restore from file:

# dd if=/path/to/GPT.img of=/dev/sda bs=2048 count=1
# sgdisk - -load-backup=/path/to/sda.MBR.txt /dev/sda

How to use Clonezilla

FIRST OF ALL, BACK UP IMPORTANT DATA BEFORE YOU USE CLONEZILLA LIVE TO DO ANYTHING.

In this example, the machine has 1 disk (8 GB), we want to clone it to an external disk (20 GB). This is a normal case when you buy a new disk to replace old disk on your machine. Here since we use virtual machine to give this example, we use small disk size, i.e. 8 GB to 20 GB instead of modern disk size.
Besides, modern “light” laptop normally comes WITHOUT CD drive, or you happen to leave your USB CD drive in another place, it’s a good idea to use USB device to boot Clonezilla live. In this example, we use a better, neater method, i.e. put Clonezilla live on the new disk and use it to boot clonezilla live. By doing this, you do not have to burn a CD, or prepare another USB flash drive. This is an one-time-use Clonezilla live, because later the clonezilla live files on new disk will be overwritten. Of course, you still can put Clonezilla live in CD or USB flash drive, then boot it to clone the 8 GB disk to 20 GB disk. The procedure is quite similar. Just remember to choose the correct source and destination disk.
Prerequisite: A new, equal or larger disk, an external disk closure, an USB cable. A running MS Windows or GNU/Linux.

  • Put the new disk inside your external disk closure, connect that to your running MS Windows or GNU/Linux via USB cable, then follow here to put Clonezilla live zip file on your external disk and make it bootable.

 

  • Insert the new hard drive (which is bootable with Clonezilla live builtin) with the USB cable to your machine.
  • Most modern PC comes with USB boot function, you can refer to your montherboard manul to see how to set it during boot. E.g. On the IBM thinkpad X61, you can press F12 and choose USB device to force the machine to boot via USB device.

 

In the boot menu, we choose “Other modes of Clonezilla live”
Then choose “Clonezilla live (To RAM. Boot media can be removed later)”
By doing this, all the Clonezilla live file on the new hard drive will be copied to RAM. Therefore the partition of new hard drive can be released, i.e. it won’t be busy and locked by running programs.
Press Enter, you will see Debian Linux booting process, and it will spend a few minutes when copying the files to RAM:

 

 

The default keyboard layout is US keybaord, therefore if you are using US keyboard, just press enter (i.e. use the option “Don’t touch keymap”).
If you want to change keymap, you can either choose “Select keymap from arch list” or “Select keymap from full list”.
///NOTE/// There is a bug when choosing French keymap in “Select keymap from arch list”, so use “Select keymap from full list” to change keymap if you are using French keyboard.

 

Choose “device-device”

Choose “Beginner”

If you choose “Expert” mode, you will have some chances to choose advanced parameters, e.g. tune the CHS values of target disk, how to create partition table on the target disk, etc.. You can see more details here.

///NOTE/// By deafult, Clonezilla will clone the “same” size of source disk to target disk. i.e. in this example, only 8 GB will be cloned to target disk, so the rest of 12 GB on the destination disk will be unallocated. If you want to make use all of the target disk size, remember to enter “Expert” mode and choose option “-k1”.

 

 

Here the source disk is sda, which is 8 GB in size”.
///WARNING/// Be careful! Do not choose the wrong disk. Since all the data on the target disk will be overwritten!!! 

 

Here the target disk is sdb, which is 20 GB in size”
///WARNING/// Be careful! Do not choose the wrong disk. Since all the data on the target disk will be overwritten!!! 
Select if the source file system need to be checked or not:
Select the mode you want after the disk cloning is done:

By default we will choose later, but if you have decided, you can choose to reboot or poweroff the machine.

Clonezilla shows you the complete command to run this disk to disk clone action: 

 

Before doing the real cloning, Clonezilla will ask confirmation:
Ask confirmation agin:
First ask confirmation about cloning boot loader to target disk:

Then it will create partition table on the destination disk:

Clonezilla is cloning the data from source disk to target disk:

 

When everything is done, Clonezilla will prompt you if about reboot, poweroff, etc. 

Then we choose poweroff:

and the machine will be halted:

That’s all. The new hard drive is ready to be used. You can remove the old (8 GB) disk from your machine, and put the new one (20 GB) in your machine. Boot it, you can enjoy the new disk.
//NOTE// You can only keep one of the disks in the same machine before you boot it. If you boot the machine with the source disk and the cloned destination disk on the same machine, the booting OS will be confused since there are two identical file systems on the same machine. They have same UUID so the booting OS might mount the wrong file system.

Using Clonezilla to clone a HDD to SSD

Question
I am having a major issue trying to copy a 300GB HDD to a 120GB SSD. I have chosen to use Clonezilla as this has never let me down before, I have used Gparted to resize the larger drive down to just over 100GB. After thats done I boot into Windows and let ChkDsk do its thing before then booting back into Clonezilla. I can confirm that i can see both drives listed for selection and carefully chose the Source and Target, the first two smaller partitions copy over fine however on the third and ‘main’ partition the copy gets to between 50/70% and then freezes copying.
I have googled and tried as many of the different options that Clonezilla offers that I can but all do the exact same thing. We even tried setting up the partitions on the new drive and doing a partition to partition clone but same result. To make sure there is no issue with the SSD we even tried a larger drive but again this did the same thing.

I dont know how much difference it will make but the machine is a Dell Latitude laptop, the HDD is a Toshiba 300GB and the SSD is a 120GB Samsung.

Answer
The way I have done this in the past is by doing a disk to disk clone, choosing advanced options as opposed to beginner mode and then choose or check -icds “Skip checking destination disk size before creating partition table”. Something else to keep in mind is to make sure that Clonezilla is running live from the USB stick or DVD rather than running from RAM. If you have a dedicated Clonezilla disk this is the default (and I think only option), but if you are running Clonezilla from another distribution such as Parted Magic where the default is to write everything to RAM and run from there, Clonezilla may fail like this because basically you run out of RAM and it simply stops copying.

How to stop Windows 10 asking me to change my password

Windows 10 keeps asking me to change my password every 30 days or so and it a pain cos everytime I change it I have log backing into my sheares on the network that my devices are using and put in the new password into my devices,I want to have one password and not have to change it all the time,I have 3 pcs and 2 use the same password and one don’t so its a lot to do.

Is there a option to turn it off.

Solution

Open a Command Prompt window as Administrator and run this command:

net accounts /maxpwage:unlimited

That should do it!

Windows 10 asks for a password reset upon every login attempt to the machine, there is no password set. (local PC user account)

I have a new Windows 10 machine that is a fresh install. This machine has a single local user account with no password set. Each time the PC locks, or is restarted we hit ENTER to login (blank password) it asks to change the password. I hit enter a couple of times and it says the password was changed. I have not seen any relevant error codes looking at event viewer.

Solution

To help you disable the prompt when you sign in to the computer, please answer these questions:

  • Before installing Windows 10, was the computer part of a workgroup?
  • Are you using the same user profile from the previous Windows installation?
  • Have you tried setting a different password? Does it also ask you to change it when the computer restarts?

Try the steps below to resolve the issue:

  1. Right-click on the Windows icon on your home screen.
  2. Select Command Prompt (Admin).
  3. Click OK if you get a prompt window.
  4. Type wmic UserAccount set PasswordExpires=False then press Enter.

Restart the computer after performing the steps and check if it will still ask you to change your password.

How To Fix Rats WebGL Hit A Snag Error

Have you had this problem: “Rats! WebGL hit a snag.” Usually, you get this message in the error bar on Google Chrome. So what is it all about? Before we tell you about it, let’s understand a little about WebGL. WebGL or Web Graphics Library is a JavaScript API that helps with rendering interactive 3D computer graphics and 2D graphics on any compatible web browser, without requiring the use of plug-ins. It enables GPU accelerated image processing and the use of physics. WebGL programs consist of code written in JavaScript and are executed on the computer’s GPU or Graphics Processing Unit. The non-profit, Khronos Group designs and maintains WebGL.

WebGL works as a thin wrapper around OpenGL. OpenGL is a low level library used for drawing 2D graphics. Basically, OpenGL gives us the ability to push data to the GPU, and then to execute specialized code on the GPU itself rather than on the CPU. WebGL helps to optimize the performance of browsers, JavaScript and graphics drivers when it comes to 2D and 3D graphics. In fact, WebGL is the best way to bring 3D everywhere. It allows you to write once, run everywhere.

Fix Rats Webgl Hit A Snag Error Chrome

Fix Rats Webgl Hit A Snag Error Chrome

When using WebGL, you may have had a problem with a site falling back to canvas rendering if WebGL is not supported or is found to have an error. When using WebGL in Google Chrome, an error message bar appears – “Rats! WebGL hit a snag.” It does not disappear till you do something about it.

If you try reloading the page or navigating to a different one, the message reappears the next time you use WebGL. In fact, you get the error message every time a web page tries to access WebGL. And once the error occurs, Chrome will not use WebGL on the same site again, until and unless you specifically reload it.

So, the “Rats! WebGL hit a snag” message does not indicate continuous errors, but just that you have been making continuous attempts to use WebGL. You can fix the problem and solve your page rendering issues by disabling hardware accelerated graphics from the settings in Google Chrome.

What is WebGL?

Web Graphics Library also known as the “WebGL” is a Javascript API which Renders interactive 3D computer graphics and Graphics(2D) on any web browser that is Compatible without needing any plug-ins or add-ons.

The Computer’s GPU or also known as Graphics Processing Unit helps the execution of the Javascript which has all the webGL program Codes.

The Group popularly known as the “Khronos Group designs and maintains WebGL, and it is a non-profit group, situated in Beaverton, Oregon (USA).

Usage of WebGL

WebGL acts as a thin sheet of cloth around OpenGL which is a used for drawing 2D graphics (Low-Level Library). It helps in pushing data to the GPU, and execution of the specialized code on the GPU itself.

WebGL is the easy and best way to bring 3D graphics and also 2D everywhere. Once written, it can run Everywhere. WebGL apart from used in 3D wed design and gaming, it also has amazed scientists for research and scientific works.A book named “Cellular Automata” have used this technology to simulate Debris flow.

Did you know? NASA, Yes “NASA” developed an interactive web application called experience curiosity to celebrate the 3rd anniversary of the famous Curiosity rover landing on Mars.

How to Fix Rats! WebGL Hit A Snag

Sometimes when using WebGL we have an error about site crashing and telling us that WebGL is not supported. You will come across an error message saying “Rats! WebGL hit a snag” while surfing on Chrome browser.

Even if we try to Reload the web page or try to go to another one, the message reappears. In fact, we get an error message every time browser try to access WebGL.

Note: – This error message does not indicate continuous errors but appears whenever someone is trying to make constant attempts to use WebGL.

Fix #1 Disabling Hardware Accelerated Graphics in Chrome

  • We can fix this problem by disabling hardware accelerated graphics from the settings in google chrome. Follow the steps mentioned below.
  • Navigate to chrome://settings>>show advanced settings.
  • There you can see an option “use hardware acceleration when available”.
  • Uncheck it and Restart your browser to make the changes live.

Fix #2 Disable WebGL

  • Go to chrome://flags. Search for the option “Disable WebGL.
  • Enable this option and restart your browser.
  • It is very unlikely that your problem still Persist But if you encounter this error then there is another way to tackle it.

Fix #3 Chrome GPU

  • Navigate to Chrome://GPU.
  • Here under the Problems detected heading, Check for any unusual red warnings, as I have shown in the picture below.

By this, you can figure out what the problem is, and what exactly is making that error message pop. But as I said earlier Fix 1 & 2 would work for you like a Charm.

CrossOver runs your Windows apps on Mac or Linux computers

No matter where you fall on the Windows vs. Mac vs. Linux debate, one thing remains true: you shouldn’t be forced to limit yourself to just one operating system. Of course, there are workarounds, like running a virtual machine, but they’re not always intuitive and can inhibit your programs’ performance.

CrossOver 17 allows you to launch Windows apps natively on your Mac or Linux computer without buying a Windows license, rebooting, or using a virtual machine, and it’s on sale for $19.

From productivity software to games, CrossOver 17 lets you operate Windows software at native speed and without any performance limitations. You can install Windows programs with a single click, and you don’t need to use Windows virus protection to access them. Plus, CrossOver 17 integrates seamlessly with your desktop environment, so you can get your new software up and running faster.

CrossOver 17 is available in Mac and Linux variants and typically retails for $39.95 each. But, today you can get it on sale for $19, saving more than half off the usual price.