Yesterday while shrinking a filesystem my computer got stock due a hardware failure: [root@mirror /]# resize2fs -p /dev/mapper/vg_mirror-LogVol03 410G resize2fs 1.41.14 (22-Dec-2010) Resizing the filesystem on /dev/mapper/vg_mirror-LogVol03 to 107479040 (4k) blocks. Begin pass 2 (max = 15391251) Relocating blocks XXXXXXXXXXXXXXXXXXXXXX—————— Booted from a DVD in the rescue environment, mounted the filesystem and everything was OK. The size was still the original. I performed an e2fsck and then tried again. Apparently, the “Relocating blocks” part doesn’t cause any corruption if interrupted 馃榾Ayer mientras achicaba un filesystem mi computadora se freezo por un problema de hardware: [root@mirror /]# resize2fs -p /dev/mapper/vg_mirror-LogVol03 410G resize2fs 1.41.14 (22-Dec-2010) Resizing the filesystem on /dev/mapper/vg_mirror-LogVol03 to 107479040 (4k) blocks. Begin pass 2 (max = 15391251) Relocating blocks[…]

I was used to have a rsync call in my crontab to perform backup from my laptop to my desktop. My idea was to backup my laptop everyday even if I wasn’t at home, so before the time that the rsync ran I had to make sure that I was connected to my home network via OpenVPN and that my desktop was on. If the day was calm, no problem, but when I was busy at work that meant no backup for that day. I decided to code my own script to solve this problem. #!/bin/bash export DISPLAY=:0 #Vars for remote computer DSTUSR=user DSTROOT=root DSTIP=192.168.1.2 DSTFOLDER=/path/to/destionation/backup/folder/ #Vars for my OpenWrt router LINKSYS=192.168.1.1 LINKSSHPORT=22 LINKUSER=root PCTRL=0 PCTRL2=0 #this part checks if[…]

In order to allow a user to run a single command as root using sudo run the following as root: echo “user ALL= NOPASSWD : /bin/file” >> /etc/sudoers Where user is the specified username and /bin/file if the path to the binary that we are allowing this user to run. If you want to do further changes to the sudoers file it’s recommended to use the command ‘visudo’ to do so.Para poder hacer esta tarea solo tenemos que ejecutar el siguiente comando como root: echo “user ALL= NOPASSWD : /bin/file” >> /etc/sudoers Donde user es el usuario al que le queremos dar permisos y /bin/file es la direcci贸n o path es el archivo binario que le vamos a permitir ejecutar.[…]

In order to setup this card, you have to add these parameters to /etc/modprobe.d/bttv.conf cat << EOF > /etc/modprobe.d/bttv.conf alias char-major-81 videodev alias char-major-81-0 bttv options bttv pll=1 card=120 radio=1 tuner=38 remote=1 bttv_verbose=1 gbuffers=4 EOF Then, reinitialize the appropriate module: # rmmod bttv; modprobe bttv Install tvtime that is my recommended program to watch the TV. # yum install tvtime Configure tvtime with your norm (in my case PAL-Nc) and scan for channels. $ tvtime-configure -n PAL-Nc $ tvtime-scanner Run tvtime from your GNOME/KDE menu or running ‘tvtime’ . For others linux distributions, like ubuntu the procedure may be similar. Para configurar esta capturadora, primero tenemos que configurar los par谩metros en /etc/modprobe.d/bttv.conf cat << EOF > /etc/modprobe.d/bttv.conf alias char-major-81 videodev[…]

Thanks to Mathieu Bouffard, he helped me to to workaround the issue with my mic in Acer Aspire One 1410. Issue: Somehow the ALSA driver is trying to pass to PulseAudio an stereo output that PulseAudio doesn’t understand. Solution: Use jackd as a “proxy” between ALSA and PulseAudio, jackd will capture the input in mono from the ALSA driver, and pass it to PulseAudio. Download his module for PulseAudio: # yum install pulseaudio-module-jack Configure PulseAudio to no auto respawn when killed. echo “autospawn = no” > ~/.pulse/client.conf Create a file in our home directory ~/jackd.pa #!/usr/bin/pulseaudio -nF ### # these modules will connect to JACK load-module module-jack-sink load-module module-jack-source ### #add-autoload-sink output module-jack-sink channels=2 #add-autoload-source input module-jack-source channels=2 #load-module module-esound-protocol-unix[…]