Sunday, 14 June 2009
Wednesday, 27 May 2009
Command Line foo: convert unixtime to local
Very quick and easy way to convert a unix timestamp into localtime:
ralf@geeko:~$ date -R -d @1242079810
Tue, 12 May 2009 00:10:10 +0200
Monday, 25 May 2009
Your Daily Pop-Up's: Gnome libnotify
A pretty easy way to create Gnome Pop-Up using libnotify + notify-send
ralf@geeko:~$ cat ~/bin/send-notify.sh
#/bin/bash
export DISPLAY=:0 && \
export XAUTHORITY=~ralf/.Xauthority && \
notify-send -u critical -i ~ralf/.icons/notify.png 'Shell Triggered Notify' \
"$(date +'%H:%M:%S') - $*"
Monday, 11 May 2009
How to Boot a Floppy Image Using the Grub Bootloader
Ever faced the Problem that either your Server doesn't have a floppy drive or you can't insert a floppy into it due to it being in the Datacenter and you can't get to it?
Well as long as you can access the Console you can still Flash your BIOS/Hardware Firmware using Grub. Here is how I flashed a HP NetRaid 1M BIOS Firmware using Grub:
Reboot your Server and Flash the BIOS of your Controller, and finally you can use your HP NetRaid 1M controller with Linux 2.6.26.
NOTE: The floppy image will be read-only; all changes will be lost when the computer is rebooted. It might be handy to create a small partition on your hard drive that the operating system can write to.
Well as long as you can access the Console you can still Flash your BIOS/Hardware Firmware using Grub. Here is how I flashed a HP NetRaid 1M BIOS Firmware using Grub:
- Download the Firmware: MegaRaid 1M H.02.02 (03.09.2003 - fw_nr_1m2m_h0202_5.exe)
- Create the floppy Image (VirtualBox worked fine)
- Install syslinux (sudo apt-get install syslinux)
- Copy /usr/lib/syslinux/memdisk + your Floppy Image to /boot
- Edit /boot/grub/menu.lst
title Floppy Image Flash BIOS Netraid 1M/2M
root (hd0,0)
kernel /memdisk
initrd /netraid-1m-flash.img
Reboot your Server and Flash the BIOS of your Controller, and finally you can use your HP NetRaid 1M controller with Linux 2.6.26.
NOTE: The floppy image will be read-only; all changes will be lost when the computer is rebooted. It might be handy to create a small partition on your hard drive that the operating system can write to.
Labels:
boot problem,
floppy image,
grub,
HP netraid 1M/2M,
linux-2.6,
megaraid
Friday, 24 April 2009
VIM & GnuPG: Handling encrypted Files on-the-fly
VIM GnuPG : Plugin for transparent editing of gpg encrypted files.
This is pretty awesome and works like a charm, just download the latest version of gnupg.vim from the link above and copy gnupg.vim file to the $HOME/.vim/plugin directory.
Voila! It instantly works on filenames that have a ".gpg", ".pgp" or ".asc" suffix.
This is pretty awesome and works like a charm, just download the latest version of gnupg.vim from the link above and copy gnupg.vim file to the $HOME/.vim/plugin directory.
Voila! It instantly works on filenames that have a ".gpg", ".pgp" or ".asc" suffix.
Sunday, 12 April 2009
Friday, 10 April 2009
ext3 online resize with Ubuntu 8.10 Intrepid
root@kronos:/var/www/virtual# lvextend -L+20G /dev/data/www
Extending logical volume www to 100.00 GB
Logical volume www successfully resized
root@kronos:/var/www/virtual# resize2fs /dev/data/www
resize2fs 1.41.3 (12-Oct-2008)
Filesystem at /dev/data/www is mounted on /var/www; on-line resizing required
old desc_blocks = 5, new_desc_blocks = 7
Performing an on-line resize of /dev/data/www to 26214400 (4k) blocks.
The filesystem on /dev/data/www is now 26214400 blocks long.
That's pretty cool I remember the times when I had to - unmount the FileSystem, run fsck -f, extend the lvm, resize the FileSystem, re-run fsck, and finally mount the grown FileSystem.
Last time I extended an ext3 FileSystem you could "prepare" it so it does support online resizing later to a given FileSystem size, guess that's no longer needed.
Labels:
ext3 online resize,
lvm,
resize2fs,
ubuntu
ext3 UUID / Labels
How to show an ext3 UUID/Label:
Links:
http://linuxwiki.de/UUID
root@kronos:/dev/disk# ll
total 0
drwxr-xr-x 2 root root 160 2009-04-05 16:08 by-id
drwxr-xr-x 2 root root 60 2009-04-05 14:32 by-label
drwxr-xr-x 2 root root 220 2009-04-05 16:06 by-path
drwxr-xr-x 2 root root 100 2009-04-05 14:32 by-uuid
root@kronos:/dev/disk# ll by-uuid/
total 0
lrwxrwxrwx 1 root root 26 2009-04-05 14:32 3ad729bf-9175-4555-8b0b-306315e24db6 -> ../../mapper/kronos-swap_1
lrwxrwxrwx 1 root root 24 2009-04-05 14:32 69b52190-9ee8-45df-ae27-3d85ec9c0245 -> ../../mapper/kronos-root
lrwxrwxrwx 1 root root 10 2009-04-05 14:32 e4a14d98-639a-4246-8840-566f2959d30d -> ../../sda5
root@kronos:/dev/disk# blkid /dev/kronos/root
/dev/kronos/root: UUID="69b52190-9ee8-45df-ae27-3d85ec9c0245" TYPE="ext3"
root@kronos:/dev/disk# blkid /dev/data/www
/dev/data/www: LABEL="kronos-data-www" UUID="9ddc8509-07f4-4910-8107-8fa086293989" TYPE="ext3"
root@kronos:/dev/disk# cat /etc/fstab
# /etc/fstab: static file system information.
#
#
# /dev/mapper/kronos-root
UUID=69b52190-9ee8-45df-ae27-3d85ec9c0245 / ext3 relatime,errors=remount-ro 0 1
Links:
http://linuxwiki.de/UUID
Labels:
blkid,
ext3,
ext3 uuid,
filesystem,
fstab
Subscribe to:
Posts (Atom)
