lunes, 19 de noviembre de 2012

viernes, 7 de septiembre de 2012

Falla actualización de fontconfig

Migré mi notebook de Debian Wheezy AMD64 a Arch sobre misma plataforma.
Luego de instalar KDE y configurar todo, este es el primer problema que me surgió queriendo actualizar el sistema.

$ sudo pacman -Syu

 ...

error: failed to commit transaction (conflicting files)
fontconfig: /etc/fonts/conf.d/20-unhint-small-vera.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/29-replace-bitmap-fonts.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/30-metric-aliases.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/30-urw-aliases.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/40-nonlatin.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/45-latin.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/49-sansserif.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/50-user.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/51-local.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/60-latin.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/65-fonts-persian.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/65-nonlatin.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/69-unifont.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/80-delicious.conf exists in filesystem
fontconfig: /etc/fonts/conf.d/90-synthetic.conf exists in filesystem
Errors occurred, no packages were upgraded.

...

El problema lo solucione con:

$ sudo pacman -Suf fontconfig

Más sobre el detalle del inconveniente en:

http://www.archlinux.org/news/fontconfig-2101-update-manual-intervention-required/

Con lo cual, veo que es importante estar subscrito a los boletines de noticias del mundo Arch.

martes, 28 de agosto de 2012

Genkernel aborta compilando el kernel 3.4.9 Gentoo Stable

Intentando actualizar mi Gentoo con el kernel 3.4.9, daba un error y abortaba la compilación en el modulo scsi de fiber channel.
El problema estaba en el modulo CONFIG_SCSI_LPFC=m, lo comente en el archivo /usr/src/linux/.config y luego pude compilar el kernel sin problemas usando Genkernel.
Parece que este problema era conocido en el kernel 3.4 y fue solucionado por el upstream, pero en Gentoo el bug todavía persiste.

miércoles, 22 de agosto de 2012

How to Install Gentoo as a Desktop

In 2008 I started to made a research on different sites on Internet in order to get a lot of information about how difficult would be to install Gentoo as a desktop system with preferences like lvm. Then I decided to wrote this guide.
Is very technical, with many steps without explanation and sorry for my bad english.  
Perhaps in this days this guide it seems very old information regards Gentoo, but it remind me how I wasted the time in front of the computer compiling for hours and days ... 

In my opinion Gentoo is so far the most powerfull system for people who likes run GNU/Linux with total control of it and help you a lot to learn and understand how Unix like system works.

Primary source: http://www.gentoo.org/doc/en/list.xml?desc=1


Argentina mirrors
http://gentoo.localhost.net.ar/
ftp://mirrors.localhost.net.ar/pub/mirrors/gentoo

Booting installation cd
# gentoo acpi=on console=ttyS0,9600,8,n,1 dopcmcia doscsi nogpm nodmraid nofirewire nosata nosmp nosound dolvm docache dosshd passwd=password nox nonfs

Test your local ram for errors
# memtest86

Load required modules
# lspci
# modprobe xxx


Changing the root password
# passwd
New password: (Enter your new password)
Re-enter password: (Re-enter your password)


Starting the SSH daemon
# /etc/init.d/sshd start

Set the root password
# passwd


Configure networking the guided way
# net-setup eth0

Using dhcpcd
# dhcpcd eth0


Showing the current wireless settings
# iwconfig eth0


Changing ESSID and/or adding WEP key
# iwconfig eth0 essid GentooNode
# iwconfig eth0 key 1234123412341234abcd
# iwconfig eth0 key s:some-password

Create the partitions
# fdisk /dev/hda

# fdisk -l /dev/hda
Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         249      125464+  83  Linux
/dev/hda2             250        2250    --------   83  Linux
/dev/hda3            2251       77520    --------   8e  Linux LVM
Loading the LVM2 module
# modprobe dm-mod

Preparing the partitions
# pvcreate /dev/hda3

Creating volume group

# vgcreate vg0 /dev/hda3
Activating LVM
# vgchange -a y

Directory Size File system
/boot   128 MB  ext2        /dev/hda1
/   1 GB reiserfs    /dev/hda2
/usr   6 GB reiserfs
/usr/src 3 GB reiserfs /usr/local   1 GB reiserfs
/usr/portage 1 GB ext2, 1024 b
/usr/shar/games  5 GB ext2
/opt   1 GB reiserfs
/var   2 GB reiserfs
/var/log       1 GB  reiserfs/tmp   1 GB ext2
/home      10 GB reiserfs
swap     1 GB none

