sexta-feira, 30 de abril de 2010

Linux: Writing udev rules

The base name for your external USB device is /dev/sdb. Next, use udevinfo command with /dev/sdb as an argument to get model attribute:

$ udevadm info -a -p /sys/block/sdb/ | grep model

Now, that we have model attribute, we can add it to /etc/udev/rules.d/50-udev-alias.rules by following line:

KERNEL=="sd*[0-9]", ATTRS{model}=="DataTraveler 2.0", OPTIONS="all_partitions", SYMLINK+="kingston%n", GROUP="disk", MODE="0660"

Reload udev daemon:

sh /etc/rc.d/rc.udev force-reload

Plug-in pendrive and your new base name is: /dev/kingston1

quinta-feira, 15 de abril de 2010

Slackware: GRUB2

Depois de instalado o GRUB2, remova o lilo do MBR por meio do comando:

lilo -u /dev/sda

Ou por meio do comando:

dd if=/dev/zero of=/dev/sda bs=440 count=1

Grave o GRUB2 na MBR:

grub-install /dev/sda

Gere o arquivo de configuração do GRUB2:

grub-mkconfig -o /boot/grub/grub.cfg

Exemplo de grub.cfg:

...
menuentry "GNU/Linux, with Linux 2.6.33-smp" --class gnu-linux --class gnu --class os {
set root='(hd0,3)'
search --no-floppy --fs-uuid --set c0c4a270-18d8-4371-b303-3407c25bfd5b
echo Loading Linux 2.6.33-smp ...
linux /boot/vmlinuz root=/dev/sda3 ro
initrd /boot/vmlinuz
}
menuentry "GNU/Linux, with Linux 2.6.33-smp (recovery mode)" --class gnu-linux --class gnu --class os {
set root='(hd0,3)'
search --no-floppy --fs-uuid --set c0c4a270-18d8-4371-b303-3407c25bfd5b
echo Loading Linux 2.6.33-smp ...
linux /boot/vmlinuz root=/dev/sda3 ro single
initrd /boot/vmlinuz
}
menuentry "Windows XP" {
set root=(hd0,2)
chainloader +1
}

quinta-feira, 8 de abril de 2010

Slackware: Eclipse crashes with Seamonkey lib

Uma solução eh remover o pacote Seamonkey.

Outra solução é editar o arquivo eclipse.ini e adicionar a linha:

-Dorg.eclipse.swt.browser.XULRunnerPath

A arquivo fica assim:
...
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dorg.eclipse.swt.browser.XULRunnerPath
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m

Drunk Penguins

Drunk Penguins
Drunk Penguins