arch

Kernel Upgrade breaks Arch Linux

roland's picture

The cool thing about arch linux is that you can upgrade to the latest releases, but it is very probably you'll screw up your system. I upgraded to kernel 2.6.27-2 which wasn't a very wise decision. I got a kernel panic on reboot saying the /init could not be found. I tried setting the init param in menu.lst but still it didn't work.

Hmm, I think I did something wrong during the upgrade. I remember klibc screaming about errors, maybe it had something to do with it. Either way, I used by ubuntu install to chroot and reinstall the kernel26. That did it. The kernel itself didn't work at first so I used the "fallback" version. The reasonĀ  is that /sys/ didn't map to the right location. I don't know where it's supposed to map. I only mapped dev. Oh, well, after using the fallback kernel, I was able to reinstall kernel26 with pacman. This fixed my system.

I'm glad to see that ndiswrapper is not whining anymore about the kernel like it did with 2.6.26. Yeay! back on track. Also, I managed to move all my blogs from my old blog, and blogger into a this new one. Aint't it cool?

Rails and Sql Server 2005 (mssql) on Arch Linux

roland's picture

To connect to the Sql Server in from Rails in Linux there are some very useful resources such as:
HowtoConnectToMicrosoftSQLServerFromRailsOnLinux.

Note that HowtoConnectToMicrosoftSQLServer works only if the Rails app lives in a windows environment. In Linux there's no "win32ole", which helps with the ADO connection. So, we have to rely on ODBC. The weird thing is that I developed a rails app that connected to Sql Server 2005 a few years back, but we did it in windows and had not to worry about something like this. Oh well, c'est la vie!

On my laptop I run Arch Linux so these instructions are pretty much for Arch, but as the first resource says, they can be adapted to pretty much any other distro. First, start off by installing freetds. Luckily, freetds on Arch is built with odbc support (you can see that the PKGBUILD of freetds depends on unixodbc).

Mssql for PHP in Arch Linux

roland's picture

The MSSQL module is not enabled by default in php in Arch. I don't know why but it seems there are just some weird fixes that need to be implemented. I am a noob at these stuff, but I was able to compile the module. Here is the how to:

1. Compile FreeTDS (package is created after compilation)

cd ~/abs
cp -r /var/abs/community/lib/freetds/ .
cd freetds
makepkg

Sym link the library
cd src/freetds-0.82/
ln -s src/tds/.libs/ lib

This will leave the source files and build in your file system under src.

2. Install FreeTDS (if you haven't already) either with

sudo pacman -U freetds-0.82-1-i686.pkg.tar.gz
or
sudo pacman -S freetds

3. Get and build PHP

cd ~/abs
cp -r /var/abs/extra/php .
vim PKGBUILD

After line 124 in phpextensions add this line
--with-mssql=/home/your_username/abs/freetds/src/freetds-0.82 \

NOTE: your_username is the username you use to login into the system

Build PHP:
makepkg

4. Uninstall any php install that you might have with
sudo pacman -R php

5. Install the version you compiled
sudo pacman -U php-5.2.6-5-i686.pkg.tar.gz

6. Configure php.ini
sudo vim /etc/php/php.ini

and add (line ~1299)
extension=mssql.so

Test, php -m to see that mssql is loaded

The php install might look for "libtds.a" in /usr/lib, but this has been renamed to "libct.so.4.0.0"
So, you might want to add a symlink
sudo ln -s /usr/lib/libct.so.4.0.0 /usr/lib/libtds.a

Personally, I didn't see a problem with not having it.

ArchLinux finally comes around

roland's picture

I upgraded the arch kernel to 2.6.26 and ndiswrapper went bonkers, locking up my computer and what not. It just didn't know how to downgrade to the 2.6.25 kernel and ndiswrapper 1.52.

After a while the kernel got upgraded and so did ndiswrapper to 1.53. Well, this brought some reliability, but not much. If too many connections were made the system would lock up.

Today I finally succeeded to downgrade. I found an answer to downgrading in arch, which solved my question. Basically, Arch doesn't have have a downgrade functionality "per se" because older packages are not kept in the repository. However, if you didn't clean up the pacman cache you can downgrade.

The cached packages are in /var/cache/pacman/pkg. Then you will have to do a pacman -U kernel-2.6.25.. I had also virtualbox-ose and ndiswrapper-1.53 that were conflicting with that install.
You will have to manually remove the ndiswrapper and ndiswrapper-utils (with pacman -R of course), and then install the kernel, and finally put back in the older versions of ndiswrapper and virtualbox.

Yeay, back to stability.

Arch Linux vs. Ubuntu

roland's picture

I have installed both Arch Linux and Ubuntu and so far I like them both. In terms of hardware support Ubuntu is better, but in terms of customization and performance, Arch is much better. I have an old battery which lasts only 10-15 minutes on Ubuntu, but at least 30 minutes on Arch Linux.

I changed the frequency scaling in Arch to always be 1 GHz (while in Ubuntu it spurs to 2.16 GHz when a program is launched).

Heat wise Arch is much better too. In Ubuntu 69C is the average temperature, while in Arch 58C.
Of course if I am doing development work in Ubuntu I get 78C, while in Arch 65C.

I suppose I can customize Ubuntu as well to be with the same characteristics as Arch, but I need to research it.

Syndicate content