Creating logical volumes
# lvcreate -L 4G -n usr vg0
# lvcreate -L 1G -n portage vg0
# lvcreate -L 3G -n portaged vg0
# lvcreate -L 3G -n portaget vg0
# lvcreate -L 1G -n opt vg0
# lvcreate -L 1G -n var vg0
# lvcreate -L 1G -n tmp vg0
# lvcreate -L 10G -n home vg0
# lvcreate -L 1G -n swap vg0
# vgs
# lvs

Creating the filesystems
# mke2fs /dev/hda1
# mkreiserfs /dev/vg0/root
# mkreiserfs /dev/vg0/usr
# mke2fs -b 1024 -N 200000 /dev/vg0/portage
# mke2fs -b 4096 -T largefile /dev/vg0/portaged
# mke2fs -b 1024 -N 200000 /dev/vg0/portaget
# mkreiserfs /dev/vg0/opt
# mkreiserfs /dev/vg0/var
# mke2fs /dev/vg0/tmp
# mkreiserfs /dev/vg0/home
# mkswap /dev/vg0/swap
# swapon /dev/vg0/swap

Mount the file systems
# mount /dev/vg0/root /mnt/gentoo
# cd /mnt/gentoo
# mkdir boot usr mnt mnt/portage mnt/portaget mnt/portaged opt var tmp home
# mount /dev/hda1 /mnt/gentoo/boot
# mount /dev/vg0/usr /mnt/gentoo/usr
# mount /dev/vg0/portage /mnt/gentoo/mnt/portage
# mount /dev/vg0/portaged /mnt/gentoo/mnt/portaged
# mount /dev/vg0/portaget /mnt/gentoo/mnt/portaget
# mount /dev/vg0/home /mnt/gentoo/home
# mount /dev/vg0/opt /mnt/gentoo/opt
# mount /dev/vg0/tmp /mnt/gentoo/tmp
# mount /dev/vg0/var /mnt/gentoo/var
# chmod 1777 /mnt/gentoo/tmp

Unpacking the stage
# cd /mnt/gentoo
# tar xvjpf stage3-*.tar.bz2


Opening /etc/make.conf
# nano -w /mnt/gentoo/etc/portage/make.conf

Edit the following line
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
MAKEOPTS="-j2" # 1 CPU with 2 cores

Selecting mirrorsmirrorselect -i -o >> /mnt/gentoo/etc/portage/make.confmirrorselect -i -r -o >> /mnt/gentoo/etc/portage/make.conf

Copy over DNS information
# cp -L /etc/resolv.conf /mnt/gentoo/etc/

Mounting /proc and /dev
# mount -t proc none /mnt/gentoo/proc
# mount --rbind /sys /mnt/gentoo/sys
# mount --rbind /dev /mnt/gentoo/dev
Chrooting into the new environment
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# export PS1="(chroot) $PS1"


Installing the Portage tree
# emerge-webrsync 
If the process needs to update portage, please do it, if no skip this step.
# emerge -u portage
# emerge --sync

Using the stage called stage3-i686-2008.0.tar.bz2, there is a conflict updating the package called e2fsprogs. It is neccesary to remove the old packages  and then install the new ones. I hope it will be fix in the following snapshots of the stage3.
# emerge -pu sys-fs/e2fsprogs
# emerge -pC sys-libs/ss sys-libs/com_err sys-fs/e2fsprogs
# emerge -C sys-libs/ss sys-libs/com_err sys-fs/e2fsprogs
# emerge sys-fs/e2fsprogs

Install eselect for easy manipulation of profile
# emerge eselect

Changing profiles with eselect
# eselect profile show
# eselect profile list
# eselect profile set default/linux/x86/10.0/desktop
# eselect profile show

Changing profiles manual way
# ls -l /etc/make.profile
# ln -snf /usr/portage/profiles/<profile name> /etc/make.profile
No-Multilib Profile will only include the 64-bit capabilities -- no 32-bit included. To switch from multilib to no-multilib later is possible, just switch your profile, merge grub-static replacing grub, and remerge gcc, sandbox, and glibc. The reverse is not possible.

Opening /etc/locale.gen
# nano -w /etc/locale.gen
# locale-gen

Update gcc and glibc versions
# emerge -u gcc glibc

Recompile all world
# emerge -e world
It takes about four hours.
If you like not to spend many hours make
# emerge -e system

