How to erase (or clean) a disk using Ubuntu

Sometimes you just want to clean a USB stick, SD Card or USB disk, and the only thing you’ve got is Ubuntu running on your system.

Well that is no problem, I’ll explain how simple it is…

Cleaning, erasing, wiping a USB stick, SD Card or USB disk can be done in just 3 simple steps:

  • Connect your disk
  • Identify the disk on your system
  • Clean / wipe your disk

Step 1 – Connect your disk
Connect your USB stick, SD Card or USB disk to your computer and mount your disk (you can do that by double clicking its icon on your desktop).

 

Step 2 – Identify the disk on your system
Open a terminal:

df -h

or, you can use

sudo fdisk -l

Identify your disk (you can look at it’s size or partition scheme)

 

Step 3 – Clean / wipe your disk
The following command is a simple example to understand the use of dd. Do not simply copy it and use it in a terminal !!! Remember the order of the options “input file (if=)“ and “output file (of=)” , DO NOT reverse them !!!

In my case (the example below), I identified my disk that I wanted to clean as /dev/sdg.
So my output file (or of) will be /dev/sdg this will result in of=/dev/sdg

Open a terminal:

sudo dd if=/dev/zero of=/dev/sdg

 

When the dd command is issued and ready, make sure all data is written to disk by typing the folowing in your terminal:

sync

 

Suggestions for improving this article are welcome, please let me know and drop me a line .

How to install SoftSqueeze on Ubuntu

Softsqueeze is a software music player developed in Java (allowing it to work on most operating systems) that works with the Squeezebox Server software. Softsqueeze emulates most of the Boom, Duet, Transporter, Squeezebox and Slimp3 hardware music players. It uses a TCP based protocol, allowing it to use across the Internet and through firewalls/NAT routers using ssh tunneling. The software music player supports synchronization with hardware players.

Prerequisites (what you need to get it working):

  • Hardware
    • Computer running Ubuntu
    • SqueezeCenter Server
    • Network connection
  • Software
    • SoftSqueeze

 

Let’s get started:

Download the java version of SoftSqueeze (the .zip file) from your favourite browser.

Create a folder called SoftSqueeze in your home folder by opening a terminal window (Applications \ Accessories \ Terminal).

mkdir SoftSqueeze
cd SoftSqueeze

 

Now unzip the zip file:

unzip ~/Downloads/softsqueeze_3.8.zip

 

Make the JAR file executable:

sudo chmod +x SoftSqueeze.jar

 

Install Sun Java 6 Runtime:

sudo add-apt-repository “deb http://archive.canonical.com/ lucid partner”
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-fonts

 

Make JAR file open with Java:

java -jar ~/SoftSqueeze/SoftSqueeze.jar

 

The only thing left to do in Softsqueeze is to point it to the SqueezeCenter Server and redirect the audio output to “Java Sound Audio Engine”.

 

Suggestions for improving this article are welcome, please let me know and drop me a line.

Ubuntu upgrade resulting in a no sound situation

After working happily a couple of months with Ubuntu 10.04 I installed a new kernel with the update feature. This resulted in not having any sound or volume controls. After reading a lot on internet articles  I found the following article… Comprehensive Sound Problem Solutions Guide v0.5e I followed the following commands that brought back sound to my notebook.

Getting the ALSA drivers from a *fresh* kernel

Sometimes, sound might be configured correctly, but for some reason or another (tinkering) it stops working. One way to go back to the old setup is to reinstall Ubuntu. However, this step is actually quite unnecessary since you are reinstalling everything because of one thing.

A faster way, is to just remove the problematic packages and reinstall them cleanly.

Step – 1: Remove these packages

Code:

sudo apt-get –purge remove linux-sound-base alsa-base alsa-utils

Step – 2: Reinstall those same packages

Code:

sudo apt-get install linux-sound-base alsa-base alsa-utils

[LIST][*]

VERY IMPORTANT NOTE: Ubuntu (GNOME) users have reported that packages ‘gdm’ and ‘ubuntu-desktop’ are removed after removing the linux-sound-base packages. If this happens, then do the following

Code:

sudo apt-get install gdm ubuntu-desktop

Step – 3: Reboot

Using Excel’s conditional formatting to colorize the weekends

In this period of the year most of us are starting to make plans for next year, Excel is an incedibly powerfull tool that can help you visualize your plans. Using Excel’s conditional formatting you can colorize the weekends and make them standout more than the other days of the week or vice versa. This article is an How to colorize the weekends in Excel using conditional formatting.

To colorize the weekends in Excel using conditional formatting, based upon the date in column B, you can use the following formula:

=IF(OR(WEEKDAY($B2)=1;WEEKDAY($B2)=7);1;0)

 

To create a rule using conditional formatting:

  • Select the cells that you want to apply the conditional formatting to.
  • Click “Conditional Formatting”.
  • Choose “New Rule”.
  • In the “New Formatting Rule” dialog box, choose “Use a formula”.
  • Under “Format values”, type the formula: =IF(OR(WEEKDAY($B2)=1;WEEKDAY($B2)=7);1;0)
  • The formula uses the dates in column B (You can select your own column with dates, by replacing the $B2 part in the formula with the column letter of your choice).
  • Click “Format”.
  • In the “Color” box, select your favourite color.
  • Click “OK” until all dialog boxes are closed.

 

Suggestions for improving this article are welcome, please let me know and drop me a line.

Give your Raspberry Pi a fixed IP address

Having a fixed (or static) IP address on your Raspberry Pi, comes in handy if you want to access your Raspberry Pi from the internet (for a how to about port forwarding, read this article). As you might want to use ownCloud for instance.

You can give your Raspberry Pi a fixed IP address by editting the network interfaces file.

But first, we are making a backup of the old configuration!

sudo cp /etc/network/interfaces /etc/network/interfaces.bak

 

Next thing is, editing the network interfaces file:

sudo nano /etc/network/interfaces

 

Although the IP address you want to use might be different, make your /etc/network/interfaces look like this:

auto eth0                                     # The loopback interface

iface eth0 inet static              # Tells your Raspberry Pi to use a static IP address

address 192.168.2.25            # Defines the static ip address
gateway 192.168.2.1              # Defines the gateway to use (choose the IP address of your modem)
netmask 255.255.255.0     # Defines the subnet mask

network 192.168.2.0             # Defines the network family
broadcast 192.168.2.255    # Defines the network family

 

You can save the adjustments you made to your /etc/network/interfaces file by pressing ctrl o

Press ctrl x to exit

 

After saving your new settings, you need to activate them by restarting your network components:

sudo /etc/init.d/networking restart

 

Suggestions for improving this article are welcome, please let me know and drop me a line .