Installing Debian 3.1 on Beryllium

This topic is about the things I needed to do to get Beryllium running with my flavor of Debian GNU/Linux version 3.1 (Sarge). Beryllium is not a 'standard' machine. It is an Asus Pundit R. An integrated performer as follows:

Chapter 1: Preparations

To start with: Debian 3.1 detected the onboard Ethernet chip but could not use it. So I disabled the device and installed a cheap RTL 8139 PCI Network interface card (100 Mbps). That did the trick. From then on, I could do with the disk that I downloaded from the Debian site http://www.debian.org. Choose the 'Network install' option. You should end up here: http://www.debian.org/CD/netinst/.
Download the required disk image and burn it onto a CD-ROM. Do not burn it on an 8 cm minidisk. It will not fit the Pundit if you have it standing upright. Only normal 12 cm disks can be played in that position.

If there is data on your computer, NOW is the time to make backups of /home and possibly /root and /usr/local. Make a tar file and burn it onto a CD-ROM. It's much more comfortable to be able to just throw away old partitions.

Chapter 2: Booting from the NetInstall disk

The sequence now is:

  1. Power up the Pundit
  2. Immediately press the 'Open' button of your optical drive
  3. Insert the Debian Network Install disk
  4. Close the tray
  5. If the bootprocess is already too far gone, reboot (small button above PCMCIA slot)

Debian will show it's bootprompt. It won't harm if you take a look at the options available after pressing the function keys. After some trial and error I found out that I needed the following boot options:

   boot: linux26 netcfg/disable_dhcp=true
   
to succesfully enter the installation system. You only need the netcfg option if you want to run your new system with a static IP address. I could have run with DHCP but that would mean that the installation would produce a machine running with DHCP as well.

You will be asked some questions. Just answer them to your best knowledge. Most things can be changed later quite easily. This is Debian, not SuSE. When all is done,

Chapter 3: Swap versus memory

In the good old days of Slackware and FreeBSD there was a simple rule for estimating the amount of diskspace to allocate for the swap partitions. In those days, RAM was terribly expensive and also not available in large units. I prefer to use the simple rule, with the FreeBSD extension:

     IF  RAM < 64 MB  THEN
        Swap := 2 * RAM
     ELSE
        Swap := 64 MB
     END
   
This would mean that every modern machine would be running with 64 MB of swap. Not too real.

Let's add the performance factor here. Linux counts on storage, not on RAM. Storage is the sum of RAM and swap. It fills it's storage with buffers and libraries for a certain percentage. You can fool yourself with a huge store by having a 1 GB swap partition. But that would mean the the kernel just fills all of your RAM with buffers and the first process to claim some more memory will cause the system to start swapping in and out like mad (thrashing).
Therefore I run with a swap partition half the size of the main RAM (256 MB in my case). So I have a 128 MB swap partition. This will give me some more room for running lots of applications but I won't fall in the swap thrashing pit too soon.

Chapter 4: Disk partitions

On this 80 GB disk I have three partitions:

dev mountpoint size
/dev/hda1 swap 128 MB
/dev/hda2 / 16 GB
/dev/hda3 /home 64 GB

The swap partition is up front on the disk. Why? Easy: the tracks are longer on the outside of the disk (lower track numbers) so less tracks are required for the same amount of storage. And the system gets faster since more data can be read and written in one long chunk.
Sooner or later, the installer will ask for a place to store the bootloader. Always place this in the MBR. It will probably install GRUB instead of LILO, but that's no big deal.

Chapter 5: Exim

