Archive for the 'Linux' Category

Debian Linux on Via Epia

Well, it’s working for some time now. It has been adopted as my home server, including:

  • internet gateway (IPFilter, DHCP, Bind)
  • web serwer (Lighttpd)
  • file server (vsftpd)
  • and sometimes

  • desktop (Gnome)

Everyting is OK with default installation. Now is the time to get some of the build in hardware features working.

I’ve done some reading and it seems that most of CPU features are available in newest kernel. So I downloaded archives and started playing. I found that there is support for C3 processor based encryption. So I’m going to build own kernel with the support of http://kernelnewbies.org/ website. Wish me luck :-).

Debian installation from USB stick

I gave up the idea of setting up Solaris as my home router/server OS. It seems that I don’t have enough RAM. Actually I have 512MB, and I’m able to install Solaris, but to comfort work it’s just too few.

And now I have Debian. It was quite an adventure. I didn’t want to turn off my PC to borrow
one of DVD drives, so I decided to install it from USB stick (pen drive). Ok… how? Simply copying data from ISO image is not enough.

First, prepare your USB drive. Unmount if mounted automatically. Then:

sudo mount /dev/sda1 /mnt
sudo mkdosfs /dev/sda1

Make sure /dev/sda1 is actually your targeted USB device. Before above steps you can make sure wich /dev to use:

sudo mount

on the bottom you should see your device.

Install:

sudo apt-get update
sudo apt-get install syslinux mtools

Then:

syslinux /dev/sda1

Now download necessary files:

ftp://ftp.debian.org/debian/dists/etch/main/installer-i386/20070308/images/hd-media/gtk/

and appropriate ISO image, eg:

http://ftp.icm.edu.pl/pub/Linux/debian-cd/current/i386/iso-cd/debian-40r0-i386-kde-CD-1.iso

I have 1GB pen drive, so one CD fits for me, but you can choose smaller ISOs: netinst ot bussinescard.

Copy those files to your USB drive:

sudo copy source_file target_file

eg:

copy /tmp/downloads/vmlinuz /mnt/vmlinuz

Additionally you have to have syslinux configuration file:

sudo touch /mnt/syslinux.cfg
nano /mnt/syslinux.cfg

and paste the following:

default vmlinuz
append initrd=initrd.gz

Your USB installation media is ready, unmount:

sudo umount /mnt

Set up BIOS on machine you’re about to install Debian to boot from USB-ZIP and you’re done.

NOTE: I didn’t use packages from ISO shown in example only. I’ve done mixed installation ISO + remote (network) repository (mirror). You will have this option available during your own installation so no additional steps in this how-to are necessary.

Bonus: graph showing network usage during Debian mixed installation.

debian installation

Tip about recovering X server config

As Ben reported in my previous post I decided to write short how-to about getting your X server back to it’s feet.

Firstly it might be that only your session breaks at logon. So in bottom left corner choose logging to a Terminal Session, and then type your credentials. If you see only black, scary, screen with gray letters; don’t be afraid. Your system is working, it’s only your X server that doesn’t work. Easiest problem to solve is to edit your xorg.conf file.

Type:

cd /etc/X11

Note that, there is capital X.

Then:

ls -l | grep xorg

You sould see a list of your xorg.conf file with backups, and old versions. By looking at your list, mine looks like this:

-rw-r--r-- 1 root root 3980 2007-04-18 23:13 xorg.conf
-rw-r--r-- 1 root root 3910 2007-04-18 23:13 xorg.conf~
-rw-r--r-- 1 root root 4291 2007-01-12 17:20 xorg.conf.20070112172056
-rw-r--r-- 1 root root 4922 2007-01-12 18:28 xorg.conf.20070112182803
-rw-r--r-- 1 root root 4856 2007-01-12 17:58 xorg.conf.fglrx-0
-rw-r--r-- 1 root root 4922 2007-01-12 17:58 xorg.conf.fglrx-1
-rw-r--r-- 1 root root 4179 2007-01-13 01:09 xorg.conf.fglrx-2
-rw-r--r-- 1 root root 4747 2007-02-17 22:24 xorg.conf.fglrx-3
-rw-r--r-- 1 root root 4692 2007-02-18 14:53 xorg.conf.fglrx-4
-rw-r--r-- 1 root root 5179 2007-04-18 23:01 xorg.conf.fglrx-5
-rw-r--r-- 1 root root 4291 2007-01-12 17:20 xorg.conf.original-0
-rw-r--r-- 1 root root 4259 2007-02-17 22:17 xorg.conf.original-1
-rw-r--r-- 1 root root 4185 2007-02-18 14:49 xorg.conf.original-2
-rw-r--r-- 1 root root 4700 2007-04-18 22:55 xorg.conf.original-3