Setting the timezone information
# ls /usr/share/zoneinfo
# cp /usr/share/zoneinfo/America/Argentina/Buenos_Aires /etc/localtime
# nano -w etc/env.d/02locales
# nano -w etc/conf.d/consolefont

Installing a kernel source
# emerge gentoo-sources

Invoking menuconfig
# cd /usr/src/linux If you have and old .config file, please copy to folder above and then execute: # make oldconfig
# make menuconfig

Selecting correct processor family
Processor type and features --->
(Change according to your system)
(Athlon/Duron/K7) Processor family

Selecting necessary file systems
File systems --->
Pseudo Filesystems --->
[*] /proc file system support
[*] Virtual memory file system support (former shm fs)

(Select one or more of the following options as needed by your system)
<*> Reiserfs support
<*> Ext3 journalling file system support
<*> JFS filesystem support
<*> Second extended fs support
<*> XFS filesystem support

Selecting PPPoE necessary drivers
Device Drivers --->
Networking Support --->
<*> PPP (point-to-point protocol) support
<*> PPP support for async serial ports
<*> PPP support for sync tty ports

Activating SMP support
Processor type and features --->
[*] Symmetric multi-processing support

Activating USB Support for Input Devices
Device Drivers --->
[*] HID Devices --->
<*> USB Human Interface Device (full HID) support

Enabling PCMCIA support
Bus options (PCI, PCMCIA, EISA, MCA, ISA) --->
PCCARD (PCMCIA/CardBus) support --->
<*> PCCard (PCMCIA/CardBus) support
(select 16 bit if you need support for older PCMCIA cards. Most people want this.)
<*> 16-bit PCMCIA support
[*] 32-bit CardBus support
(select the relevant bridges below)
--- PC-card bridges
<*> CardBus yenta-compatible bridge support (NEW)
<*> Cirrus PD6729 compatible bridge support (NEW)
<*> i82092 compatible bridge support (NEW)
<*> i82365 compatible bridge support (NEW)
<*> Databook TCIC host bridge support (NEW)

Selecting the LVM2 module in a 2.6.x kernelDevice Drivers --->
Multi-device support (RAID and LVM) --->
[*] Multiple devices driver support (RAID and LVM)
< > RAID support
<M> Device mapper support

# emerge grub

Grub.conf for genkernel users
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 2.6.24-r5
root (hd0,0)
kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3 udev vga=869 console=tty1 resume=/dev/sda2
initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5

title Gentoo Linux 2.6.24-r5
root (hd0,0)
kernel /boot/kernel-2.6.24-gentoo-r5 root=/dev/sda3

title Gentoo Linux 2.6.24-r5 (rescue)
root (hd0,0)
kernel /boot/kernel-2.6.24-gentoo-r5 root=/dev/sda3 init=/bin/bb

# Only in case you want to dual-boot
title Windows XP
rootnoverify (hd0,5)
makeactive
chainloader +1
Creating /etc/mtab
# grep -v rootfs /proc/mounts > /etc/mtab
Running grub-install
# grub-install --no-floppy /dev/hda

Compiling the kernel2a
# make -j 5 && make -j 5 modules_install
Update modules # update-modules
Installing the kernel
# cp arch/i386/boot/bzImage /boot/kernel-2.6.24-gentoo-r5

Emerging genkernel
# emerge genkernel
# genkernel --menuconfig all --lvm # or # genkernel all
Checking the created kernel image name and initrd
# ls /boot/kernel* /boot/initramfs*

Adding the LVM2 module into /etc/modules.autoload.d/kernel-2.6
# nano -w /etc/modules.autoload.d/kernel-2.6
dm-mod

Emerging the LVM2 package
# emerge lvm2

Opening /etc/fstab
# nano -w /etc/fstab

Extract of /etc/fstab
/dev/hda1 /boot ext2 noatime 1 2
# Logical volumes
/dev/vg0/swap none swap sw 0 0
/dev/vg0/root / reiserfs noatime 0 1
/dev/vg0/portaged
/dev/vg0/usr /usr reiserfs noatime 0 0
/dev/vg0/portage /mnt/portage ext2 noatime 0 0
/dev/vg0/portaged /mnt/portaged ext2 noatime 0 0
/dev/vg0/portaget /mnt/portaget ext2 noatime 0 0
/dev/vg0/home /home reiserfs noatime 0 0
/dev/vg0/opt /opt reiserfs noatime 0 0
/dev/vg0/tmp /tmp ext2 noatime 0 0
/dev/vg0/var /var reiserfs noatime 0 0
# External devices
/dev/hdc /mnt/cdrom auto noauto,ro,user,nosuid,nodev 0 0
/dev/sdd1 /mnt/usbdisk auto noatime,users,rw,noauto 0 0

