Category Archivelinux
english & linux Franchu on 12 Nov 2009
Upgrade problems from Ubuntu 6.10 (Edgy) to Ubuntu 9.10 (Intrepid)
These days I had to perform an upgrade of a server that had been forgotten running Ubuntu 6.10 Edgy, and as it was to be expected it didn’t go as smoothly as I would have like it.
In this post you will probably not find anything you couldn’t find anywhere else, as we did, but having it all in one place might prove useful and save you some time.
During the upgrade the mdam.conf file was overwritten with a default version of it, and the array was not automatically mounted anymore after reboot. The solution was found in a thread in the Ubuntu forums.
mdadm --examine --scan --config=mdadm.conf >> /etc/mdadm/mdadm.conf
The locale files got changed and we started to see lots of messages like:
perl: warning: Setting locale failed.perl: warning: Please check that your locale settings:
LANGUAGE = “es_ES.ISO-8859-15@euro”,
LC_ALL = (unset),
LANG = “es_ES.ISO-8859-15@euro”
are supported and installed on your system. perl: warning: Falling back to the standard locale (“C”).
The solution was found again in the Ubuntu forums. You have to edit /var/lib/locales/supported.d/es and make it look like:
es_EC.UTF-8 UTF-8
es_CL.UTF-8 UTF-8
es_DO.UTF-8 UTF-8
es_HN.UTF-8 UTF-8
es_PY.UTF-8 UTF-8
es_PR.UTF-8 UTF-8
es_NI.UTF-8 UTF-8
es_ES.UTF-8 UTF-8
es_PE.UTF-8 UTF-8
es_VE.UTF-8 UTF-8
es_GT.UTF-8 UTF-8
es_CR.UTF-8 UTF-8
es_BO.UTF-8 UTF-8
es_US.UTF-8 UTF-8
es_AR.UTF-8 UTF-8
es_PA.UTF-8 UTF-8
es_SV.UTF-8 UTF-8
es_UY.UTF-8 UTF-8
es_MX.UTF-8 UTF-8
es_CO.UTF-8 UTF-8
es_ES.ISO-8859-15@euro ISO-8859-15
Finally you have to rebuild the locales:
sudo dpgk-reconfigure locales
And last but not least, after the upgrades we were getting thrown into the busybox initramfs prompt. Apparently there is a problem with the evms and ACPI support, so we just disabled it, until we have further time to investigate the issue. The solution was found here.
Add into /boot/grub/menu.lst in the line that begins with #kopts
acpi=noacpi irqpoll
and then:
sudo update-grub
sudo aptitude remove evms
linux & spanish Franchu on 21 Sep 2008
Añadiendo su, vim y un servidor tftp al AppleTV
Hoy he estado trasteando con el AppleTV y me he dado cuenta de lo mucho que hecho en falta un editor de texto en él cuando quiero hacer cambios en algún fichero. Así que me he decidido a instalar vi y su
Para ello he seguido los pasos indicados en esta guía. Ya que estaba también he instalado un servidor TFTP para almacenar la información de aprovisionamiento de un par de teléfonos IP… pero eso es otra historia.
Desde nuestra máquina con MacOS X transferimos los ejecutables de estos tres programas al AppleTV via scp
$ scp -1 -r /usr/bin/su frontrow@<AppleTVIPAddress>:~/
$ scp -1 -r /usr/bin/vim frontrow@<AppleTVIPAddress>:~/
$ scp -1 -r /usr/libexec/tftpd frontrow@<AppleTVIPAddress>:~/
Una vez que los ficheros están en el AppleTV nos conectamos por SSH al equipo para colocarlos en su sitio correcto.
$ ssh -1 frontrow@<AppleTVIPAddress>
Montamos el sistema de ficheros con permisos de escritura tras conseguir permisos de root y ponemos el grupo y propietario correcto a cada uno de los ficheros.
bash-2.05b$ sudo -s
bash-2.05b# mount -uw /
bash-2.05b# chown root su
bash-2.05b# chgrp wheel su
bash-2.05b# chown root vim
bash-2.05b# chgrp wheel vim
bash-2.05b# chown root tftpd
bash-2.05b# chgrp wheel tftpd
A continuación movemos los ficheros a sus directorios finales dónde espera encontrarlos el sistema.
bash-2.05b# mv su /usr/bin/su
bash-2.05b# mv vim /usr/bin/vim
bash-2.05b# mv tftpd /usr/libexec/tftpd
Por último solo nos queda configurar el servidor de TFTP para decirle dónde tenemos el directorio que tiene que servir. En caso de que no lo tengamos creado, lo hacemos antes de editar el fichero. Afortunadamente, vim ya está instalado y podemos editar el fichero directamente en nuestro AppleTV
bash-2.05b# mkdir /Users/frontrow/tftp
bash-2.05b# chmod 777 /Users/frontrow/tftpbash-2.05b# vim /System/Library/LaunchDaemons/tftp.plist
<array>
<string>/usr/libexec/tftpd</string>
<string>-i</string>
<string>/Users/frontrow/tftp </array>
Por último, iniciamos el servicio de TFTP
bash-2.05b# /sbin/service tftp stop
bash-2.05b# /sbin/service tftp start
Ahora ya solo queda probarlo, ver que todo funciona correctamente y a disfrutarlo!
english & linux Franchu on 20 Sep 2008
Gigabit Ethernet network card setup in Ubuntu 8.04 Server
Today I bought a new network interface for my new server: Conceptronic Gigabit Ethernet card (10€) that has a Realtek RTL8169SC chipset.
I knew that it was compatible with the Ubuntu 8.04 Server that I had installed, so I was a little bit surprised when I plugged it in and it didn’t work
First I checked and saw that I only had the old card (I knew that by the MAC address
$ ifconfig
eth1 Link encap:Ethernet HWaddr 00:80:5a:69:b2:d2
inet addr:192.168.0.23 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:fcff:fe2d:d7ba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:119 errors:0 dropped:0 overruns:0 frame:0
TX packets:110 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15165 (14.8 KB) TX bytes:16769 (16.3 KB)
Interrupt:11 Base address:0×4000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14345 (14.0 KB) TX bytes:14345 (14.0 KB)
Next I wanted to see if the system had recognised the card or not so I ran..
$ sudo lshw -C network
*-network:0 DISABLED
description: Ethernet interface
product: RTL-8169 Gigabit Ethernet
vendor: Realtek Semiconductor Co., Ltd.
physical id: b
bus info: pci@0000:00:0b.0
logical name: eth0
version: 10
serial: 00:80:5a:69:b2:d2
size: 1GB/s
capacity: 1GB/s
width: 32 bits
clock: 66MHz
capabilities: pm bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.2LK duplex=full ip=192.168.0.250 latency=64 link=yes maxlatency=64 mingnt=32 module=r8169 multicast=yes port=twisted pair speed=1GB/s
*-network:1
description: Ethernet interface
product: RTL-8139/8139C/8139C+
vendor: Realtek Semiconductor Co., Ltd.
physical id: 11
bus info: pci@0000:00:11.0
logical name: eth1
version: 10
serial: 00:50:fc:2d:d7:ba
size: 100MB/s
capacity: 100MB/s
width: 32 bits
clock: 33MHz
capabilities: bus_master ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=8139too driverversion=0.9.28 duplex=full latency=32 link=yes maxlatency=64 mingnt=32 module=8139too multicast=yes port=MII speed=100MB/s
Good news! the system recognizes the card but somehow has not managed to bring it up. Let’s help it to know what module to load and under which device name. For that we assign to each network MAC address the module to be loaded in the DRIVERS attribute and assign it a device name in the NAME attribute
$ sudo vim /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”r8169″, ATTR{address}==”00:80:5a:69:b2:d2″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”8139too”, ATTR{address}==”00:50:fc:2d:d7:ba”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″
I also updated the configuration for the interfaces in the /etc/network/interfaces file:
$ sudo vim /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).# The loopback network interface
auto lo
iface lo inet loopback# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.250
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1auto eth1
iface eth1 inet dhcp
Now we restart the system to get the changes reloaded… I guess there is a less dramatic way to bring the changes life but didn’t feel like thinking much about it and anyway, I’m the only one in the server without anything critical running on it… yet
$ sudo shutdown -r now
And when the system goes back online…
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:80:5a:69:b2:d2
inet addr:192.168.0.250 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::280:5aff:fe69:b2d2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:185 errors:0 dropped:0 overruns:0 frame:0
TX packets:175 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19020 (18.5 KB) TX bytes:24911 (24.3 KB)
Interrupt:11 Base address:0×4000eth1 Link encap:Ethernet HWaddr 00:50:fc:2d:d7:ba
inet addr:192.168.0.23 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:fcff:fe2d:d7ba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:49 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6220 (6.0 KB) TX bytes:1494 (1.4 KB)
Interrupt:10 Base address:0xc400lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14345 (14.0 KB) TX bytes:14345 (14.0 KB)
Everything looks great!
and finally the server is ready to use the new Gigabit Ethernet connection