Archive for the ‘HowTo’ Category

folks…thats for you: how to extract a initrd file

$ gzip -dc /boot/initrd-2.6.32.23-0.3-default | cpio -id ….

pv – monitor the progress of data through a pipe

I’ve found a very nice tool pv… $ dd if=/dev/sda1 | pv | dd of=backup.img 359MB 0:00:05 [75.3MB/s] [ <=> ]

Create a shared disk for VMware ESX guests

To create a shared disk between two or more VMs, login into one of your ESX hosts and create a disk image. cd /vmfs/volumes/#volume-name#/#vm-name#/; vmkfstools -d thick -a lsilogic -c 50G shareddisk.vmdk; Add the new hardrive to the guest(s) and select a new SCSI bus (like SCSI 2:0). VMware create a new SCSI controller. Set [...]

Linux routing basics

You getting from your ISP a subnet like this 172.30.26.16/28, and your router has the ip 172.30.26.17 ! You need to enable the ip forwarding in the kernel sysctl -w net.ipv4.ip_forward=1 And we need to enable proxy arp! This is necessary because your router must answer all arp request for hosts other than itself sysctl [...]

Ubuntu PHP hardening with Suhosin

Ubuntu includes the php suhosin patches…. Install suhosin extension aptitude install php5-suhosin /etc/php5/{apache2,cli,cgi}/php.ini ; suhosin parameters suhosin.executor.include.max_traversal = 4 suhosin.executor.disable_eval = On suhosin.executor.disable_emodifier = On suhosin.mail.protect = 2 suhosin.sql.bailout_on_error = On Restart apache service apache2 restart Sometimes it could be necessary to set suhosin.session.encrypt to off for some login scripts.

How to delete a command from the bash history / Hide an command from the bash history

Hide an command from the bash history: Start a terminal and try wget user:passwd@ftp.example.com/secret.tar.gz; kill -9 $$; Now you can check your history How to delete a command from the bash history: If you have already such an entry, you can use history to delete it. history # [...] # 849 uname -a # 850 [...]

ZTE MF637 unter Ubuntu

Um den ZTE MF637 oder auch T-Mobile W’n’W Stick Fusion unter Ubuntu zum laufen zubekommen, braucht man den Stick (leider) nur einmal auf einem Windows installieren – sprich die Treiber, und sich dann via Hyperterminal auf den Diagnose Port zuverbinden und folgendes Kommando ausführen: AT+ZCDRUN=8 Damit wird der Autostart vom Stick, also das virtuelle CD-ROM [...]

DD-WRT PPPoE Passthrough (on WRT54G)

For a PPPoE Passthrough on DD-WRT, enable jffs and do the following steps on a *nix-based system cd /tmp; wget http://kamikaze.openwrt.org/8.09.1/brcm-2.4/packages/rp-pppoe-relay_3.10-1_mipsel.ipk; tar zxf rp-pppoe-relay_3.10-1_mipsel.ipk; tar zxf data.tar.gz; scp usr/sbin/pppoe-relay root@:/tmp/ Start the relay agent on the router /tmp/pppoe-relay -S vlan1 -C br0 Now you can start your pppoe client on your notebook. Tested with a [...]

XEN: clocksource/0 Time went backwards

Everybody know about these sweet line(s): clocksource/0: Time went backwards: delta=-5802595381342 shadow=440273248432 offset=11586903 To prevent this, add this line to your sysctl.conf xen.independent_wallclock=1 Next is, to add extra=”clocksource=jiffies” to the config of your XEN domain (like /srv/xen/build.conf). After all this, you can reboot the vm’s or to get it working for your current kernel config [...]

Debian Lenny – OCF Resource Agent o2cb Bug

Lenny Stable ? Ohne RC-Bugs ? Im heartbeat Paket hat sich ein kleiner Fehler versteckt (ist schon gemeldet). Wenn ihr versucht, mit heartbeat eine ocfs2 Resource via o2cb zumanagen, wird das nicht gehen Der Grund ist, dass ein $ vergessen wurde im OCF Resource Script (Zeile 314). Folge ist, dass die ocfs2/o2cb Resource nicht startet. [...]