Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Monday, 14 July 2014

Ubuntu/Arch Linux : USB Error Input/output error NTFS is either inconsistent, or there is a hardware fault


It can be quite common to use a USB drive on your Linux box and then have to copy file to a Windows computer. When you reconnect the USB drive to your Linux box you may get a similar Error to the following :

Failed to mount '/dev/sdd1?: Input/output error NTFS is either inconsistent, or there is a hardware fault, or it's softRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows then reboot into Windows twice.


This can seem a bit daunting but thankfully the solution is quick by installing 'ntfsprogs'. ntfsprogs is a suite of NTFS utilities based around a shared library.

Arch


$ pacman -S ntfsprogs

Ubuntu

$ sudo apt-get install ntfsprogs

Then run the command (note : change the drive to match the same as you get with the error) :

$ sudo ntfsfix /dev/sdd1

See the man file for full details.

$ man ntfsprogs             

Sunday, 13 April 2014

Setup latest NVIDIA Drivers for Ubuntu or Linux Mint


  • If you need to install NVIDIA Driver's on either Ubuntu or Linux Mint the following three commands will update your system with the latest available drivers

$ sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
$ sudo apt-get update
$ sudo apt-get install nvidia-current nvidia-settings

  • Reboot your system and the drivers should be applied
  • For more detailed configuration open the 'NVIDIA X Server Settings Applet'

What is a PPA for on Ubuntu or Linux Mint?




  • PPA stands for Personal Package Archive
  • It allows apps to be installed that are not in the Ubuntu/Mint repositories
  • Provides access to newer software
Example - add PPA for apt-fast
  •  On Ubuntu or Linux Mint from a terminal for a 64 bit OS :
$ sudo add-apt-repository ppa:apt-fast/stable 
$ sudo apt-get update 
$ sudo apt-get install apt-fast

  • This allows 'apt-fast' to be installed which is not in the standard repositories

Quickly Switch between ChromeOS and Ubuntu or Arch Linux


If you have a Chromebook and use it for a 'traditional' Linux rather than the default OS its really useful to be able to switch between your Linux OS (e.g. Ubuntu or Arch) and the Google ChromeOS. The easiest way I have found for this is to use aliases.

Ubuntu or Arch Linux

Use a text editor to update your ~/.bashrc or ~/.bash_alias file e.g.

alias ChromeOSBoot='sudo cgpt add -i 6 -P 0 -S 1 /dev/sda && sync && sudo reboot'

Save the file. Reload .bashrc file with

# . .bashrc

Run the alias :

# ChromeOSBoot

This will then reboot the Chromebook into ChromeOS.

ChromeOS

To switch back to Ubuntu or Arch Linux do not login when prompted as the ChromeOS boots. At the login screen select 'Ctrl + ALT+ F2' then login as chronos user (no password).

Use vim to create a .bashrc file if it does not already exist e.g.

alias ArchOSBoot='sudo cgpt add -i 6 -P 5 -S 1 /dev/sda && sudo reboot'

Save the file. Reload .bashrc file with

# . .bashrc

Run the alias :

# ArchOSBoot

This will then reboot the Chromebook into Arch Linux (or Ubuntu if that's what you have installed).







modern.ie bash: ./IE11.Win8.1.For.LinuxVirtualBox.part1.sfx: No such file or directory on Linux




While I love using Linux software UI testing in browsers does mean having to sometimes test using IE. I found out that helpfully Microsoft make available for testing only Virtualbox VM's to allow browser testing via the modern.ie site . Great, this is just what i need!  After downloading the VM's the instructions are pretty straight forward but instead of extracting the files I got this :

$ ./IE11.Win8.1.For.LinuxVirtualBox.part1.sfx

bash: ./IE11.Win8.1.For.LinuxVirtualBox.part1.sfx: No such file or directory

I was using Arch Linux and even though the MD5 sums were fine I downloaded the files again with the same result. I also tried Ubuntu, Crunchbang (#!) Linux with the same result. After a lot of trial and error I worked out that it needs some 32 bit libraries to extract the files correctly!

My solution was to use a 64 bit CentOS 6.x VM and installed :

# yum -y install glibc.i686 libstdc++.i686

Now you can extract the file as normal!

Hope this helps someone as it was a pain for me to work out.