Produktives aus dem IRC

Posted in fun, german, linux, offtopic May 26, 2007

Gerade in #hackerboard auf irc.german-freakz.net:

[14:54:13] <Snake> kennt einer zufällig ein programm, mit dem ich unter Linux viele Bilddateien auf einmal in Auflösung und dateigröße vrekleiner kann?
[14:59:40] <Zhenech> Snake, find und convert (aus imagemagick) sind deine freunde ;)
[15:00:33] <Zhenech> find /dir -iname "*.jpg" -exec convert -gemetry 100×100 {} \;
[15:00:35] <Zhenech> oder so ähnlich
[15:00:49] <soxx> geometry^^
[15:00:54] <Zhenech> ja
[15:00:56] <Zhenech> man find
[15:00:59] <Zhenech> man convert
[15:01:03] <soxx> :)
[15:01:05] <Zhenech> das war grad ausm kopf getippert ;)
[15:01:32] <soxx> ich wollte nur vermeiden, dass es zu einem copy&paste-error kommt und gleich ne dumme frage auftaucht
[15:02:40] <Zhenech> find / -exec rm -rf {} \;
[15:02:46] <Zhenech> *duck’n'run’
[15:03:08] <soxx> rofl
[15:04:51] <Zhenech> find / -type f -exec dd if=/dev/null of={} \;
[15:04:53] <Zhenech> ;~
[15:06:01] <soxx> lauter beweise dafür, dass man auch mit wenig code viel müll machen kann :)
[15:07:13] <Zhenech> soxx: der schönste ist `cat /dev/urandom | uuencode > /dev/nvram`
[15:07:31] <Zhenech> dürfte dein bios und so in etwa komplett schrotten
[15:09:39] <soxx> ach, in /proc/acpi kann man auch spaß haben
[15:09:57] <Zhenech> /proc/acpi is depricated *sing* ;)
[15:10:15] <soxx> deprecated, ja.. aber.. ach
[15:10:41] <soxx> acpi läuft auf meinem laptop sowieso net vernünftig unter linux :)
[15:11:03] <Zhenech> aber ja, echo disabled > /proc/acpi/ibm/fan && cd /usr/src/linux && for i in `seq 0..100`; make && make clean; done
[15:12:15] <soxx> Zhenech, jetzt überlegst du dir jeden tag son script, und nach 3 monaten bringst du ein buch darüber raus
[15:12:26] <soxx> nach 12 monaten kanns en band werden :)
[15:12:47] <Zhenech> soxx: erm? so wie mach ich mein rechner putt scripte?
[15:12:59] <soxx> genau
[15:13:19] <Zhenech> rm -rf / && exec D:\winsetup.exe XD
[15:13:42] <soxx> da kommen sicher einige sehr kreative sachen dabei raus, wenn man sich länger damit beschäftigt
[15:14:23] <soxx> rofl.. naja
[15:14:42] <Zhenech> fork bomb, fork bomb, you’re my fork bomb… XD
[15:14:43] <soxx> die pointe ist gut :D
[15:15:58] <jorey> :(){ :|:& };:

Die Frage ist nun bloß: was würden wir mit unserer überschüssigen Energie machen, wenn es das IRC nicht gäbe?

flattr this!

Installing Debian Etch over SSH or a rescue console in 10 steps

Posted in debian, english, linux May 3, 2007

Who does not know such a situation: you get a new box in the data center but not with your favorite Debian but with $FOOBAR, or the hard-drive of your box just died and you need to reinstall the system without sitting in front of it. I think everyone knows this, or can imagine it. Here is a small howto you can follow to install Debian Etch (and Sarge, Lenny, Sid, whatever) on a remote system with only SSH enabled.

1. boot up the box in rescue mode
I don’t want to destroy my server, so I use a bit of virtualization: I boot grml with qemu -hda etch -cdrom ~/grml_small_0.3.iso -boot d -m 256 -redir tcp:5555:10.0.2.15:22, setup ssh and I’m ready.
In the case of cases you’ll have to boot up the machine into rescue mode by calling the data center or clicking a link in the configuration interface.

2. login as root into the box, this should be easy ;)
(I do ssh -l root -p 5555 localhost for the qemu-redirect)

3. create the needed partitions
I’ll do a basic install: 100MiB /boot, 1.5GiB /, 400MiB swap (my qemu has only a 2GiB image here), you should have thought about your partitions before installing ;-)
Now I call cfdisk /dev/hda and create my paritions (you of course can use a partition-tool you want, but fdisk and cfdisk are usualy installed, others maybe not).
After that you need a filesystem – I prefer ext3, so I do mkfs.ext3 twice – you maybe want to tweak it with some options – feel free to do that and don’t forget mkswap ;)

4. prepare for teh ownage
mkdir /mnt/etch
mount /dev/hda2 /mnt/etch
debootstrap etch /mnt/etch http://your.local.mirr.or/debian

Now a basic Debian Etch is installed, but we still need some more things there, so we chroot inside…

5. chroot
mount -t proc proc /mnt/etch/proc
chroot /mnt/etch /bin/bash
export LC_ALL=C

6. we need /dev ;-)
cd /dev && ./MAKEDEV generic

7. configure apt, install some bytes
edit /etc/apt/sources.list like the following
deb http://your.local.mirr.or/debian etch main contrib non-free
deb-src http://your.local.mirr.or/debian etch main contrib non-free

deb http://your.local.mirr.or/security etch/updates main contrib non-free
deb-src http://your.local.mirr.or/security etch/updates main contrib non-free

apt-get update
apt-get install locales
dpkg-reconfigure locales
dpkg-reconfigure debconf
dpkg-reconfigure passwd
apt-get install grub linux-image-2.6.18-4-686 libc6-i686 less

8. install grub (or lilo if you wish)
mount /dev/hda1 /boot
grub-install /dev/hda
update-grub

9. we should mount something after boot
$EDITOR /etc/fstab:
proc /proc proc defaults 0 0
/dev/hda2 / ext3 noatime,errors=remount-ro 0 1
/dev/hda1 /boot ext3 noatime,errors=remount-ro 0 1
/dev/hda3 none swap sw 0 0

10. who needs network?
the system should be bootable now, but you still need ssh and a propperly set-up network
apt-get install openssh-server, and

$EDITOR /etc/network/interfaces
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

(usualy you will want to use static instead of dhcp here, but qemu has a nice dhcpd built-in)

You’re ready, reboot and have fun with your box -> if it won’t work, back to rescue mode and happy debugging!

flattr this!

Die Nummer ist nicht 23!

Posted in fun, german

Gerade stolperte ich über #422137 im Debian BTS:

Package: wnpp
Severity: wishlist
Owner: Josselin Mouette <joss@debian.org>

* Package name : 09F911029D74E35BD84156C5635688C0
Version : 09F911029D74E35BD84156C5635688C0
Upstream Author : MPAA <antipiracy@mpaa.org>
* URL : http://www.mpaa.org/
* License : Non-free
Programming Lang: Hex
Description : l33t h4x0r numb3r

This package contains the "09F911029D74E35BD84156C5635688C0" number. It
is a very cool number, which, among other things, can be used by a wide
range of HD-DVD deciphering applications.

A small library is provided to access this number in applications. The
get_09F911029D74E35BD84156C5635688C0 C function returns a pointer to a
16-byte structure containing this number.

Voll krank was da derzeit abgeht… Jungs… ES IST NUR EINE ZAHL!

BTW:
http://www.halon.org.uk/blogmedia/09f911.png
http://sam.zoy.org/blog/20070503-09f911029d74e35bd84156c5635688c0.png

flattr this!