choose newest xorg.conf that you remember worked.

You can quickly look into every file by typing:

cat | more

Eg: cat xorg.conf | more
Scroll down with enter or spacebar, quit with q.

Now to replace broken xorg.conf:

sudo cp working.xorg.conf xorg.conf

This command will overwrite xorg.conf with working.xorg.conf. If you want to backup your broken conf (?):

cp xorg.conf xorg.conf.backup

Or any other filename you want (but don’t use existing ones).

Now you should be able to run you X session. Type:

startx

or

sudo shutdown now

When you know what you did wrong with your xorg.conf you can edit it in the terminal. I wouldn’t recommend Vi editor, but there are others. Eg: nano, mcedit etc. Depending on your system configuration, type:

nano xorg.conf

Edit, save. And good luck.

Upgrade Ubuntu Feisty Fawn, plus ATI and Compiz

I decided to upgrade from Ubuntu Edgy Eft to Feisty Fawn. First impression is good. I had only to reconfigure VMware Server. There’s also some disturbing property in Gaim 2.0beta6; it’s still downloading old Gmail friends list. But new feature, mail notification, is very cool, so no harm done :-).

To upgrade your Ubuntu distribution type (in terminal):

sudo update-manager -c -d

Click here and there, wait a bit of time (mine upgrade took about 2h, with downloading). Important thing is to answer some questions whether to keep or overwrite configuration files of some services. Usually it is better to keep your old confs. And thats it! How do you like your new operating system? :-)

With ATI/Compiz it took me some time to get it all working. First I followed some tutorials. But it only messed with my xorg.conf. So I loaded oldest conf (from first installation I think) and started from scratch.

Step-by-step (or better cmd-after-cmd :-)):

Just in case:

sudo modprobe -r fglrx

Then:

sudo apt-get remove xorg-driver-fglrx

You probably already have it, but:

sudo apt-get install libgl1-mesa-glx libgl1-mesa-dri

OK, now edit your xorg.conf:

sudo gedit /etc/X11/xorg.conf

Find Section “Device”, and edit, so it look like this:

Section "Device"
Identifier "ATI Technologies, Inc. RV350 AS [Radeon 9600]"
Driver "radeon"
BusID "PCI:1:0:0"
Option "XAANoOffscreenPixmaps"
Option "AGPMode" "4"
Option "AGPFastWrite" "true"
Option "DisableGLXRootClipping" "true"
Option "AddARGBGLXVisuals" "true"
Option "AllowGLXWithComposite" "true"
Option "EnablePageFlip" "true"
EndSection

Yeah, I know I mentioned in other post that I have 9550 but I’ve done some kinky tweaks on my graphic card and it’s now 9600 (rv350), even PRO :-).

In Section “Screen” I’ve left only one resolution, It’s good choice for me, because I never change it. My LCD gives best view on max resolution, wich is 1280×1024.

There are two more things to do. In Section “ServerLayout” add this line:

Option "AIGLX" "true"

From what I know it has to be on top of other entries in this section.

And the last step is to add two more sections:

Section "DRI"
Mode 0666
EndSection

Section "Extensions"
Option "Composite" "Enable"
EndSection

Instead of Enable you can put 1 (one).To make the changes take effect, you have to restart your X server. Do this by rebooting your computer or simply by pressing Ctrl+Alt+Backspace.

Voila!

Now you should go to System->Preferences->Desktop Effects and enable Composite manager (Compiz by default). You can try and play with more feature-based Beryl, but I do, really, not recommend it. It’s highly unstable. Maybe with Nvidia cards it works better, but if you have ATI – stay away.

