Switch to Normal Style Sheet
Site Icon The Lab Book Pages Andrew Greensted (Modified: 08 January 2008)
Computing > Linux

Linux

Just general stuff to keep a linux box working.

Divider Bar Go to page top

• Format Floppy Disk under Linux

There are two stages to this process, the first performs the format, the second creates a filing system.

> fdformat /dev/fd0
> mkfs.msdos /dev/fd0

On a gentoo system, fdformat is part of sys-apps/util-linux, mkfs.msdos is part of sys-fs/dosfstools. By adding the following line your fstab file users will be able to mount the floppy disk.

• File Excerpt: /etc/fstab
/dev/fd0  /mnt/floppy  auto  noauto,user,exec  0  0
Divider Bar Go to page top

• Gentoo and a Matrox G550 Graphics Card

Getting my Matrox G550 card to work under Gentoo with dual-head and xinerama was a struggle. Here's the way I got it working.

The battle was divided between getting the right Matrox driver, and getting the xorg.conf file correct. In the end I used the drivers available from the latest SuSE distribution as they were compiled for the right version of X. Then hacking the xorg.conf till everything stopped grumbling.

First, you need to download the xorg-x11-server rpm from SuSE (or preferably a mirror).

> wget ftp.suse.com/pub/suse/i386/9.3/suse/i586/xorg-x11-server-6.8.2-30.i586.rpm

Then extract the drivers form the rpm.

> rpm2targz xorg-x11-server-6.8.2-30.i586.rpm
> tar -zxf xorg-x11-server-6.8.2-30.i586.tar.gz \
  ./usr/X11R6/lib/modules/drivers/mga_drv.o \
  ./usr/X11R6/lib/modules/drivers/mga_hal_drv.o

The two extracted files, mga_drv.o and mga_hal_drv.o, then need to be copied over so X can find them.

> cp usr/X11R6/lib/modules/drivers/mga_drv.o /usr/lib/modules/drivers/
> cp usr/X11R6/lib/modules/drivers/mga_hal_drv.o /usr/lib/modules/drivers/

The final part is to get the /etc/X11/xorg.conf right. This xorg.conf file makes things work nicely. Note: It seems that it is not possible to get any 3D acceleration with the G550 card when it is in dual head xinerama mode.

The important kernel configurations are shown below. Basically, enable /dev/agpgart, and the correct chipset for your motherboard. But do not enable DRM (Direct Rendering Manager).

Device Drivers  --->
  Character devices --->
    <*> /dev/agpgart (AGP Support) 
    <*>   Intel 440LX/BX/GX, I8xx and E7x05 chipset support (OR WHICHEVER MOBO CHIPSET)
    < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
Divider Bar Go to page top

• Console Login Screen Message (/etc/issue)

The message displayed at the console login screen is controlled by the file /etc/issue. Personally I think it's handy if on logout the screen is cleared before the login prompt is given. It hides any work left from the previous session. Using the right escape codes you can achieve this.

Below is an example issue file.

File: /etc/issue
^[[2J^[[f
This is \n.\O (\s \m \r) \t

The two ^[ parts on the first line are escape codes and must be entered in the correct way. In vim (in insert mode) type ctrl-v, then ctrl-[.

Divider Bar Go to page top