Exim is the mail transport agent. It will ask for some data. In my case I chose for the option whihc involved the smarthost. I upload all of my mail to the mailserver of the company that hosts my website (http://www.deheeg.nl).
The questions asked by Exim are not too complex.

Chapter 6: Configure XF86

Beryllium is a 3 GHz Pentium 4 computer so it must get the chance to do some real numbercrunching. I.e. running with an X11 Windows system by default should be a piece of cake for it. And it is. The problem after a full install was that, no matter what I did, I could not get more resolution than 800 x 600. And this was an insult to my Samsung SyncMaster 713N TFT screen (17").

I changed the '/etc/X11/XF86Config' file several times but it just didn't work. Lucky for me, Jan Wagemakers pointed me in the right direction. I had to reconfigure the X-server:

   dpkg-reconfigure xserver-xfree86
   
which starts a userfriendly script with which it is very easy to choose the components for the X11 system. The difference is, that the dpkg-reconfigure command installs the file named '/etc/X11/XF86Config-4' and that '-4' is just what makes the difference.

Chapter 7: Content of XF86Config-4

# XF86Config-4 (XFree86 X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the XF86Config-4 manual page.
# (Type "man XF86Config-4" at the shell prompt.)
#
# This file is automatically updated on xserver-xfree86 package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xfree86
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following commands as root:
#
#   cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.custom
#   md5sum /etc/X11/XF86Config-4 >/var/lib/xfree86/XF86Config-4.md5sum
#   dpkg-reconfigure xserver-xfree86

Section "Files"
	FontPath	"unix/:7100"			# local font server
	# if the local font server has problems, we can fall back on these
	FontPath	"/usr/lib/X11/ps/misc"
	FontPath	"/usr/lib/X11/ps/cyrillic"
	FontPath	"/usr/lib/X11/ps/100dpi/:unscaled"
	FontPath	"/usr/lib/X11/ps/75dpi/:unscaled"
	FontPath	"/usr/lib/X11/ps/Type1"
	FontPath	"/usr/lib/X11/ps/CID"
	FontPath	"/usr/lib/X11/ps/Speedo"
	FontPath	"/usr/lib/X11/ps/100dpi"
	FontPath	"/usr/lib/X11/ps/75dpi"
EndSection

Section "Module"
	Load	"GLcore"
	Load	"bitmap"
	Load	"dbe"
	Load	"ddc"
	Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"record"
	Load	"speedo"
	Load	"type1"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"keyboard"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xfree86"
	Option		"XkbModel"	"pc101"
	Option		"XkbLayout"	"us"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ImPS/2"
	Option		"ZAxisMapping"		"4 5"
EndSection

Section "Device"
	Identifier	"ATI Radeon 9100"
	Driver		"ati"
	BusID		""
	VideoRam	32768
EndSection

Section "Monitor"
	Identifier	"Samsung SyncMaster 713N"
	HorizSync	30-65
	VertRefresh	50-75
	Option		"DPMS"
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Device		"ATI Radeon 9100"
	Monitor		"Samsung SyncMaster 713N"
	DefaultDepth	24
	SubSection "Display"
		Depth		1
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		4
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		8
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		15
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		16
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		24
		Modes		"1280x1024" "800x600"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
EndSection

Section "DRI"
	Mode	0666
EndSection
   

Chapter 8: Printing

Once in a while you still need to print some data to paper. I prefer to use 'LPRng' as printing manager and 'apsfilter' as the postprocessor. You just send data to the 'lpr' daemon and it will send it to apsfilter.
Apsfilter will then examine the file. If it is a postscript file, it uses ghostview to translate the postscript to something my printer understands (PCL in my case) but if I send raw ASCII or PCL data, it relays it all to the printer.

Installing apsfilter was a snap (just issue 'apt-get install apsfilter' and run the 'SETUP' script). But printing was still not possible. Oh yes, I could print the test images, but not my real data. The problem took about a full day to fix. It was related to the 'udev' device. Sarge uses udev and hence only the required devices are in '/dev/' instead of each and every imaginable device (as in Slackware's /dev directory).
The printer requires the modules 'parport', 'parport_pc' and 'lp' to be loaded. In my case, 'lp' seemed not to be loaded... So I added 'lp' to the end of 'etc/modules' as shown below:

# /etc/modules: kernel modules to load at boot time.
#
# This file should contain the names of kernel modules that are
# to be loaded at boot time, one per line.  Comments begin with
# a "#", and everything on the line after them are ignored.

ide-cd
ide-disk
ide-generic
psmouse
sbp2
sr_mod
lp
   
which solved the problem.

Chapter 9: The window manager

If you want to change the window manager you may get away with making a symbolic link called '~/.xinitrc' which points to the required window manager startup file. In Sarge, this is not the case. In order to change the window manager you just execute a small piece of software:

   /usr/sbin/alternatives --config x-session-manager
   
This will present a small menu and two keystrokes further on it's all settled. Of course, this can only be done as root.

Another option is similar to what older distro's do: make a symbolic link to an executable script in /etc/xinitrc. Nut instead of symlinking, you just put the name of the required script in the file '~/.xinitrc' and things are cooked as well.

Chapter 10: The soundsystem

The best way to get the soundsystem going is to run 'alsaconf' as root (in a terminal window). It will get things done in no time. This gave the system nice sounds, but only when root was logged in.

Fix the problem as follows: as root, issue an 'addgroup jan audio' command for each user (in this case user 'jan'). That's it. Unfortunately, the added group only takes effect after a new login was made. It took some time to realize that.

Chapter 11: Adding software

I prefer to use 'synaptic' to manage the installed software. You can access it as follows: KDE -> System -> Package Manager (Synaptic). The rest will explain itself but I will give two short examples:

  1. You have AppleTalk installed but you neither need it nor want to wait for it while booting. So you start synaptic and choose the 'All' topic in the leftmost tiled pane. In the top right pane, go down until you reach 'netatalk'. There is a green square in front of it. Click on the square and choose: 'Remove'. Now click on 'Apply' and see what happens. When the black screen ends, AppleTalk is removed from your system.
  2. You installed the GDM inlogger but you prefer the KDM inlog manager. Again you start synaptic and first remove the gdm package from the system. When done, choose the kdm package for installation. That's it. Debian first removed and disables gdm and then installed and enabled kdm. No need to restart things or change permissions. It's all in a day's work.

Chapter 12: Something strange

"If it doesn't kill you, it just makes you STRANGER", says the Joker in Dark Knight. And that's just what happened the other day. Read and shiver:

Here is the new XF86Config-4 file. The special lines are in red:
# XF86Config-4 (XFree86 X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the XF86Config-4 manual page.
# (Type "man XF86Config-4" at the shell prompt.)
#
# This file is automatically updated on xserver-xfree86 package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xfree86
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following commands as root:
#
#   cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.custom
#   md5sum /etc/X11/XF86Config-4 >/var/lib/xfree86/XF86Config-4.md5sum
#   dpkg-reconfigure xserver-xfree86

Section "Files"
	FontPath	"unix/:7100"			# local font server
	# if the local font server has problems, we can fall back on these
	FontPath	"/usr/lib/X11/ps/misc"
	FontPath	"/usr/lib/X11/ps/cyrillic"
	FontPath	"/usr/lib/X11/ps/100dpi/:unscaled"
	FontPath	"/usr/lib/X11/ps/75dpi/:unscaled"
	FontPath	"/usr/lib/X11/ps/Type1"
	FontPath	"/usr/lib/X11/ps/CID"
	FontPath	"/usr/lib/X11/ps/Speedo"
	FontPath	"/usr/lib/X11/ps/100dpi"
	FontPath	"/usr/lib/X11/ps/75dpi"
EndSection

Section "Module"
	Load	"GLcore"
	Load	"bitmap"
	Load	"dbe"
	Load	"ddc"
	Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"record"
	Load	"speedo"
	Load	"type1"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"keyboard"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xfree86"
	Option		"XkbModel"	"pc101"
	Option		"XkbLayout"	"us"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"ImPS/2"
	Option		"ZAxisMapping"		"4 5"
EndSection

Section "Device"
	Identifier	"SIS 6326 PCI"
	Driver		"radeon"
	BusID		""
	VideoRam	16384
EndSection

Section "Monitor"
	Identifier	"Samsung SyncMaster 713N"
	HorizSync	30-65
	VertRefresh	50-75
	Option		"DPMS"
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Device		"SIS 6326 PCI"
	Monitor		"Samsung SyncMaster 713N"
	DefaultDepth	24
	SubSection "Display"
		Depth		1
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		4
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		8
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		15
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		16
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		24
		Modes		"1280x1024" "800x600"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
EndSection

Section "DRI"
	Mode	0666
EndSection
   
Now that I think of it: the VGA subsystem uses 32 MB of RAM. Yet the XF86Config-4 file still thinks it is 16 MB. Hmm. Time for yet another test. See how it runs.

I changed it to 32 M and went for a walk in the house. 10 Minutes later I found a black screen. So I change dit back. Screen remained black. So I changed it to 16 bit coulour. No change. This is a serious problem, laid upon me by those fine people at Debian and ATI.

I hope something pops up in my head so I can solve this. Otherwise Debian will be swapped against Slackware 12.1.

I'm loosing my mind. I reboot with the three finger salute and cross my fingers. Apparently that was it: the system boots up and is spinning along at 1280x1024. Here's the display related part of our beloved XF86 file:

Section "Device"
	Identifier	"SIS 6326 PCI"
	Driver		"radeon"
	BusID		""
	VideoRam	16384
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Device		"SIS 6326 PCI"
	Monitor		"Samsung SyncMaster 713N"
	DefaultDepth	16
   
To recollect: I want to see what happens when I go back to 24 bits of colour. More in a moment.

You guessed it: black screen. Changed it back: black screen. Changed server to 'ati' instead of 'radeon': black screen. Changed everything back to a working version: black screen. This getting a problem. And I don't like problems!

It ran. I tested one more setting. It didn't run. I changed back. Still didn't run. There's no logic in this.

It gets less logical. After a good nights rest Beryllium has decided to resurrect. I'm now working on the system like nothing happened. The machine was powered down for 16 hours. I'm now thinking, that part of RAM still contains erroneous data after a simple reboot. But after a powerdown the erroneous data may be gone.
Beryllium has been running now for three days with the settings as in:

# XF86Config-4 (XFree86 X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the XF86Config-4 manual page.
# (Type "man XF86Config-4" at the shell prompt.)
#
# This file is automatically updated on xserver-xfree86 package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xfree86
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following commands as root:
#
#   cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.custom
#   md5sum /etc/X11/XF86Config-4 >/var/lib/xfree86/XF86Config-4.md5sum
#   dpkg-reconfigure xserver-xfree86

Section "Files"
	FontPath	"unix/:7100"			# local font server
	# if the local font server has problems, we can fall back on these
	FontPath	"/usr/lib/X11/ps/misc"
	FontPath	"/usr/lib/X11/ps/cyrillic"
	FontPath	"/usr/lib/X11/ps/100dpi/:unscaled"
	FontPath	"/usr/lib/X11/ps/75dpi/:unscaled"
	FontPath	"/usr/lib/X11/ps/Type1"
	FontPath	"/usr/lib/X11/ps/CID"
	FontPath	"/usr/lib/X11/ps/Speedo"
	FontPath	"/usr/lib/X11/ps/100dpi"
	FontPath	"/usr/lib/X11/ps/75dpi"
EndSection

Section "Module"
	Load	"GLcore"
	Load	"bitmap"
	Load	"dbe"
	Load	"ddc"
	Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"record"
	Load	"speedo"
	Load	"type1"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"keyboard"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xfree86"
	Option		"XkbModel"	"pc101"
	Option		"XkbLayout"	"us"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"ImPS/2"
	Option		"ZAxisMapping"		"4 5"
EndSection

Section "Device"
	Identifier	"SIS 6326 PCI"
	Driver		"radeon"
	BusID		""
	VideoRam	16384
EndSection

Section "Monitor"
	Identifier	"Samsung SyncMaster 713N"
	HorizSync	30-65
	VertRefresh	50-75
	Option		"DPMS"
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Device		"SIS 6326 PCI"
	Monitor		"Samsung SyncMaster 713N"
	DefaultDepth	15
	SubSection "Display"
		Depth		1
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		4
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		8
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		15
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		16
		Modes		"1280x1024"
	EndSubSection
	SubSection "Display"
		Depth		24
		Modes		"1280x1024" "800x600"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
EndSection

Section "DRI"
	Mode	0666
EndSection
   
Today I started with 16 bits per pixel. And it runs as well. This is getting weird. No changes to the hardware (apart from the fact that I reserved 32 MB of main memory for the VGA subsystem:
jan@beryllium:~$ cat /proc/meminfo
MemTotal:       223724 kB
MemFree:          5204 kB
   
223724 KB is 218.5 MB. I have 256 MB in total, so my VGA subsystem eats away 37.5 MB... Or the VGA consumes the requested 32 MB and something else eats up the remaining 5.5 MB. Here is what 'top' has to say:
top - 17:55:49 up 33 min,  1 user,  load average: 0.01, 0.01, 0.00
Tasks:  86 total,   1 running,  85 sleeping,   0 stopped,   0 zombie
Cpu(s):  2.2% us,  0.7% sy,  0.0% ni, 97.0% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:    223724k total,   221784k used,     1940k free,    29796k buffers
Swap:   136512k total,        0k used,   136512k free,   100644k cached
   
which looks pretty much the same as what meminfo reports.

Page created on 16 June 2006 and

Page equipped with FroogleBuster technology