Ext3 has 30K directory limit inside one single directory and I needed to create ~180K. Crap, I need another filesystem, which might be ext4, xfs or something like it. But I can't shutdown a production server or plug another disk. So I created one file which is big enough for my needs (let's say 100G): truncate -s 100G my_ext4_blockfile Let's format the file: mkfs.ext4 my_ext4_blockfile Now, you can mount the file wherever you like:

Read more →

I have an old-ish Sony VAIO netbook (this) which has few broken buttons on keyboard (I probably shouldn't open the case). This thing has 1.83GHz Atom CPU (yay! calculator!) and 2G RAM. This thing was sitting on the shelf since I realized that I can't bear the low CPU power. Lately decided to use it for something, but what? After little playing around, now it's really doing something as a low-powered (I hope), 7/24 open home server!

Read more →

I don't know why you exactly use --depclean for, but I just wanted to have a quick lookup which packages were safe to remove. Then I saw "Number to remove: 350". Hehe. That might be "safe" to remove but the system won't be same after I delete kde-base/kdm etc. I didn't want to deal with "searching on gentoo forums" stage and wrote a dirty one liner to see which packages are "really" the last one on the dependency tree.

Read more →

The routine..

Some inmates say that violence is the worst thing we gotta face. For me, the worst thing is the great yawn. How do you fill day after dull ass day? We got these routines that are supposed to give our lives order and meaning. But I'm here to testify that I'm less afraid of getting shanked in my back than the routine. Cause the routine, man, the routine'll kill you.

Read more →

I've rebooted my Debian and realize my ethernet card is not working. Cable seems unplugged. My hardware is: lspci | grep Ethernet 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03) Tried installing r8168 driver from Realtek website and ethernet became crazy with these messages: tail /var/log/messages | grep link Feb 15 22:34:04 debian kernel: [ 9.264536] userif-3: sent link down event. Feb 15 22:34:05 debian kernel: [ 9.

Read more →

If you're using ProFTPD with virtual users (sql) and want to use md5-hashed passwords in sql table, uncomment this line in modules.conf: ​ LoadModule mod_sql_passwd.c And edit sql.conf relevant lines like: SQLAuthTypes MD5 SQLPasswordEngine on SQLPasswordEncoding hex And don't forget to change password areas to MD5 before restarting the daemon.

Read more →

WTF?

I forgot to install fail2ban on a box. I was expecting something. But script kiddies, are you serious? ​ Nov 18 18:43:43 *** sshd[9655]: Invalid user this-is-not-an-attack from 188.95.234.6 Nov 18 18:43:43 *** sshd[9655]: Failed none for invalid user this-is-not-an-attack from 188.95.234.6 port 58982 ssh2

Read more →

Pure boredom. I edited Suse.Logo.Green KDM4, Ksplash4 and powered_by_gentoo bootsplash themes. Main concept is this: Also the links: KDM: http://goo.gl/7C8bB Ksplash: http://goo.gl/dyF0T Bootsplash: http://goo.gl/JdCXJ

Read more →

compcache

I've accidentally discovered this in kernel: compcache [link] creates block devices like /dev/zram0, acting like a swap device. But it's using RAM actually, compressed. I can feel the difference on my 1gb-ram netbook a little. It's not a new project, I don't know how did I miss this. Setting up a "ramswap" is pretty easy. Here is my /etc/conf.d/local: local_start() { modprobe zram num_devices=2 echo 67108864 > /sys/block/zram0/disksize echo 67108864 > /sys/block/zram1/disksize mkswap /dev/zram0 mkswap /dev/zram1 swapon /dev/zram0 swapon /dev/zram1 return 0 } local_stop() { swapoff /dev/zram0 swapoff /dev/zram1 echo 1 > /sys/block/zram0/reset echo 1 > /sys/block/zram1/reset return 0 } I guess you got the message ;) #EDIT: conf.

Read more →

Copying Is Theft!

I saw some *opinions* (maybe there are some organisations behind these ideas, i dunno) says "copying is not theft! i don't steal the software, i'm just copying.." and supporting the idea with: "if i steal an orange¹, the original one disappears, but if I copy it, there's no problem". Well, Mr. moron. I don't want to make you sad, but it's pure theft. People are not selling oranges in software world.

Read more →