Thursday, May 30, 2013

[solved] Extracting initramfs / initrd img fails with message "gzip: /boot/initramfs-*.img: not in gzip format"


when trying to extract initramfs using the old method (gzip) in fedora 19 (f19), fails with the following error message.

# cd `mktemp -d` && gzip -dc /boot/initramfs-fedup.img | cpio -ivd

gzip: /boot/initramfs-fedup.img: not in gzip format
cpio: premature end of archive

This is because in f19, initramfs format has been changed from gz to xz.

# file /boot/initramfs-fedup.img
/boot/initramfs-fedup.img: XZ compressed data
The solution:


cd `mktemp -d` && xz -dc /boot/initramfs-fedup.img | cpio -ivd

Change gz to xz .. :)

Monday, January 16, 2012

How to find when a process is started (process start time)?


# ps -eo pid,cmd,lstart

=====

For example to know when qemu-kvm started,

# ps -eo pid,cmd,lstart | grep qemu-kvm


Sunday, January 15, 2012

How to make firefox tabs like chrome on linux OR how to make firefox tabs appear on title bar like windows version of firefox on Linux

Firefox users on Linux get frustrated when they see tabs on the title bar of the MS Windows version of Firefox.

Its possible to have almost the same look on Firefox running on linux using the following steps. Its simple. No add ons required.

1. Open Firefox --> View --> Uncheck menu bar
2. Open a new page and type about:config in the addressbar.

Click on "I will be careful. I promise"

Look for "browser.fullscreen.autohide" and change its value to "false"

3. Now press F11, to go into full screen. Voila!!

I have tested this on Firefox 9 + Gnome3.2 running on Fedora 16 (F16)

Wednesday, July 20, 2011

How to extract multiple tar files at the same time?

# find . -iname \*bz2 -exec tar xjvf {} \;

Replace bz2 with the extension of your file. Also the tar options.

bz2 --> tar xjvf
gzip --> tar xzvf
xz --> tar xJvf

Friday, May 27, 2011

lftp --> Fatal error: Certificate verification: Not trusted

$ lftp user@test.ftp.com:/directory
Password:
cd: Fatal error: Certificate verification: Not trusted
To disable certificate verification in lftp,

$ cat ~/.lftp/rc
set ssl:verify-certificate no

Thursday, May 26, 2011

How to fix the missing system tray icons in Fedora 15 (F15) Gnome3

When starting applications such as parcellite, dropbox which needs a system tray, their icons are missing from Gnome3 system tray. The issue is caused due to a bug in Gnome3 and is fixed in the latest update.

# yum update gnome*

Once the update is finished logout ( a reboot is recommended ) and login again.

Still you cannot see the icons in system tray??
Make sure you are checking at the right place. In Gnome3 the system tray is not at the top right hand corner. It is visible at the bottom right hand corner of the activities (alt + f1) screen.

See the screen shot below,

Saturday, April 16, 2011

how to find length of a variable in BASH?

lets define a variable first,
# TEST=1234567890
to find the length of variable TEST,
# echo ${#TEST}
10
its possible to assign the length to a new variable, say LENGTH
# LENGTH=${#TEST}
# echo $LENGTH
10
now try to find the length of the following variable,
# TEST="my length is"
Technorati Tags: ,