Setting the host name
# nano -w /etc/conf.d/hostname
HOSTNAME="tux"

Setting the domainname
# nano -w /etc/conf.d/net
dns_domain_lo="homenetwork"

Opening /etc/conf.d/net for editing
# nano -w /etc/conf.d/netManually setting IP information for eth0
config_eth0=( "192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" )
routes_eth0=( "default via 192.168.0.1" )

Automatically obtaining an IP address for eth0
config_eth0=( "dhcp" ) or 'dhclient' for dhcp from isc
dhcp_eth0="nodns nontp nonis"

Adding net.eth0 to the default runlevel
# cd /etc/init.d
# ln -s net.lo net.eth0
# rc-update add net.eth0 default

Opening /etc/hosts
# nano -w /etc/hosts
127.0.0.1 tux.homenetwork tux localhost

Installing pcmciautils
# emerge pcmciautils

Setting the root password
# passwd

Opening /etc/rc.conf
# nano -w /etc/rc.conf

Opening /etc/conf.d/keymaps
# nano -w /etc/conf.d/keymaps
KEYMAP="la-latin1"

Opening /etc/conf.d/clock
# nano -w /etc/conf.d/clock
CLOCK="UTC"
TIMEZONE="America/Argentina/Buenos_Aires"

Installing a system logger
# emerge syslog-ng
# rc-update add syslog-ng default

Installing a cron daemon
# emerge vixie-cron
# rc-update add vixie-cron default
# emerge acpid
# rc-update add acpid default
# emerge gentoolkit
# emerge reiserfsprogs
# emerge eselect
# emerge pciutils
# emerge usbutils
# emerge sudo
Installing slocate
# emerge slocate

File System Tools
# emerge reiserfsprogs

Installing dhcpcd
# emerge dhcpcd 

# emerge dhcp

Installing ppp
# emerge ppp

# grep -v rootfs /proc/mounts > /etc/mtab

Unmounting all partitions and rebooting
# exit
# umount -a
# reboot

Adding a user for day-to-day use
# useradd -m -G users,wheel,audio -s /bin/bash john
# passwd john

Removing the stage3 tarball
# rm /stage3-*.tar.bz2*

Removing the Portage snapshot
# rm /portage-latest.tar.bz2*

Configure Audio
# emerge alsa-utils
# nano -w /etc/modules.d/alsa
# rc-update add alsasound boot
# alsaconf
# alsamixer
# alsactl store

# emerge netplug
# emerge coldplug
# emerge ccache

Wireless interface
# emerge wireless-tools
# emerge ipw2200-firmware

Update system
# emerge --sync
# emerge -uvDN world
In this point you can make a backup in order to not make all this work again.

Install Xorg server
# emerge xorg-x11
# env-update

Generating an xorg.conf file
# Xorg -configure
Testing the xorg.conf.new file
# X -config /root/xorg.conf.new

Semi-Automatic Generation of xorg.conf
# xorgconfig

Using xorgcfg
# xorgcfg
# xorgcfg -textmode

Starting X
# startx

# source /etc/profile
# rc-update add dbus default
# emerge freefonts terminus-font corefonts

Emerging Fluxbox
# emerge fluxbox xlockmore

Editing your xinit
$ echo "exec startfluxbox" > ~/.xinitrc

Login Manager
# emerge slim
# rc-update add xdm default

Editing /etc/conf.d/xdm
DISPLAYMANAGER="slim"

Installing styles and artwork
# emerge commonbox-styles commonbox-styles-extra fluxbox-styles-fluxmod gentoo-artwork

Emerging Fluxbox Syntax
# emerge fluxbox-syntax

If you like KDE emerge kde or 'kdebase-startkde'
# emerge kdebase-startkde
or if you prefer GNOME
# emerge gnome-light
There are other desktop like windowmaker, blackbox, enlightenment, xfce

Extras

File examples:

make.conf

CFLAGS="-O2 -march=core2 -mtune=core2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"
CHOST="x86_64-pc-linux-gnu"

SYNC="rsync://rsync.samerica.gentoo.org/gentoo-portage"
GENTOO_MIRRORS="ftp://mirrors.localhost.net.ar/pub/mirrors/gentoo http://gentoo.localhost.net.ar/"