Optionally add some compiz packages through Synaptic.

TIP! I encountered a very annoying problem after first enabling Compiz. I’ve lost my left mouse button functinality, LOL! It was really funny when I tried to click something and all I could get was another screenshot#.png file on my desktop. It wasn’t hard to google answer. It is reported on launchpad.net under Bug #90918. Quick how-to:
Open gconf-editor, and navigate to apps/compiz/plugins/screenshot/allscreens/options. Disable initiate_button.

Uff. Have a nice day.

Composite managers

After some attempts trying to run Beryl or Compiz I gave up. They are so unstable that I had to restart X server many time during one session.
I tried both fglrx and open drivers. Xgl was slowing down system with 100% CPU usage when BMP was playing (!). And so on.

I’ve followed many step-by-step guides and nothing work to at least call it fine. Well, I wish good luck to the dev teams. They surely need it.

Macuntu?

There is a system dedicated to work with multimedias other than Apple’s OS. It’s not profiled to a specific hardware platform, but it is. Good, now, I think that Ubuntu Studio won’t be much of a competiotion to Mac OSX, but it’s a step forward and I wish them well. More on Ubuntu Studio WiKi.

———-

Jest system dedykowany do pracy z multimediami, inny niż system Appla. Nie jest budowany z myslą o konkretnej platformie sprzętowej, ale jest. To dobrze. Nie wydaje mi się aby Ubuntu Studio było jakąś konkurencją dla Mac OSX, ale jest to pewien krok na przód, i życzę twórcą wszystkiego dobrego. Więcej na stronie WiKi Ubuntu Studio.

Ubuntu and HP LaserJet 1020 step-by-step

Worked on Ubuntu edgy 6.10.

First get necessary tools:

sudo apt-get install build-essential

then download foo2zjs drivers

wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz

untar

tar -zxvf foo2zjs.tar.gz
cd foo2zjs

uninstall previous isntallations:

sudo make uninstall

build:

make

get HP LJ1020 firmware file:

./getweb 1020

install printers linux support:

sudo make install install-hotplug cups

Found on Jano’s weblog.

———-

Zadziałało na Ubuntu edgy 6.10.

Najpierw wrzuć kilka narzędzi:

sudo apt-get install build-essential

potem ponierz sterowniki foo2zjs

wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz

wypakuj

tar -zxvf foo2zjs.tar.gz
cd foo2zjs

odinstaluj poprzednie instalacje:

sudo make uninstall

skompiluj:

make

pobierz firmware HP LJ1020:

./getweb 1020

zainstaluj obsługe drukarek w linuksie:

sudo make install install-hotplug cups

Znalezione na Jano’s weblog.

VMware under ubuntu linux

Installer is really simple. More difficult can be obtaining archive :-). First of all register to get your free serial number(s). Go to the VMware download server page; click on download; accept EULA, and choose VMware Server for Linux archive. Save to disk; untar (replace * with version and build number, eg.: VMware-server-1.0.1-29996.tar.gz):

tar xvzf VMware-server*.tar.gz

then

cd vmware-server-distrib/

and

sudo ./vmware-install.pl

Answer lots of questions and you’re done. Same goes for the VMware player.

What interesting is that VMware works faster hosting Windows XP Professional  that WXPPRO hosting Ubuntu.

———-

Inster jest bardzo prosty. Trudniejsze wydaje się zdobycie paczki. Najpierw zarejestruje się żeby dostać darmowy numer seryjny produktu. Przejdź do strony pobierania serwera VMware; kliknij na download; zaakceptuj umowę, i wybierz archiwum VMware Server for Linux. Zapisz na dysk; rozpakuje (zamień * wersją i numerem kompilacji, np.: VMware-server-1.0.1-29996.tar.gz):

tar xvzf VMware-server*.tar.gz

potem

cd vmware-server-distrib/

i

sudo ./vmware-install.pl

Odpowiedz na dużą liczbę pytań instalera i po wszystkim. Taka sama procedura dotyczy VMware playera.

