Resizing linux filesystem without lvm


if you need to resize your virtual harddisk in your virtual guest system and you are not using LVM, then this tutorial may help you: Extending a root filesystem in Linux without LVM

Here are the important steps for fast forward how-to:

  1. expand harddisk in vmware
  2. reallocate partition table with fdisk and restart your guest
  3. resize it with resize2fs

Be aware that fdisk takes the same starting block, otherwise you will mess up your partition table!

Happy working ;)

stm32f3-discovery – unknown chip id

hey folks,

have you ever got this error message? relax, here [1] you will find further informations.
After looking up the pin information in the user manual of the discovery board I was searching for the R36 to shorten it to VDD … yeah, here it is:

r36_stm32f3so, take a screwdriver or something similiar, reset the board and start st-flash erase
et voila, it works again!


mounting a software raid-1 member

if you want to mount a raid-1 member in a external system, you should install mdadm and checkout those commands:

# Connect harddisk to auto-plugable controller/system
# Check which device name was assigned to the pluged-in harddisk
tail /var/log/syslog
fdisk -l /dev/sdb
mkdir /mnt/data
mdadm --examine /dev/sdb3
mdadm -A -R /dev/md0 /dev/sdb3
mount -o ro /dev/md0 /mnt/data
# Read, what you want to read ;)
umount /mnt/data
mdadm -S /dev/md0
# Remove the harddisk

that is it. thnx Milosz for your help and saving my time ;)

Corrupted ODS-File

I have had the exact same problem as Azman did, and he found the solution and described it here [1]. After reading his post I’ve decided to take the shortcut and install the xmlindent package first. So here is my approach:

# cp FILE.ods BACKUP_FILE.ods
# unzip -p FILE.ods content.xml | xmlindent > content.xml
# vim content.xml
# zip FILE.ods content.xml

Thanks Azman, it helped me a lot!


SATA hotplug

Have you ever hotplugged a SATA Drive? With new mainboards udev will recognize the new harddisk with no effort, but if you use older hardware maybe you should check your BIOS (switch from IDE to AHCI mode) and type following command in your shell after replacing your SATA drives:

echo "- - -" >> /sys/class/scsi_host/host[2|3|4]/scan

For more information and a safe unmount script look here:

Google Drive – Conditional formatting of entire rows

I was searching for a possibility to format entire rows or defined cells in condition to a formula or content of another cell. This is a really handy functionality of other spreadsheet programs. So I thought it should also be possible in Google Drive … yeah, but only with a selfwritten function. Here [1] I found the first hints and with the API [2] I finished mine:

function onEdit() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName('Issues'); // Change to your own
var rows = sheet.getRange('a1:c');
var numRows = rows.getNumRows();
var values = rows.getValues();

for (var i = 0; i <= numRows - 1; i++) {
var n = i + 1;
if (values[i][2] == 'finished') {
sheet.getRange(n + ':' + n).setBackgroundColor('white');
sheet.getRange(n + ':' + n).setFontColor('lightgrey');
else if (values[i][2] == 'new') {
sheet.getRange(n + ':' + n).getCell(1,2).setBackgroundColor('yellow');
sheet.getRange(n + ':' + n).setFontColor('black');
else if (values[i][2] == 'workingOn') {
sheet.getRange(n + ':' + n).getCell(1,2).setBackgroundColor('red');
sheet.getRange(n + ':' + n).setFontColor('black');
else {
sheet.getRange(n + ':' + n).setBackgroundColor('white');
sheet.getRange(n + ':' + n).setFontColor('black');

function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName('Issues'); // Change to your own
var sortRange = sheet.getRange('a2:c');
sortRange.sort([{column: 1, ascending: true}, {column: 3, ascending: true}]);

Hope it helps you too!


arch latex bug

hey folks!

Have you got this nasty error message?

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Arch Linux) restricted \write18 enabled.---! /var/lib/texmf/web2c/pdftex/latex.fmt doesn't match pdftex.pool(Fatal format file error; I'm stymied)

Then you should do the following:

… copying the *.pacnew files in /etc/texmf over the non .pacnew files and running fmtutil –all fixes the issue.

Found here:

Grub 2 and the VGA parameter

It was annoying to have only a resolution of 640×480 in the virtualbox instance of my new debian virtual instance. So I have had to do something. Here [1] I found the solution of the already well known problem:

In Grub2 the vga= parameter is deprecated.

To set a screen resolution for your console you can do the following log in as root

edit /etc/default/grub uncomment the GRUB_GFXMODE=640×480 and change the resolution to something you can use e.g. 1024×768
Add the line
to the file to have the same resolution at the Linux console. You do not edit the 00_header file as some suggest you need to do.

run update-grub

run reboot to confirm that your changes worked!