USE="smp multilib -ipv6 -selinux pcmcia acpi -apm dbus dri hal avahi java javascript unicode -gpm xinerama alsa cdr dvd dvdr dvdread mmx mp3 mpeg mplayer ffmpeg nsplugin ogg sse sse2 sse3 png xpm jpeg jpeg2k truetype vcd vorbis win32codecs wmf wxwindows h264 xine xv xvid logrotate aac wma lame cdda cups ppds -arts gnome gtk gtk2 lm_sensors pmu bash-completion branding bzip2 hddtemp xosd X tcpd opengl scanner ncurses zlib xulrunner kde qt3 qt4 flac firefox ftp gd gif gimp gnome-keyring gphoto2 gps gzip gstreamer gtkhtml imagemagick imlib ipod lzo mad maildir imap mbox msn yahoo mssql networkmanager nntp odbc oracle pda pdf quicktime rdesktop rss spell syslog theora tiff usb v4l v4l2 vim-syntax vnc xinetd xscreensaver sasl ssl xcb xrandr"

VIDEO_CARDS="intel"
INPUT_DEVICES="keyboard mouse"
ALSA_CARDS="hda-intel"
LINGUAS="en es es_AR es_ES es_LA"
FEATURES="ccache parallel-fetch userfetch"

PORTAGE_TMPDIR="/var/tmp"
CCACHE_SIZE="2G"
CCACHE_DIR="${PORTAGE_TMPDIR}/ccache"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR=${PORTDIR}/packages
source /usr/portage/local/layman/make.conf

package.use

app-crypt/pinentry gtk
mail-client/mozilla-thunderbird ldap replytolist
app-text/poppler-bindings gtk
net-p2p/amule gtk
x11-misc/xlockmore -opengl
dev-lang/ruby -ssl
net-im/pidgin gtk gnutls tk
media-video/mplayer gtk
app-text/gocr tk
#games-fps/quake3-data cdinstall
games-fps/quake3 -opengl
games-fps/quake3-urbanterror -opengl
net-analyzer/nmap gtk
x11-wm/fluxbox truetype vim-syntax
x11-terms/eterm escreen mmx
gnome-base/gnome-session branding
net-www/mplayerplug-in wmp realmedia gmedia divx
net-dns/avahi mdnsresponder-compat
gnome-base/gvfs samba fuse
gnome-base/gnome-vfs samba gnutls kerberos
media-sound/audacity id3tag libsamplerate twolame vamp
net-wireless/wpa_supplicant gnutls gsm debug madwifi
app-arch/file-roller nautilus
media-gfx/gimp aalib exif
sys-apps/hal disk-partition laptop
sys-power/pm-utils ntp
gnome-base/gnome mono
dev-libs/gmime mono
sys-block/gparted fat jfs ntfs reiser4 reiserfs xfs
net-im/empathy applet
gnome-extra/nautilus-sendto thunderbird pidgin
media-gfx/gphoto2 aalib exif
media-libs/libgphoto2 exif
dev-util/eclipse-sdk seamonkey
games-emulation/xmame expat mmx net svga
x11-libs/cairo xcb svg glitz
net-wireless/hostapd madwifi logwatch
net-misc/xsupplicant gsm

lunes, 20 de agosto de 2012

PlayOnLinux

Es un programa que permite correr juegos y aplicaciones exclusivas de entornos Windows en GNU/Linux.
PlayOnLinux esta escrito en bash y python, se basa en el programa Wine y depende del proyecto WineHQ. Además es libre y gratuito.
Para instalar en Debian Squeeze hacer:
# wget -q "http://deb.playonlinux.com/public.gpg" -O- | apt-key add -
# wget http://deb.playonlinux.com/playonlinux_squeeze.list -O /etc/apt/sources.list.d/playonlinux.list
# apt-get update
# apt-get install playonlinux


Fuente: http://www.playonlinux.com

martes, 7 de agosto de 2012

Repositorio Debian Multimedia

Para el que haya tenido últimamente problemas para actualizar este repositorio, les paso la dirección del nuevo dominio: http://www.deb-multimedia.org
Ahí explica como renombrar el repositorio en el archivo sources.list
Si quieren ver más detalles el porque del cambio, aquí.
Parece que el líder de Debian le sugirió dos opciones al responsable del sitio y obviamente este último se decidió por la opción 2.
Me gusto el tono amable de Zacchiroli, como le hizo la sugerencia, distinto a otros dictadores benévolos de otros proyectos de software libre que no suelen ser simpáticos.