Co ciekawe, to że VMware szybciej działa pod ubuntu hostując Windows XP Professional niż WXPPRO hostujący Ubuntu.

Ubuntu edgy and ATI step-by-step

I found the best way to set up ATI drivers on Ubuntu 6.10. This doesn’t cover any errors, so do not take another steps until you handle your problem(s).
Here is what to do:

wget https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/ati-driver-installer-8.33.6-x86.x86_64.run

(or newer from ATI driver download page)

mkdir ati-ins

cp ati-driver-installer-8.33.6-x86.x86_64.run ati-ins

cd ati-ins

sudo aptitude install module-assistant build-essential debhelper debconf dh-make fakeroot libstdc++5 linux-headers-$(uname -r)

sudo gedit /etc/X11/xorg.conf

add this at the end of file:

Section "Extensions"
Option "Composite" "Disable"
EndSection

then

sudo gedit /etc/default/linux-restricted-modules-common

add text so it’ll look like this:

DISABLED_MODULES="somemodule2 fglrx"

save and exit, then

sudo ln -sf bash /bin/sh

bash ./ati-driver-installer-.run --buildpkg Ubuntu/edgy

wait…

sudo ln -sf dash /bin/sh

sudo dpkg -i *.deb

sudo module-assistant prepare,update

sudo module-assistant build,install fglrx-kernel

sudo depmod

sudo rm -f /usr/src/fglrx-kernel*.deb

finish

sudo aticonfig --initial

sudo aticonfig --overlay-type=Xv

reboot.

Check with:

fglrxinfo

glxinfo | grep direct

output should be something like this:
luc@luc-desktop:~$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9550 Generic
OpenGL version string: 2.0.6286 (8.33.6)
luc@luc-desktop:~$ glxinfo | grep direct
direct rendering: Yes

More on Binary Driver Howto ATI on Ubuntu help page.

Upgrade Ubuntu dapper->edgy

I wanted to run Beep-media-player eXperimental on my Ubuntu OS, but dapper is not supported so i decided to upgrade dapper drake to edgy eft. Here’s how to do it.
First of all, find out what Ubuntu version youre using:

sudo lsb_release -a

Then do as follows:

0. DO BACKUPS OF YOUR IMPORTANT FILES!
1. Edit sources:

sudo gedit /etc/apt/sources.list

by replacing dapper with edgy. Delete entry pointing to your CDROM, we will download everything from the Ubuntu servers.
2. Update:

sudo apt-get update

3. Upgrade:

sudo apt-get upgrade
sudo apt-get dist-upgrade

4. Finish:
(if any errors during upgrade sudo apt-get dist-upgrade --fix-missing)

sudo dpkg --configure -a

and/or

sudo apt-get -f install

5. Reboot.

Worked for me. I had some errors and warnings during upgrade but it’s because I have a lot of programs installed. Most for testing purposes.

———-

Chciałem uruchomić Beep-media-player eXperimental na swoim Ubuntu, ale BMPx nie działa na dapperze, więc zdecydowałe się uaktualnić dapper drake do edgy eft. Dalej napisałem jak to zrobić.
Po pierwsze, sprawdź jaką wersję Ubuntu masz:

sudo lsb_release -a

Następnie zrób co następuje:

0. ZRÓB BACKUPU WAŻNYCH PLIKÓW!
1. Wyedytuj źródła:

sudo gedit /etc/apt/sources.list

zamieniając dapper na edgy. Usuń źródła CDROM, pobierzemy wszystko z serwerów Ubuntu.
2. Aktualizujemy listy:

sudo apt-get update

3. Aktualizujemy system:

sudo apt-get upgrade
sudo apt-get dist-upgrade

4. Wykańczamy:
(jeśli wystąpiły błędy sudo apt-get dist-upgrade --fix-missing)

sudo dpkg --configure -a

i/lub

sudo apt-get -f install

5. Uruchamiamy ponownie komputer.

Zadziałało u mnie bez problemów. Miałem trochę błędów i ostrzeżeń, głównie przez nadmiar programów, które instalowałem do testów i nie ruszałem dłuższy czas.