Schlagwort-Archive: ubuntu

live resizing of ext4 root filesystem on linux

Recently one of my virtual Ubuntu servers ran out of disk space. The virtual hardware was extended and some gigs of new disk space were available. The problem was that the machine was not available to me locally, I had only remote access via SSH.

I know I had to resize the partitions to be able to make usage of the newly available disk space – found several entries on the web but all told me that I had to boot into a live disk and use GParted. This meant that I had to drive several hundreds of kilometres to be able to do so ..didn’t really like that option.

After doing some Google „research“ last weekend I found this GLORIOUS blog entry on codesilence.wordpress.com — it IS possibly to resize the partitions and the ext4 filesystem „live“ even if it is a live system:

Live resizing of an ext4 filesytem on linux

 

Oracle JDK7 on Ubuntu

How to manually install the official Oracle JDK7 including the Mozilla Firefox Java-Plugin on Ubuntu 12.04 LTS (this example is based on JDK7 update 11 with important security fixes – just replace the version to a more recent one):

download most recent JDK version from Oracle website:

  • http://www.oracle.com/technetwork/java/javase/downloads/index.html

extract to /usr/lib/jvm directly:

  • cd /usr/lib/jvm
  • sudo tar xvzf /path/to/download/folder/jdk-7u11-linux-x64.tar.gz

install the new Java installation to the Ubuntu „alternatives“ system:

  • sudo update-alternatives –install „/usr/bin/java“ „java“ „/usr/lib/jvm/jdk1.7.0_11/bin/java“ 1
  • sudo update-alternatives –install „/usr/bin/javac“ „javac“ „/usr/lib/jvm/jdk1.7.0_11/bin/javac“ 1
  • sudo update-alternatives –install „/usr/bin/javaws“ „javaws“ „/usr/lib/jvm/jdk1.7.0_11/bin/javaws“ 1

now configure the alternatives and select the newly available option as default (in the normal case it will be the last option of the list, just check the path to the java installation …)

  • sudo update-alternatives –config java
  • sudo update-alternatives –config javac
  • sudo update-alternatives –config javaws

Install Mozilla Firefox Plugin (for 64bit):

  • mkdir ~/.mozilla/plugins (if not existent yet)
  •  ln -sf /usr/lib/jvm/jdk1.7.0_11/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

 

 

Complete Erase / Wipe Hard Disk

When I decided to throw my old dual boot Ubuntu + Win XP Laptop away I wanted to really wipe out all data from the hard disk – just for safety these days … I  wondered how it would be possible to do this because I did not find a „low level format“ option in the BIOS of the machine (and I do not trust format-tools based on Windows platform).

The Windows XP partition already was broken somehow, XP didn’t boot any more so
I had to do this from Ubuntu (which BTW also showed lots of disk related errors at boot time, but finally came up and presented the GDM login – yes, it IS SUPREME….)

Erasing and really wiping out the disk from Linux is much easier than I thought, just use the free GNU shred tool:

„sudo shred -vfz -n 10 /dev/sda“
(replace /dev/sda with whatever your disk drive is named)

that’s it — much easier and quicker than dismounting the hard disk out of the laptop and driving over it 20 times with your car 🙂