DebiaN
From MyLinuxNotes
... no changes ... no changes ... no changes ... no changes ... no changes ... no changes ... no changes ... no changes ... no changes ... no changes ... no changes ... = General Impressions =
DebiaN can be a real bear to install, but once you do it you'll never have to again.
I really like apt-get and dselect, but they have their problems too. Make sure that you scrutinize the packages that are to be installed, updated and removed because changes could be made that you never intended. This is especially prevelent when changing Debian defaults like Exim and Postgresql.
Contents |
Installation
I have heard that once you get it up and running it is a dream of an OS, but the install can be a real pain.
I have had several experiences with trying to install DebiaN and they have all been bad. I had always been pressed for time, got frustrated, gave up and went back to RedHat. Now that is not an option.
I had 2.2 disks in my office so I figured that I would use them to get a base and do the rest over the Net through apt-get. Problem was my NIC was not detected. It was an Intel PRO/1000 XT and there were no modules (e1000) in the 2.2 kernel. I tried downloading a 3.0 netinstall disk, but that didn't work either.
So I turned to LUG for help. Through a couple of suggestions and reading the manual I found that sometimes at the boot: prompt you can try these options: idepci, vanilla, compact, or bf24. Or in my instance I could boot to Disk 5 which boots the the `bf2.4' flavor (i.e., the 2.4 kernel and the modules I need). I'm downloading it tonight and will find out if it works tomorrow.
It didn't work either. I ran into different problems with it not being able to handle my Adaptec AIC-7899 SCSI card. I read in the install manual that trying
boot: linux aic7xxx=no_probe
That didn't work either.
I just downloaded the sarge (testing) netinst disk and everthing seems to be working now. Fingers crossed....
I don't recommend doing this on a box where you have information you are trying to keep (i.e., a /home partition). I did this and set up a partioning scheme using ext3 that left alone my /home partition. When it was done I had one ext2 partition with no /home!
Well things are going ok so far. I also got it installed on my Dell c840 laptop pretty much right out of the box. The only problem I had was all the tasks didn't install on the first try and X didn't work. So I installed X window task again from tasksel and I got to gdm but that was it. Everytime I tried to start a window manager I got the xsession error:
xrdb: command not found
This was a permissions problem on /usr/X11R6/bin they were 700 and I changed them to 755 and it worked!
Since then I have installed DebiaN several more time on my C840 and took more copius notes of what was happening.
First I tried the boot.iso netinst disk from here and it didn't work out too well. During the task selection there was no option for X or Laptop. Subsequently the display never looked right and I was having trouble getting X installed.
Next I installed sarge (testing) again. Since the installer is a little buggy, here are some notes on what I did:
- I assigned the mount points to my partitions and it prompted me asking if I wanted to erase all data on the partitions to which I said yes. Then I got a blue screen with a white bar across the bottom. The computer didn't seem like it was doing anything (i.e., no noise, hard drive light not flashing) but I waited and it came back. It completed everything just didn't give any indications what it was doing.
- Some time after the above step I was prompted for auto partitioning!?!?!? Which I said no to.
- Eventhough LILO and GRUB are options in the installer menu I was not given the option to choose, it just prompted me to install LILO. I tried hitting ESC and it installed LILO anyway.
- Install MD5 and shadowed passwords
- kdm did not get installed for some reason and I was only able to pick from gdm or xdm.
- Everytime I have tried to install sarge it has tried to install the kernel twice. Telling me the second time that
/lib/modules/2.4.22-1-386was already there and did I want to replace it. I tried this twice and it hosed my kernel both times. So when it says do you want to stop now say yes. See Errors below for a fix.
- When it got to the end I was told some packages did not get installed and did I want to retry. I chose to retry and I was prompted with three options: tasksel, dselect, or nothing. I chose nothing and it installed a lot of packages. I did this serveral times until the only package not installed was the second kernel image.
- When I ultimately got to the command prompt I had problems starting X so I ran
taskselagain for each task I had previously tried to install. A couple said they were all up to date and others installed a bunch of packages. I kept running them until they said they were all up to date.
- At that point
startxstarted kde.
- I then rebooted and I got the gdm screen. I tried to login to kde and I got an error:
Could not read network connection list. DCOPserver_(none)_:0 Please check that the "dcopserver" program is running
Doing a chown -R <my_username> ./ got rid of the problem. I had to do this for both ~/username and ~/root.
If you are still getting the above error, make sure you changed permissions on /usr/X11R6/bin to 755.
PCMCIA was not working at all. Editing the PCIC line in /etc/default/pcmcia:
was PCIC=i82365 it should be: PCIC=yenta_socket
fixed the problem.
Well everthing is now up and running on my laptop, time to work on the server.
Following the above everthing worked out on the server.
The new Beta 3 installer is pretty nice and a great improvement over previous versions, but it can be little confusing. If you are custom partitioning your drive you need to up arrow to change partition types, the bootable flag and if they are used or not.
During my latest install on a Dell Power Edge 6300 I got and error:
error while running modprobe -v cpqarray
This was the incorrect module for my system, but I couldn't get past this point. I switched to another terminal (Alt-F2) and inserted the correct one:
modprobe aacraid
and then I was able to complete the install. One problem though, I forgot to use modconf to make this change permanent. When I rebooted my raid could not be found. I then booted to a rescue disk modconf was not installed so I edited my /etc/modutils/actions to include:
install cpqarray modprobe aacraid
This fixed the problem.
Kernels
When configuring a new kernel I like make xconfig, but an unmodified install of DebiaN doesn't let you run X programs as root. I found if you use su as opposed to su - you can run them.
I have a Dell Poweredge 1500SC that I installed DebiaN on and during the install kernel-image-2.4.22-1-386 was used, but this is a 686-SMP box. I wanted SMP support and since the stock kernel was working well I just used:
apt-get install kernel-image-2.4.22-1-686-smp
Everything I ha read said that doing this would prompt me to run /sbin/lilo and that I would still be able to access my old kernel via Linux.old.
This did not happen. So I poked around and found that everthing in /boot had been renamed with the kernel version appended to the name. Also I found that my original initrd.img and vmlinuz had .old appended to them. Here is what I changed /etc/lilo.conf to:
boot=/dev/sda
prompt
delay = 50
root=/dev/sda5
install=/boot/boot.b
map=/boot/map
image=/vmlinuz
label=Linux
initrd=/initrd.img
image=/vmlinuz.old
label=Linux.old
initrd=/initrd.img.old
Everything seemed to work OK on reboot except that when I tried to login into SquirrelMail it didn't recognize my password. I found that none of my SASL passwords worked and I had to re-enter then and then everything was fine.
On another SMP box the install of the kernel-image...-smp went ok except for lilo. The one parameter that got hosed in my /etc/lilo.conf was:
boot=/dev/hda
The install changed it to:
boot=/dev/hda2
which of course did not work.
I recently tried to compile a new kernel the Debian Way and ran into a problem. Running:
make-kpkg --revision=custom.1.0 kernel_image
gave me the following errors:
In file included from ksyms.c:50: /usr/src/kernel-source-2.4.18/include/asm/checksum.h:72:30: missing terminating " character In file included from ksyms.c:50: /usr/src/kernel-source-2.4.18/include/asm/checksum.h: In function `ip_fast_csum': /usr/src/kernel-source-2.4.18/include/asm/checksum.h:73: error: parse error before "movl" /usr/src/kernel-source-2.4.18/include/asm/checksum.h:75:17: invalid suffix "f" on integer constant /usr/src/kernel-source-2.4.18/include/asm/checksum.h:82:17: invalid suffix "b" on integer constant /usr/src/kernel-source-2.4.18/include/asm/checksum.h:90:13: missing terminating " character /usr/src/kernel-source-2.4.18/include/asm/checksum.h:105:17: missing terminating " character /usr/src/kernel-source-2.4.18/include/asm/checksum.h: In function `csum_fold': /usr/src/kernel-source-2.4.18/include/asm/checksum.h:106: error: parse error before "addl" /usr/src/kernel-source-2.4.18/include/asm/checksum.h:108:17: missing terminating " character /usr/src/kernel-source-2.4.18/include/asm/checksum.h:121:13: missing terminating " character /usr/src/kernel-source-2.4.18/include/asm/checksum.h: In function `csum_tcpudp_nofold': /usr/src/kernel-source-2.4.18/include/asm/checksum.h:122: error: parse error before "addl" /usr/src/kernel-source-2.4.18/include/asm/checksum.h:126:9: missing terminating " character /usr/src/kernel-source-2.4.18/include/asm/checksum.h:128: error: `__x' undeclared (first use in this function) /usr/src/kernel-source-2.4.18/include/asm/checksum.h:128: error: (Each undeclared identifier is reported only once /usr/src/kernel-source-2.4.18/include/asm/checksum.h:128: error: for each function it appears in.) /usr/src/kernel-source-2.4.18/include/asm/checksum.h: At top level: /usr/src/kernel-source-2.4.18/include/asm/checksum.h:128: error: parse error before ')' token /usr/src/kernel-source-2.4.18/include/asm/checksum.h:161:17: missing terminating " character /usr/src/kernel-source-2.4.18/include/asm/checksum.h: In function `csum_ipv6_magic': /usr/src/kernel-source-2.4.18/include/asm/checksum.h:162: error: parse error before "addl" /usr/src/kernel-source-2.4.18/include/asm/checksum.h:173:17: missing terminating " character /usr/src/kernel-source-2.4.18/include/asm/checksum.h:176: error: `__x' undeclared (first use in this function) /usr/src/kernel-source-2.4.18/include/asm/checksum.h:176: warning: no return statement in function returning non-void /usr/src/kernel-source-2.4.18/include/asm/checksum.h: At top level: /usr/src/kernel-source-2.4.18/include/asm/checksum.h:176: error: parse error before ')' token /usr/src/kernel-source-2.4.18/include/asm/checksum.h:176: error: parse error before "__u32" make[3]: *** [ksyms.o] Error 1 make[3]: Leaving directory `/usr/src/kernel-source-2.4.18/kernel' make[2]: *** [first_rule] Error 2 make[2]: Leaving directory `/usr/src/kernel-source-2.4.18/kernel' make[1]: *** [_dir_kernel] Error 2 make[1]: Leaving directory `/usr/src/kernel-source-2.4.18' make: *** [stamp-build] Error 2
This was due to me having gcc 3.3.2 installed. I had to apt-get gcc-2.95 and then use:
MAKEFLAGS="CC=gcc-2.95" make-kpkg --revision=custom.1.0 kernel_image
I had a similar problem with trying to compile dcfl-dd i.e., missing terminating " character. Using gcc-2.95 did the trick. Here is how I used it:
MAKEFLAGS="CC=gcc-2.95" ./configure MAKEFLAGS="CC=gcc-2.95" make make install
I had a 2.4.26-k6 kernel running fine but wanted to try 2.6.12 so I installed it via aptitude. The install required me to purge hotplug and install udev. After this the 2.4.26-k6 kernel still booted but the 2.6.12 kernel would not boot. The boot process would get to the point where it would try to uncompress the kernel image and then reboot.
I tried to create a new initrd image for the 2.6.12 using mkinitrd but that didn't help. During this time I updated my package list and saw that udev had a pending update and there was a 2.4.27-2-k6 kernel available as well. I preformed the upgrade and it hosed my system. The 2.6.12 was still in the reboot loop and the 2.4.27-2-k6 kernel suffered from a kernel panic that looked like this:
... .../ide-core.o: insmod ide-detect failed .../ide-core.o: insmod ide-disk failed Journalled Block Device driver loaded pivot_root: No such file or directory /sbin/init: ... cannot open dev/console: No such file Kernel panic: Attempted to kill init!
To fix this problem I used a knoppix CD. In this instance I booted to just a console by entering knoppix 2 at the boot: prompt. Once there I did the following:
# mount /dev/hda1 /mnt/hda1 -o rw # chroot /mnt/hda1 # mount /proc
You need to mount your root partition as show above because knoppix mounts drives nodev by default. If you don't you'll get /dev/null: Permission Denied errors that will prevent you from installing/removing packages. For more info see this.
Then I uninstalled udev and the 2.6.12 kernel and reinstalled hotplug. The 2.4.27-2-k6 kernel then booted with no problems. I ultimately fixed this problem by installing the generic 486 kernel which booted error free.
Subsequent to the above I ran into some more udev troubles on a box that had previously worked with udev. When upgrading to 2.6.15-1 my network interfaces stopped working. During bootup I saw this in my logs:
ADDRCONF(NETDEV_UP): eth1: link is not ready
So of course ntpd and samba mounts errored out. After some googling and emailing a udev maintainer I found two Debian bug reports in regards to my problem: 350877 & 350183.
In a nutshell I had to write udev rules to create persistent names for my interfaces. Here is my /etc/udev/ethernet.rules:
KERNEL="eth*", SYSFS{address}="00:08:74:92:9c:69", NAME="ethZero"
KERNEL="eth*", SYSFS{address}="00:07:e9:12:50:f1", NAME="ethOne"
The MAC addresses have to use lowercase letters or udev can't find them. Then create a symlink to the file in /etc/udev/rules.d/ like:
ln -s /etc/udev/ethernet.rules /etc/udev/rules.d/030_ethernet.rules
Then you have to edit /etc/network/interfaces to reflect the interface name changes. Some other places that might need editing are your SambaServer and firewall configuration files. Then a reboot and you should be up and running.
On another box after an upgrade and a reboot my network cards were all seen but I had no connectivity. The box had been working fine before. What happened is that udev recognized my cards in a different order than hotplug did so I plugged my cable into another card (guessed right on the first try :)) and everything worked.
udev causing me headaches once again...Here is the error I got from my back system:
The device /dev/nst0 on host muffin is not ready for use. You are requested to check the device for possible errors and to correct them.
Best regards from your backup service.
X
Unlike RedHat, in DebiaN I was unable to start X based programs as root. I don't normally do this but "make xconfig" is kinda of nice to be able to use. I normally use su -, but I found that if you use just su I could open X applications.
Here is an eaiser way by adding this to root's .bashrc:
xauth merge /home/<username>/.Xauthority export DISPLAY=:0
<username> being the user you 'su' from.
As far as logging in via ssh I was also unable to open X applications. First X has to be listening to 6000/tcp. To enable this I edited this line in /etc/X11/gdm/gdm.conf:
command=/usr/X11R6/bin/X -deferglyphs 16 -nolisten tcp -audit 0 to command=/usr/X11R6/bin/X -deferglyphs 16 -audit 0
Then I copied over my ~/.Xauthority from the target machine to the one I am running ssh from and then I was able to run X applications. This is a bastardized way of doing this. See man xauth for the proper way.
When trying use X11 forwarding (ssh -X <hostname>) with ssh and cygwin I got the following error:
X Error of failed request: BadAtom (invalid Atom parameter)
I found the info on this page useful, and here is the solution: use ssh -Y <hostname>
My system bell wasn't working no matter what i changed in the control center. Through googleing I found that if you clear the entries in ~/.kde/share/config/kaccessrc and restart KDE it will work.
To change the default printer in firefox when using Xprint add this line to ~/.bash_profile
export XPRINTER=<printer_you_wan_to_use>
Then restart X.
After doing an upgrade with aptitude and I started having font problems with emacs. I got errors such as:
font not found
or
Could not load any ISO-8859 fonts
I couldn't switch to any fonts other than default without seeing little empty boxes. To fix this restart X.
Mirrors
To check how recently your mirror has synced its packages check out http://mirror.debian.org/status.html. Check out the "Level of freshness" for each mirror to find out. You can find it by following the link for your mirror or it located at the beginning of each line. 1 = the most "fresh".
ieee1394
Here is a really good site to get ieee1394 running. I pretty much followed the site, but I also had to load the sbp2 module and use rescan-scsi-bus.sh to get my devices recognized. I loaded all the modules through modconf so that they would be loaded at boot.
usb
I recently upgraded my kernel and usb stoped working. After a lot of Googling I found the solution... Edit /boot/grub/menu.lst to add acpi=off noapic to the kernel line like:
title Debian GNU/Linux, kernel 2.4.27-1-686 root (hd0,0) kernel /vmlinuz-2.4.27-1-686 root=/dev/sda4 ro acpi=off noapic initrd /initrd.img-2.4.27-1-686 savedefault boot
Well, this didn't work after update-grub was run. The addtion of acpi=off noapic was stripped off. Reading the update-grub man page I found that I had to edit /boot/grub/menu.lst again. Look for the kopt line (make sure you leave it commented):
# kopt=root=/dev/sda4 ro acpi=off noapic
Then when you run update-grub it will append acpi=off noapic to every kernel line.
ksysguard
UPDATE - Checkout question #8 in this DebiaN FAQ.
I wanted to be able to remotely monitor one of my boxes with ksysguardd. I installed it with apt-get but there was no startup script in the package. I created this init script to start and stop ksysguardd:
#! /bin/sh
# /etc/init.d/ksysguardd: start the System Monitoring daemon.
PATH=/bin:/usr/bin:/sbin:/usr/sbin
pidfile=/var/run/ksysguardd.pid
binpath=/usr/bin/ksysguardd
args='-d -i'
test -f $binpath || exit 0
running()
{
# No pidfile, probably no daemon present
#
if [ ! -f $pidfile ]
then
return 1
fi
pid=`cat $pidfile`
# No pid, probably no daemon present
#
if [ -z "$pid" ]
then
return 1
fi
cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1`
return 0
}
case "$1" in
start)
echo "Starting system monitoring daemon: ksysguardd"
start-stop-daemon --start --quiet --exec $binpath -- $args
;;
stop)
echo "Stopping system monitoring daemon: ksysguardd"
start-stop-daemon --stop --quiet --exec $binpath --pidfile $pidfile
;;
restart|force-reload)
echo "Restarting system monitoring daemon: ksysguardd"
start-stop-daemon --stop --quiet --exec $binpath --pidfile $pidfile
sleep 1
start-stop-daemon --start --quiet --exec $binpath -- $args
;;
*)
echo "Usage: /etc/init.d/klogd {start|stop|restart|force-reload}"
exit 1
esac
exit 0
Just put the script in /etc/init.d/ and make sure you chmod 755 ksysguardd. Then update your init scripts.
Errors
Here is one I got on installing DebiaN on both my laptop and server:
You are attempting to install a kernel image (version 2.4.18-1-386) However, the directory /lib/modules/2.4.18-1-386 still exists. If this directory belongs to a previous kernel-image-2.4.18-1-386 package, and if you have deselected some modules, or installed standalone modules packages, this could be bad. However, if this directory exists because you are also installing some stand alone modules right now, and they got unpacked before I did, then this is pretty benign. Unfortunately, I can't tell the difference. If /lib/modules/2.4.18-1-386 belongs to a old install of kenel-image-2.4.18-1-386, this is your last chance to abort the installation of this kernel image (nothing has been changed yet). If this directory is because of stand alone modules being installed right now, or if it does belong to an older kernel-image-2.4.18-1-386 package but you know what you are doing, and if you feel that this image should be installed despite this anomaly, Please answer n to the question. Otherwise, I suggest you move /lib/modules/2.4.18-1-386 out of the way, perhaps to /lib/modules/2.4.18-1-386.old or something, and then try re-installing this image. Do you want to stop now? [Y/n]
I tried both all the options in the error message, but my system would always hang at LILO. I found that if you just say "n" and then when the update/install is done run /sbin/lilo before rebooting and everything was cool.
I have seen this a few times when upgrading my system:
localhost:~# apt-get upgrade Reading Package Lists... Done Building Dependency Tree... Done The following packages have been kept back <snip> 2 upgraded, 0 newly installed, 0 to remove and 71 not upgraded.
To get all the packages upgraded run dselect and choose "Install and upgrade wanted packages.".
I saw this one in my logs after upgrading:
/etc/modules.conf is more recent than /lib/modules/2.4.22-1-686-smp/modules.dep
To fix this run update-modules.
On the kde front, I recently rebooted my box and found that during an update it had been removed. I did get it reinstalled. I started installing through apt-get but it didn't install everything. The package that I installed was kwin. I got errors in ~/.kde3-errors that it couldn't find ksplash ksmserver and kreadconfig. ksplash and ksmserver are their own packages and kreadconfig is part of kdebase. I then used dselect to install kdebase, which fixed it all.
I didn't like that xterm did not show the user and host of the current session in the title bar. Here is what I added to my ~/.bashrc fix that:
#Set xterm title
case $TERM in
xterm*)
PS1="\[\033]0;\u@\h: \w\007\][\u@\h:\w]\$ "
;;
*)
PS1="[\u@\h:\w]\$ "
esac
export PS1
This will result in a title bar with username@host:working_dir\$ and a similar prompt. The title bar is between the \033 and \007.
For more info check out the HOWTO.
I was having problems with ssh conncetions being dropped while I was connected from my Winblow$ box (don't ask) at home to my servers at work. I was connecting with both Putty and cygwin through a Linksys router. I upgraded the firmware on my router, which fixed the problems with Putty, but I was still having problems with cygwin. I found that my problem was Zonealarm. Looking in the logs I found that it was dropping outbound syn connections to my servers. I added my servers to be trusted and my problems were solved.
I was recently trying to install a perl module from CPAN and I got the following error:
<snip> /usr/lib/perl/5.8.2/CORE -lperl -ldl -lm -lpthread -lc -lcrypt --output ./par /usr/bin/ld: cannot find -lperl collect2: ld returned 1 exit status make[1]: *** [par] Error 1 make[1]: Leaving directory `/home/quincy/.cpan/build/PAR-0.79/myldr' make: *** [subdirs] Error 2 /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible
To fix this:
ln -s /usr/lib/libperl.so.5.8.2 /usr/lib/perl/5.8.2/CORE/libperl.so
Then I did a:
cpan> force install <module_name>
Running apt-get update recently I got this error:
Reading package lists... Done W: GPG error: http://debian.lcs.mit.edu testing Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 010908312D230C5F W: You may want to run apt-get update to correct these problems
After some googling I found this fix:
$ gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 010908312D230C5F $ gpg --armor --export 010908312D230C5F | sudo apt-key add - $ apt-get update
