linux

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

QEMU / KQEMU

create image
qemu-img create -f qcow2 xp.img 8G

install windows
qemu -hda xp.img -cdrom xppro.iso -boot d -net nic

run windows
qemu -hda xp.img -cdrom ../download/iso/xppro.iso -boot d -net nic -usb -usbdevice table

# optional
# test # -kernel-kqemu

Links
http://wiki.ubuntuusers.de/QEMU
http://qemu-buch.de/d/Netzwerkoptionen/_Netzwerkdienste/_PXE

Compile xserver-xorg-video-ati-6.6.3 under hardy

apt-get install -y dpkg-dev autoconf libtool fakeroot
mv /etc/apt/sources.list /etc/apt/sources.list.org
 
cat <<EOF>> /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ feisty main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu/ feisty main universe multiverse restricted
EOF
 
apt-get update
apt-get source xserver-xorg-video-ati
 
mv /etc/apt/sources.list.org /etc/apt/sources.list
apt-get update
 
sudo apt-get -y build-dep xserver-xorg-video-ati
 
cd xserver-xorg-video-ati-6.6.3
fakeroot ./debian/rules prepare
fakeroot ./debian/rules patch
faker

mkHomeBackup.sh

#!/bin/bash
 
for i in $(ls /home/); do
	if [ -d /home/${i} ]; then	
		echo ${i}
		tar -cjf /home/${i}.$(date -I).tar.bz2 /home/${i}
	fi
done

gbrainy - a brain teaser game

#!/bin/bash
 
sudo apt-get install gbrainy

Daily reboot Endian

cat <<EOF> /etc/cron.daily/reboot
#!/bin/sh
 
shutdown -r 1:30:00
EOF
 
chmod a+x /etc/cron.daily/reboot
 
 /etc/init.d/fcron restart

Backup and block data copy with dump device (dd)

# save partition / disk to image
dd if=/dev/hda bs=16065b | gzip -9 > hda_backup.dd.gz
 
# restore partition / disk from image
gunzip -dc hda_backup.dd.gz | dd of=/dev/hda bs=16065b
 
# copy over network
netcat -l -p 1234 | dd of=/dev/hdc bs=16065b
dd if=/dev/hda bs=16065b | netcat TARGET_IP 1234
 
# backup mbr
dd if=/dev/hda of=mbr.img bs=512 count=1 
 
# restore mbr (better will by bs=446)
dd if=bs.img of=/dev/hda bs=512 count=1 

Install stress test

# install
sudo apt-get install -y stress
 
stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 600s
 
# LINKS
http://packages.ubuntu.com/saucy/stress

rsync

# rsync only files matching pattern
rsync -avz --include "*_small.jpg" --exclude "*.jpg" dir1/ dir2/
rsync -avz --include "*/" --include "*.jpg" --exclude "*" dir1/ dir2/
rsync -avz --include "*/" --include "**.svn**" --exclude "*" just-checked-out/ old-and-modified/
 
# rsync over ssh
rsync -are ssh root@192.168.1.2:/data/bilder /mnt/

Create LiveCD with Debian live-helper

# test
 
apt-get install live-helper cdebootstrap
 
cat <<EOF>> /usr/share/cdebootstrap/suites
Suite: hardy
Config: generic-ubuntu
Keyring: ubuntu-archive-keyring.gpg
EOF
 
# sed
/usr/bin/lh_chroot_sources
${LH_DISTRIBUTION}/updates
${LH_DISTRIBUTION}-updates
 
mkdir ~/live && cd ~/live
 
lh_build
 
http://clemensfam.org/john/?p=39

find

# Links
http://www.ostc.de/howtos/find-HOWTO.txt
Syndicate content