Archive for April, 2007

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.

Ping… ping… ping…

I’ve found first version of the Ping program. Originally written by Mike Muuse in one night. Complete source is available below. It’s codded up in really ancient style (but it’s still C), so I had some troubles in understanding couple of lines. What’s interesting it does not compile on my ubuntu box.

Continue reading ‘Ping… ping… ping…’

Outernet is alive!

Good news. I’m very happy to announce that Outernet Association has been registered. We have all the important papers and numbers. Now it’s time to make a chart of accounts, do all the PR stuff and start growing!

What’s interesting: first founding gathering was on 11-11-2006, and the official response from governments administration was on 04-04-2007.

Mini PC parts

I’m building own mini PC variant. The main idea behind this project is to build completly silent and fail safe computer. So the less moving parts the better. And of course it has to be small. It will be home router, web server, etc, and in future home media center. I have to buy slim, slotted DVD drive and set up operating system first. I think it will be Solaris (media center? lol). I chose Via Epia mainboard, model EN15000G. If I had more money I’d buy nano-ITX mainboar (12×12) so I could build PC even smaller than Mac Mini for about 4cm! Well… power supply is PicoPSU, very cool, completly silent and very efficient. It’s the smalles power supply I have seen. The AC adapter is 12V 5A from my Iiyama LCD panel, I replaced it with LG’s 12V 3,5A which is enough. Memory will be: 60GB, 2,5″ and 7200RPM hard disk from Hitachi/IBM plus 512MB of RAM (PC3200/400MHz Hynix/IBM). That’s it!

I already tested this hardware configuration, and it’s working great! Windows with all Via’s drivers and software is booting up from power to clean desktop in 42 seconds. Now i’m preparing to build computer case. First I have to buy some materials and tools. I have so many ideas for this case. I don’t know where to start. Probably there where the costs are smallest.

Below some photos of my new hardware.

Continue reading ‘Mini PC parts’