[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Debian linux and X11 installation

On Thu, 9 Apr 1998, Oliver Elphick wrote:

> Valerie CAYOL wrote:
>   >I have been desperatly trying to install linux debian
>   >on my pc. I am using a CD provided by the magazine dream,
>   >and so far I have performed the basic installation.
>   >Severall problems have appeared :
>   >1- in the section of the configuration called Configure device driver I was
>   >not able to find the internet card I am using.
>   >This card is compatible Ne 2000, at irq = 11 and io = \0xFF80. But
>                                                             ^^
> That seems an unusual address.  Is this hardwired, or can you change the
> card to use a different address?

Is this a PCI ne2000-compatible card? I have a couple of those and they
can be a real pain. Later kernels than the one on the standard bootdisks
of Debian's last release (that is probabbly what is on your CD) have
better support for these PCI ne2000 network cards. 

If you can get the installation generally working, you can get a newer
kernel from the ftp archive ftp.debian.org and maybe a newer kernel will
recognize your network card. 

Even better is to compile a kernel yourself, with only drivers enabled for
devices you have. Install package kernel-package and read the docs in
/usr/doc/kernel-package. Basically, this helps you compile a kernel and
turn the kernel into a .deb package, complete with installation and
removal scripts. Very easy. 

>   >specifying these values caused the installation to fail,
>   >so I did not give any devide driver and of course the network connection
>   >does not work. Does anyone know what I can do about that ?
>   >2- I don't unsderstand how dpkg works and how to start it.
>   >It is supposed to be simple so I really think I missed something. When
>   >writing simply dpkg I get a simple help.
> Typically: `dpkg -i <package>_<version>.deb'.  You can do other things, but
> in your current state of knowledge it may not be advisable.

Use dselect. It's much better to work with if you want to install many
packages. But there's two caveats: 

Caveat one: read the informative help screens that dselect pops up when it
starts. Really do, because if you get confused and press the wrong
buttons, dselect can be scary. Read the help screens and you'll have
hardly any problems with the best package manager there currently is.

Caveat two:  don't install 100 new packages at the same time. You'll have
a hard time keeping track of everything that's happening, assuming that
you did not get lost in the dependency resolution parts of dselect. 
Dselect is a great tool for letting you do so many things with so little
keystrokes, but there's a risk in that as well - don't push your limits. 

Be wise and stick with the default selection the first time you use
dselect. When installing those was successful, install another 20 to 25
packages. Correct any problems by hand if necessary, either by quitting
dselect and using "raw" dpkg or by simply marking the broken package for
removal and running the "remove" step in dselect.

>   >3- Instead of using dpkg, I tried to use dselect to install x11, and then I
>   >was asked many questions I did not know the answer of : mouse devise,
>   >monitor resolution and frequency,
>   >etc ... 

Installing X11 can be very hard and it can be very easy. If you don't know
where the mouse device is and what your monitor's scan frequencies are or
what kind of videocard you have, you're in for a hard time. 

When I first installed X11, little more than a year ago, I read a lot of
README's and man pages. That took me a day, but after that I generally
knew what I was doing and found setting up X with xf86config quite easy. 

Nowadays, there is the excellent XF86Setup GUI tool, that makes life a lot
easier than xf86config. The program is included in the xserver-vga16
package, so be sure to install both xserver-vga16 and the xserver that
fits your videocard.

In XF86Setup, you can select the mouse you have - with your mouse! The
program will detect a lot, only if you choose a wrong mouse driver to try,
you might have to choose the default with keyboard keys.

It doesn't detect your card, you have to know that yourself. You might
have to open up the computer case and look at the chip on the videocard.
If there still is a partition with windows95 on the harddisk, you can boot
windows to peek at the device settings to see what card you have. 

There is no way for XF86Config to know your monitor either. You'll have to
set this yourself. You don't have to set frequencies anymore if you don't
want to (but it gives more optimal results if you can.) If you know that
your monitor can do at least 800x600, then you tell XF86Setup to use that
settings. The program will then use the frequency setting it associates
with that resolution, those are the most common and safe settings. Be
careful not to experiment with the monitor settings without good detailed
knowledge about the monitor's parameters. Setting the wrong values can
really break your monitor. So, unless you can find the exact 
specifications of your monitor (either in a manual or on the web) just
select a resolution that you're sure your monitor handles, then you'll get
reasonably safe values.

Hopefully, you now have a working configuration. If not, you'll have to
read the documentation in /usr/doc/X11/ anyway. It will probably just
work if you follow the steps described above. 

After you have it working, it might be nice to read the XF86Config(5)
manpage, because you might want to tune your setup slightly. For instance,
you'll want to specify the default resolution that X start up in.
Otherwise, you'll find yourself changing the default resolution with
Ctrl-Alt-<keypad plus> or Ctrl-Alt-<keypad minus> every time that you
start X. And you might want to run X in 65535 color mode instead of the
default 256. You can specify a server option on the command line every
time you start x, but you can also put a "DefaultColorDepth" parameter in
/etc/X11/XF86Config. Just read the manpage to see what more there is to
tune. The actual config file /etc/X11/XF86Config has a lot of descriptive
comments in it as well.

You can start the xserver manually as a normal user, with the command
startx (or "startx -- -bpp 16" for 16-bit color.) The xserver is killed
either by killing the window manager or by directly killing the server,
with the Ctrl-Alt-Backspace key combination.

Alternatively, you can use xdm (X Display Manager) to mange X sessions,
complete with login authentication.  But you want to make sure that startx
works flawlessly before you enable xdm.

There are two common problems associated with xdm: either it doesn't start
the xserver or it starts the xserver too often. The first is a xdm
configuration problem, the second a xserver configuration problem.

The first problem is easiest to fix. Make sure that in /etc/X11/config
there is a line:


Next, make sure that the file /etc/X11/xdm/Xservers ends with the line:

  :0 local /usr/X11R6/bin/X

For unclear reasons, the above line is not always added by the xserver
setup scripts. The result is, that although xdm is running, it doesn't
appear to be, because xdm isn't starting the xserver.

The second problem is alsmost always caused by a bad configuration of the
xserver and is much more of a pain to fix because you're in a situation
where instead of nothing, too much is happening. 

The problem with a failing xserver can be caused by a change of kernel and
having forgotten to compile support for one's mouse device (stops the
xserver) or unix domain sockets (only possible to forget with 2.1.xx
kernels.) In these cases, a backup kernel is often available and booting a
known good kernel cures the problem temporarily so the problem can be
fixed (build a better kernel or reinstate the old one as default.) 

The second possible cause is a far bigger problem: a faulty
/etc/X11/XF86Config file. You'll have to disable automatic startup of xdm,
fix the configuration and test it with startx before reenabling xdm.

The punishment for not making sure that xdm can start the xserver
without problems is that you'll have a very hard time to log in and repair
the situation if things go wrong. The reason being that xdm keeps
restarting the xserver, even if the xserver keeps dying after a second.
The result is that you can't log in on a virtual console anymore, because
every time a xserver is started, it grabs the console. By the time you
have switched back to a virtual console, it has died and a new xserver is
spawned by xdm and it grabs the console. 

This all happens very fast. Your only rescue would be to login over
ethernet of an attached serial console and kill xdm ("killall xdm" or -
much better - "/etc/init.d/xdm stop".) If that is not possible, your only
chance (besides doing a hard reset, which is a Bad Thing) is to hit both
Ctrl-Alt-F1 (to switch to a virtual console) and Ctrl-Alt-Delete (to tell
the init program to do a "shutdown -r now") _very_fast_. After doing this
for 30 seconds, you'll be lucky and the machine starts a controlled

Next, when it reboots, you'll have to supply some special parameters to
prevent the same disaster from happening again. There are a few

- Method one:
  Type "linux emergency" on the lilo command line. As a result, almost all
  startup scripts are skipped and you boot into a _very_ barebones linux
  system. Unless you really, really screwed up your system, this is not
  necessary in general.

- Method two:
  Type "linux single" on the command line. As a result, you'll boot linux
  in single user mode. Xdm is not started in single user runlevel, it is
  only started at a higher runlevel (read "man init" if you're interested
  about runlevels.) You'll be asked for the root password when it has
  finished booting and when you log in, you can fix the problem by editing
  the relevant configuration files. In this case:

    vi /etc/X11/config

- Method three:
  Boot from a "rescue disk". The debian bootdisk is a good rescue disk. It
  has an independent file system and you're booting a standalone unix
  system that is not affected by the misconfiguration or damage to the
  system on your harddisk. In case of the debian rescue disk, type Alt-F2
  to go to the second virtual console and start a shell by hitting enter.
  Now you can mount your harddisk root partition:

    mount -t ext2 /dev/hda1 /mnt

  And fix the problem, in this case /etc/X11/config (on the just mounted
  partition of course, not on the rescue disk's root partition!):

    vi /mnt/etc/X11/config

The reason to edit /etc/X11/config is because it contains a line that
decides if xdm will be started at boot or not. The line in question is a
line that starts with "start-xdm". If there is no such line, there will be
no attempt at boot time to start xdm. So, to fix things temporarily,
change the line into "no-start-xdm" (if you're unfamiliar with vi: go to
the beginning of the line, press "i", type "no-" and press Escape. Then
type ":wq" to write out the changes and quit.) That way, it doesn't start
with "start-xdm" anymore. It's also very easy to enable xdm again when you
trust it to work well; just remove the "no-" part. 

>   >Is there a way to know what questions will be asked in advance
>   >in order to avoid leaving blank answers ?
>   >Can't all this be done automatically as it is the case for
>   >windows, for instance ?
> Unfortunately not.  The reason is that there is a vast range of hardware
> that might be used and its manufacturers don't provide Linux drivers as
> they do Windows ones. 

If you want to run linux, you're having more fun if you're not afraid to
look into technical matters. Part of the fun of linux is the fact that you
can do so and that you keep control over the things the system does.

That is very much unlike windows. Sometimes things are easier with
windows, sometimes windows can bring you to total agony, when it keeps
making the wrong decision for you and there is nothing you can do about
it. I recently lost a whole weekend fighting with a windows95 driver that
just wouldn't install right and could not be uninstalled by other means
than complete reinstallation of entire windows + all apps on a clean
formatted disk. 

Partly, linux isn't finished yet and a lot of user-friendlyness still has
to be implemented (care to write some?) Partly, linux will never be full
of "wizards", because most linux users feel that isn't the right way

With windows, you'll get used to having (and coping with) a "wizard." 
With linux, you'll get to used having to be a guru. 



To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: