msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

25 Apr 2013 Disable Windows super key in Ubuntu

I am running a virtualized Windows 8 installation on VMware Worlstation in Ubuntu 12.10 and this can be confusing since the window manager uses the same key as my Windows machine to open the launcher. Therefore I use to disable the super key in Ubuntu so that only my Windows machine responds to the key.

This is one way to disable the super key from a console window as the user you are logged in with:

# dconf write /org/compiz/profiles/unity/plugins/unityshell/show-launcher '""'

This command does not require a logoff or restart so you can test the behaviour of the Windows super key immediately.

You might have to install the apt-get install compizconfig-settings-manager package if this command does not work.

Tags: ,

Posted by

26 Mar 2013 Howto mount UDF ISO-13346 ISO file in Ubuntu

This is just a short note on how you can mount a UDF ISO-file in a Ubuntu console window.

# sudo mount -t udf,iso13346 -o loop ISO-filename.iso mountpoint

Remember to create the mountpoint folder before you try to mount the ISO file.

Tags: , , ,

Posted by

23 May 2012 Rescue a damaged disk using GNU ddrescue

GNU ddrescue (gddrescue) is a linux data recovery tool. It copies data from one file or block device (harddisc, cdrom, etc) to another, trying hard to rescue data in case of read errors.
It can also be used as a forensic cloning tool.

Installing gddrescue in Ubuntu linux

# aptitude install gddrescue

The command to use for gddrescue is ddrescue, don’t ask me why it is not called gddrescue.

First you copy as much data as possible, without retrying or splitting sectors.
This example rescues data from one disk to another

# ddrescue --force /dev/sda /dev/sdb logfile.ddrescue

Warning! This overwrites content on /dev/sdb

When you use a log file you can stop ddrescue any time by pressing Ctrl+ C to interrupt the process.

You restart it again with the same parameters and ddrescue will resume from where it was before it was interrupted. This is good to know since this can be a time consuming process.

Now let it retry previous errors reported in the logfile 3 times, using uncached reads

# ddrescue --force --direct --max-retries=3 /dev/sda /dev/sdb logfile.ddrescue
Press Ctrl-C to interrupt
Initial status (read from logfile)
rescued:        2 TB,  errsize:   69632 B,  errors:     136
Current status
rescued:        2 TB,  errsize:   49152 B,  current rate:      256 B/s
   ipos:   916972 MB,   errors:      96,    average rate:      359 B/s
   opos:   916972 MB,     time from last successful read:       0 s
Retrying bad sectors... Retry 1

If that fails you can try again but retrimmed, so it tries to reread full sectors

# ddrescue --force --direct --retrim --max-retries=3 /dev/sda /dev/sdb logfile.ddrescue

You should now have rescued some data that you can continue your rescue work with.
There may be another post about that later.

Rescue a bad CDROM using ddrescue

# ddrescue -n -b2048 /dev/cdrom cdimage.img logfile.ddrescue
# ddrescue -d -b2048 /dev/cdrom cdimage.img logfile.ddrescue

The cdimage.img file can then be mounted as a loop file or written to a CDROM.

Tags: , , ,

Posted by

25 Apr 2012 Change how the swap memory behave in Ubuntu

This post is just a cut and paste job from the Ubuntu SwapFaq for my future reference Ubuntu installation.

The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. Because disks are much slower than RAM, this can lead to slower response times for system and applications if processes are too aggressively moved out of memory.

  • swappiness can have a value of between 0 and 100
  • swappiness=0 tells the kernel to avoid swapping processes out of physical memory for as long as possible
  • swappiness=100 tells the kernel to aggressively swap processes out of physical memory and move them to swap cache

The default setting in Ubuntu is swappiness=60. Reducing the default value of swappiness will probably improve overall performance for a typical Ubuntu desktop installation. A value of swappiness=10 is recommended, but feel free to experiment. Note: Ubuntu server installations have different performance requirements to desktop systems, and the default value of 60 is likely more suitable.

To check the swappiness value

# cat /proc/sys/vm/swappiness

To change the swappiness value A temporary change (lost on reboot) with a swappiness value of 10 can be made with

# sudo sysctl vm.swappiness=10

To make a change permanent, edit the configuration file with your favorite editor:

# gksudo gedit /etc/sysctl.conf

Search for vm.swappiness and change its value as desired. If vm.swappiness does not exist, add it to the end of the file like so:

vm.swappiness=10

Save the file and reboot.

Tags: , ,

Posted by

09 Dec 2011 Disable IPv6 on Ubuntu 11.10

This is a short HOWTO on disabling IP version 6 support on your ethernet devices like eth0 on Ubuntu 11.10.
I guess you can do this on earlier version of Ubuntu as well.

  • Add the following line to the end of the file /etc/sysctl.conf (as root or use sudo)
  • net.ipv6.conf.all.disable_ipv6 = 1
  • Run the following command to make this change effective immediately

    # sudo sysctl -p

    A result from this command could be like this

    net.ipv6.conf.all.disable_ipv6 = 1

    To check that IPv6 has been disabled or not, run the following command from your console window

    # ip a | grep inet

    IPv6 has been disabled if this command does not return any IPv6 addresses.

    Tags: , , , , , ,

    Posted by