Newsgroups: comp.os.linux.setup
Newsgroups: comp.os.linux.setup
> Debian modprobe complains that my /etc/modules.conf is newer > than some cached value, how can I fix that?
depmod -a
It's complaining that your modules.conf has changed and you should refresh the dependency information for the kernel modules.
> No rcconf package for "testing"! It's available for stable and unstable > though.
Try sysvconfig. It has all the functionality of rcconf (and more). :)
Dead Parrot 10-03-2004
I'm running testing root@poseidon ~ # apt-cache search rcconf rcconf - Debian Runlevel configuration tool
darthtux 10-06-2004
Debian Runlevel configuration tool This tool configures system services in connection with system runlevels. It turns on/off services using the scripts in /etc/init.d/. Rcconf works with System-V style runlevel configuration. It is a TUI(Text User Interface) frontend to the update-rc.d command.
Newsgroups: gmane.linux.debian.user Date: Fri, 09 Jul 2004 18:11:27 -0400
Q: In RedHat, the chkconfig can also be used to generate a code skeleton that have start/stop, etc. Can we do it in debian?
Q: what is the right way to specify a service that only has start but no stop?
I just can't get it right. from the man page it is:
,----- | update-rc.d [-n] name defaults [NN | NN-start NN-stop] `-----
% update-rc.d local defaults 80-start update-rc.d: error: codenumber must be a number between 0 and 99 usage: update-rc.d [-n] [-f] <basename> remove update-rc.d [-n] <basename> defaults [NN | sNN kNN]
% update-rc.d local defaults s80 update-rc.d: error: codenumber must be a number between 0 and 99 update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
% update-rc.d local start 80 update-rc.d: error: expected runlevel [0-9S] (did you forget "." ?)
% update-rc.d local start 80 . update-rc.d: error: expected runlevel [0-9S] (did you forget "." ?)
> I just can't get it right. from the man page it is: > > ,----- > | update-rc.d [-n] name defaults [NN | NN-start NN-stop] > `----- > > % update-rc.d local defaults 80-start
You misread the usage line. The '|' means "or", so you need to use one of these two forms:
update-rc.d name defaults NN update-rc.d name defaults NN-start NN-stop
Adam Aube
> what is the right way to specify a service that only has start but no > stop? > > % update-rc.d local start 80 .
station:~# update-rc.d local start 80 2 3 4 5 . Adding system startup for /etc/init.d/local ... /etc/rc2.d/S80local -> ../init.d/local /etc/rc3.d/S80local -> ../init.d/local /etc/rc4.d/S80local -> ../init.d/local /etc/rc5.d/S80local -> ../init.d/local station:~#
Thomas Adam
Debian's official rc.local is /etc/rc.local. It is provided by the 'initscripts ' package.
$ ls -l /etc/init.d/rc.local /etc/rc.local -rwxr-xr-x 1 root root 801 09-08 02:29 /etc/init.d/rc.local -rwxr-xr-x 1 root root 306 09-29 10:33 /etc/rc.local
#! /bin/sh ### BEGIN INIT INFO # Provides: rc.local # Required-Start: $local_fs $remote_fs # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Run /etc/rc.local if it exist ### END INIT INFO [...] do_start() { if [ -x /etc/rc.local ]; then [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)" /etc/rc.local [ "$VERBOSE" != no ] && log_end_msg $? fi } case "$1" in start) do_start ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; [...]
$ grep rc.local /etc/runlevel.conf 99 - 2,3,4,5 /etc/init.d/rc.local
I.e., the /etc/init.d/rc.local starts /etc/rc.local, which is:
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. exit 0
$ dpkg -S /etc/init.d/rc.local initscripts: /etc/init.d/rc.local
$ apt-cache show initscripts Package: initscripts Priority: required [...] Description: Scripts for initializing and shutting down the system The scripts in this package initialize a standard Debian GNU/Linux system at boot time and finalize it at halt or reboot time. Tag: admin::boot, admin::power-management, interface::daemon, role::sw:utility, use::configuring
documented on: 2006.10.31
Craig McPherson
The question is "What's the Debian equivalent of rc.local" or "Where can I put startup commands in Debian?"
Create your rc.local file like this (as root):
touch /etc/init.d/rc.local chmod 774 /etc/init.d/rc.local
Set it to be run at boot time by doing this:
update-rc.d -f rc.local start 99 2 3 4 5 .
Edit your /etc/init.d/rc.local script.
This assumes you want to run your script in runlevels 2, 3, 4, and 5. If you only want to run it in say, runlevel 3, remove the 2, 4, and 5. Don't forget the period at the end. This also assumes you want to run it last (99) during the bootup process. This is generally what you want to do, to make sure your network connection is up and all the basic services are started before your custom startup script runs. Use a value smaller than 99 if you want it run sooner.
If you want your script to ALWAYS be run, no matter what runlevel you boot into, even in Single User Mode (runlevel 1), make your symlink in /etc/rcS.d instead of /etc/rcX.d.
If for some reason you have commands you need to run sometime eariler in the bootup process, you can create multiple scripts this way. It doesn't matter what you name them, just stick them in /etc/init.d, then use update-rc.d to put symlink in /etc/rcX.d.
In many distributions you can add commands to run certain programs at the end of the boot process after all system services have been started into the /etc/rc.d/rc.local file, however there is no such file in a Debian system. Here is the way to accomplish the same thing the debian way:
Make a file called /etc/init.d/local with a text editor. This file is a script so it should always start with the following line:
#! /bin/sh
Next, for example I have an always on cable modem and I want to use rdate to update the system time to atomic clock time at startup, so I add the following command to the file:
rdate -s clock-1.cs.cmu.edu && hwclock --systohc
(The rdate command updates your system time, then the hwclock command updates the bios clock)
Make this file executable with:
chmod +x /etc/init.d/local
Next, link the new local file by running:
update-rc.d local defaults 80
No, it is not rc.local equivalent:
% update-rc.d local defaults 80 Adding system startup for /etc/init.d/local ... /etc/rc0.d/K80local -> ../init.d/local /etc/rc1.d/K80local -> ../init.d/local /etc/rc6.d/K80local -> ../init.d/local /etc/rc2.d/S80local -> ../init.d/local /etc/rc3.d/S80local -> ../init.d/local /etc/rc4.d/S80local -> ../init.d/local /etc/rc5.d/S80local -> ../init.d/local
It is also called when shutting down.
The right way is:
% update-rc.d local start 80 2 3 4 5 . Adding system startup for /etc/init.d/local ... /etc/rc2.d/S80local -> ../init.d/local /etc/rc3.d/S80local -> ../init.d/local /etc/rc4.d/S80local -> ../init.d/local /etc/rc5.d/S80local -> ../init.d/local
T
documented on: 2004.07.09
Newsgroups: gmane.linux.debian.user Date: Wed, 03 Aug 2005 08:22:59 +0000
Make a file called /etc/init.d/local with a text editor. This file is a script so it should always start with the following line:
#! /bin/sh
Add the following command to the file:
mysql -u root --password=passwd syslog < /tmp/mysql.pipe
Make this file executable with:
chmod +x /etc/init.d/local
Next, link the new local file by running:
update-rc.d local defaults 80
Florian Dorpmueller
make the service only has start but no stop:
station:~# update-rc.d local start 80 2 3 4 5 . Adding system startup for /etc/init.d/local ... /etc/rc2.d/S80local -> ../init.d/local /etc/rc3.d/S80local -> ../init.d/local /etc/rc4.d/S80local -> ../init.d/local /etc/rc5.d/S80local -> ../init.d/local station:~#
Thomas Adam
Newsgroups: gmane.linux.debian.user Date: Sat, 29 Jan 2005 11:41:18 +0000 (UTC)
> Linux-PAM sysadmin guide, in /usr/share/doc/libpam-doc/ in the section > "Set/unset environment variables".
That s a good start.
But no there is no debian documentation/policy about environment/profile. In fact there is a "war" between maintenair about who set what (only for the PATH variable as far as i know). Thus you cannot set the PATH var in /etc/environment and expect it to be used by all apps (shells, cron dameon, gdm , … overwrite it all the time).
/etc/environment is used by all applications. It is not a shell script (not like /etc/profile where you can use export, alias, etc). You can only set key pair values like:
LANG=fr_FR.UTF-8@euro NNTPSERVER=localhost
If your application use pam check that its /etc/pam.d script have a pam_env rule:
/etc/pam.d/ssh # PAM configuration for the Secure Shell service # Read environment variables from /etc/environment and # /etc/security/pam_env.conf. auth required pam_env.so # [1] # Standard Un*x authentication. @include common-auth # Standard Un*x authorization. @include common-account # Standard Un*x session setup and teardown. @include common-session # Print the message of the day upon successful login. session optional pam_motd.so # [1] # Print the status of the user's mailbox upon successful login. session optional pam_mail.so standard noenv # [1] # Set up user limits from /etc/security/limits.conf. session required pam_limits.so # Standard Un*x password updating. @include common-password
As told there the pam_env module not only export the variables you setted in /etc/security/pam_env.conf but also those in /etc/environment. All applications are supposed to read /etc/environment anyway. http://publib.boulder.ibm.com/infocenter/pseries/topic/com.ibm.aix.doc/fil es/aixfiles/environment.htm gives an idea of how things work on unix. as i told the PATH part is wrong on debian.
A few real examples:
console login with bash as the default shell:
/etc/login.defs
pam_env : /etc/environment then /etc/security/pam_env.conf
/etc/profile then ~/.bash_profile or if it does not exists ~/.profile
xdm,gdm,kdm (maybe others too):
pam_env : …
/etc/X11/xdm/{../Xsession|Xstartup} scripts /etc/gdm/{Xsession|PreSession/Default|PostSession/Default} scripts , /etc/kde3/kdm/{Xsession, ….}, only touch PATH and sometimes LANG if not already defined.
~/.dmrc : default session and lang if choosen in the login manager
/etc/X11/Xsession.d/ scripts : like /etc/profile and ~/.profile for bash. You should add your own script there.
ssh with a bash shell:
pam_env
/etc/profile and ~/.bash_profile (xor ~/.profile).
To sum up /etc/environment is great to set variables like the news server, the proxy and other things that no scripts used to care about. For lang and things like JAVA_HOME, you should clean all your bash specific tweaks in /etc/profile to be able to change the setting from /etc/environment and forget about it.
For PATH it is useless, every daemon/shell/X11 login manager redefine PATH afterwards. (i am looking after the day when a pam_path session module will exists !)
The last thing is that its a standard for all unix applications. There is no other file for that.
Alban Browaeys
Newsgroups: gmane.linux.debian.user Date: Fri, 24 Sep 2004 14:48:19 +0200
> When Debian is booted i find that /tmp is cleaned.. > How do i disabled it?
Check /etc/init.d/bootclean.sh and /etc/rcS.d/S35mountall.sh.
Andreas Janssen
Look in /etc/init.d/bootmisc.sh, towards the end there is an uncommented line like this "rm -f /tmp/.clean /var/run/.clean /var/lock/.clean". Comment it. Do other files other than the dotted files disappear?
Raghavendra Bhat
> When Debian is booted i find that /tmp is cleaned.. > How do i disabled it?
The correct way is to use /var/tmp for temp files instead; /tmp is supposed to be cleaned on boot, /var/tmp is supposed to remain.
*Tags*: Switching from dynamic to static IP for Debian network
edit
/etc/network/interfaces
then
/etc/init.d/networking restart
Newsgroups: gmane.linux.debian.user Date: Wed, 16 Feb 2005 11:57:05 -0500
My IP get changed by my router from time to time, and there is no way to assign a fixed IP from the router side.
So I need to switch from dhcp to static IP.
I've done that in RH before. Basically, I only need to change the following two files:
/etc/sysconfig/network:
NETWORKING=yes HOSTNAME=xpt GATEWAY=192.168.0.1
/etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE=eth0 BOOTPROTO=static IPADDR=192.168.0.100 NETMASK=255.255.255.0 GATEWAY=192.168.0.1 ONBOOT=yes
However, I found that the file /etc/sysconfig/network does not exist in Debian. What files should I change in Debian? Thanks.
> Debian. What files should I change in Debian? Thanks.
The 'Debian Way' to do this doesn't involve editing files directly.
Install the program etherconf (or use dpkg-reconfigure etherconf if you already have it) and it will ask you questions about your IP setup (DHCP, or static, gateways DNS etc.) and write out the appropriate files for you.
Dave Ewart
> I've done that in RH before. Basically, I only need to change the > following two files: [...]
Just one in Debian: /etc/network/interfaces (assuming your nic is not pcmcia).
Jacob S
/etc/network/interfaces
change 'dhcp' to 'static'
then add
address xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx gateway xxx.xxx.xxx.xxx
Matt Johnson
> So I need to switch from dhcp to static IP.
edit /etc/network/interfaces
change
auto eth0 iface eth0 inet dhcp
to
auto eth0 iface eth0 inet static address 192.168.0.100 network 192.168.0.0 netmask 255.255.255.0 gateway 192.168.0.1 broadcast 192.168.0.255
Matt Zagrabelny
Newsgroups: gmane.linux.debian.user Date: Wed, 15 Dec 2004 00:51:22 +0000
> > I remember that my previous distro can distinguish symbolic links as good > > or bad: good links are show as normal link color whereas bad links are > > shown as red.
> Ok, let's take a look at an example: > > touch a > ln -s a l1 > ln -s no l2 > rm no > > ls --color=auto > > Do l1 and l2 show up in same color? > > In my Debian, they are, but in my RH, l2 show up red.
Have you tried doing a eval `dircolors -b` before the ls command? This defines the LC_COLORS variable that is used to decide what colours are used. You can get pretty colours for all sorts of things if you want to play about with dircolors but by default broken links are in red, and common image file extension in magenta etc.
IIRC it was already in the bashrc file - it just needed uncommenting.
Jason Chambers
Thank you very much Jason!
Of all the replies, only yours give the correct answer to my problem.
Just for the archive, as the result, before the eval, both my l1 and l2 are in magenta, whereas after the eval, l2 show up red.
T
documented on: 2005.01.15
Newsgroups: gmane.linux.debian.user Date: Fri, 13 Aug 2004 21:56:17 -0400
> I've just noticed that my debian testing open many ports by default: > > tcp 0 0 *:dict *:* LISTEN > tcp 0 0 *:time *:* LISTEN > tcp 0 0 *:discard *:* LISTEN > tcp 0 0 *:682 *:* LISTEN > tcp 0 0 *:daytime *:* LISTEN > tcp 0 0 *:sunrpc *:* LISTEN > tcp 0 0 *:www *:* LISTEN > tcp 0 0 *:x11-1 *:* LISTEN > tcp 0 0 *:auth *:* LISTEN > tcp 0 0 *:ssh *:* LISTEN > tcp 0 0 cxmr.dyndns.org:8118 *:* LISTEN > tcp 0 0 cxmr.dyndns.org:822 *:* LISTEN > tcp 0 0 *:ipp *:* LISTEN > tcp 0 0 *:3128 *:* LISTEN > > udp 0 0 *:discard *:* > udp 0 0 *:676 *:* > udp 0 0 *:679 *:* > udp 0 0 *:icpv2 *:* > udp 0 0 *:bootpc *:* > udp 0 0 *:sunrpc *:* > udp 0 0 *:ipp *:* > > How can I close them?
Uninstall the respective services. Or, use a firewalling system (dedicated firewall, iptables, etc…)
To find out what service uses what port:
stefan:~$ sudo lsof -i tcp:www # substitute your port name/number Password: COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME apache 221 root 16u IPv4 173 TCP *:www (LISTEN) apache 629 root 16u IPv4 173 TCP *:www (LISTEN) apache 630 root 16u IPv4 173 TCP *:www (LISTEN) apache 631 root 16u IPv4 173 TCP *:www (LISTEN) apache 632 root 16u IPv4 173 TCP *:www (LISTEN) apache 633 root 16u IPv4 173 TCP *:www (LISTEN)
Note that some services have options to use UNIX-domain sockets exclusively, such as the X-server (look for -nolisten tcp, etc).
You probably don't use all of these:
Webserver? If no, no apache. Dict Server? Disable. The client uses dict.org, not localhost. XServer? If you don't use the windowing system, get rid of it (note: _not_ using it is rare, GNOME/KDE require it) SSH? CUPS? (network printing)
As for discard/time/daytime, you need to comment out lines in your /etc/inetd.conf (but how can you exploit a service whose purpose is to discard everything you throw at it?)
> I've just noticed that my debian testing open many ports by default:
Some of them are opened by inetd. You can use "dpkg-reconfigure inetd", or edit /etc/inetd.conf and comment out the protocols you don't need. After that, restart inetd.
> tcp 0 0 *:www *:* LISTEN
This is a web server, maybe apache. It probably runs in standalone mode. If you don't need it, deinstall it. You can also bind it to some or several IPs like Cups or ssh.
> tcp 0 0 *:x11-1 *:* LISTEN
Check your login manager. Maby it opens a port. Look for Xservers files on your system. If you use kdm, open /etc/kde3/kdm/Xservers, and change all the lines like this:
original: :0 local@tty1 /usr/X11R6/bin/X vt7
changed: :0 local@tty1 /usr/X11R6/bin/X -nolisten tcp vt7
> tcp 0 0 *:auth *:* LISTEN
Some identd, like oidentd or pidentd. Probably run from inetd, and pretty harmless. You may need this one for some IRC networks. If you don't need it, deinstall it.
> tcp 0 0 *:ssh *:* LISTEN
Well, you should know what this is. You can configure ssh to listen only to selected IPs, e.g. those of your LAN interface, if you want. Check the sshd_config man page.
> tcp 0 0 *:ipp *:* LISTEN
Probably Cups printing. If you only use the printer on the computer Cups runs on, open /etc/cups/cupsd.conf, replace "Port 631" by "Listen 127.0.0.1:631" and restart Cups.
> udp 0 0 *:ipp *:*
Again Cups, this time browsing for network printers. If you don't need this, change "Browsing On" to "Browsing Off" in /etc/cups/cupsd.conf.
Andreas Janssen
% lsof -i tcp:time COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME inetd 651 root 7u IPv4 1059 TCP *:time (LISTEN)
lsof -i tcp:daytime COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME inetd 651 root 6u IPv4 1058 TCP *:daytime (LISTEN)
% lsof -i tcp:dict COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME dictd 21560 dictd 12u IPv4 348620 TCP *:dict (LISTEN)
lsof -i tcp:682 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME rpc.statd 924 root 6u IPv4 1528 TCP *:682 (LISTEN)
lsof -i tcp:sunrpc COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME portmap 480 daemon 4u IPv4 570 TCP *:sunrpc (LISTEN)
lsof -i tcp:auth COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME inetd 651 root 8u IPv4 1060 TCP *:auth (LISTEN)
lsof -i tcp:822 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME famd 646 root 3u IPv4 1044 TCP cxmr.dyndns.org:822 (LISTEN)
lsof -i tcp:ipp COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME cupsd 9266 root 0u IPv4 426221 TCP *:ipp (LISTEN)
lsof -i tcp:8118 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME privoxy 768 privoxy 3u IPv4 1195 TCP cxmr.dyndns.org:8118 (LISTEN)
lsof -i tcp:3128 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME squid 996 proxy 11u IPv4 1648 TCP *:3128 (LISTEN)
% lsof -i tcp:dict COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME dictd 21560 dictd 12u IPv4 348620 TCP *:dict (LISTEN)
% /etc/init.d/dictd stop
% update-rc.d -f dictd remove update-rc.d: /etc/init.d/dictd exists during rc.d purge (continuing) Removing any system startup links for /etc/init.d/dictd ... /etc/rc0.d/K20dictd /etc/rc1.d/K20dictd /etc/rc2.d/S20dictd /etc/rc3.d/S20dictd /etc/rc4.d/S20dictd /etc/rc5.d/S20dictd /etc/rc6.d/K20dictd
Ref:
% update-rc.d dictd remove update-rc.d: /etc/init.d/dictd exists during rc.d purge (use -f to force)
% update-rc.d dictd defaults 20 Adding system startup for /etc/init.d/dictd ... /etc/rc0.d/K20dictd -> ../init.d/dictd /etc/rc1.d/K20dictd -> ../init.d/dictd /etc/rc6.d/K20dictd -> ../init.d/dictd /etc/rc2.d/S20dictd -> ../init.d/dictd /etc/rc3.d/S20dictd -> ../init.d/dictd /etc/rc4.d/S20dictd -> ../init.d/dictd /etc/rc5.d/S20dictd -> ../init.d/dictd
>>Buy a firewall or set up iptables. > > > You can just load the Firestarter package; it will allow you to block > ports (via a generated iptables script).
There are other available packages: I use FireHOL
Newsgroups: gmane.linux.debian.user Date: Wed, 07 Jul 2004 14:09:30 -0400
I switched from RH9 and installed Debian just recently. Previously my printer was working fine, now I just can't use it:
$ lpstat -p -d printer hp_psc_1210 is idle. enabled since Jan 01 00:00 system default destination: hp_psc_1210
$ lpq lpq: hp_psc_1210: unknown printer
$ lpq -Php_psc_1210 lpq: hp_psc_1210: unknown printer
Check to see where your lpq came from. You need to be using the versions in the cupsys-bsd package. From the format of the error messages, it looks like you might have an lpq from some other print server.
Alan Shutko
Yes, my lpq is installed by default from the lpr package — "BSD lpr/lpd line printer spooling system". The lpr/lpq is required, can't be removed, and strangely, can't be used. hmm, that's confusing enough for a debian newbie like me. :-)
Yes, installing the cupsys-bsd package solve the problem.
Thanks again.
Newsgroups: gmane.linux.debian.user Date: Thu, 08 Jul 2004 15:25:45 -0400
Mystically, after I reboot Debian, my eth0 device is gone.
% networking start eth0: ERROR while getting interface flags: No such device
% ifconfig eth0 inet 192.168.0.99 up SIOCSIFADDR: No such device eth0: ERROR while getting interface flags: No such device eth0: ERROR while getting interface flags: No such device
Luckily, I managed to get it back. I'm just wondering,
what could be the reason that I lost my eth0? I remove the discover package, could it be the reason? Is discover package really necessary?
I get it back by
modprobe sis900 depmod -a
Can the effect last beyond next boot (and beyond)?
Thanks
> discover package, could it be the reason? Is discover package > really necessary?
No, discover isn't really necessary. In fact, it could possibly be the source of the problem, but that's only speculation.
Justin Guerin
> what could be the reason that I lost my eth0? I remove the > discover package, could it be the reason? Is discover package > really necessary?
Yes, it can. It depends on how your system was setup before you removed discover.
> modprobe sis900 > > Can the effect last beyond next boot (and beyond)?
Yes, it can.
Check /etc/modules and make sure sis900 is listed there. Then check /etc/network/interfaces and make sure you have a stanza for eth0 with either the ip and other netorking info required, or a line telling it to use dhcp to get eth0's ip.
Jacob
echo sis900 >> /etc/modules
and that will get loaded on each reboot. No need to do depmod -a at all. that command does something completely different and unrelated to your problem. Furthermore, it gets run on each successive init.
Thomas Adam
Newsgroups: gmane.linux.debian.user Date: Sat, 10 Jul 2004 00:11:14 -0400
> When I reboot, the settings for eth0 disappear. How do I make the > settings permanent?
Since the NIC modules is being loaded at boot, try this:
in the file "/etc/network/interfaces" put in:
auto lo eth0
iface lo inet loopback
iface eth0 inet static address 192.168.0.4 netmask 255.255.255.0 broadcast 192.168.0.255 gateway 192.168.0.1
Now, I supposed that your default gateway was what I wrote, but change it as needed. This config will auto config your NIC and loopback everytime.
If your eth0 is DHCP try this for eth0 instead:
iface eth0 inet dhcp
Good luck.
Greg Folkert
The technology that is Stronger, better, faster: Linux
| When I do lsmod, the nic driver shows up (3c59x). | eth0 section missing when I do ifconfig.
Note that 'ifconfig' (with no parameters) only displays network devices that are configured. If a device exists in the system but has no layer 3 (ip) configuration then it isn't listed. 'ifconfig -a' shows all devices in the system, even those that aren't configured.
Derrick Hudson
% debfoster sndconfig The following extra packages will be installed: aumix hwdata kudzu The following NEW packages will be installed: aumix hwdata kudzu sndconfig 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 855kB of archives. After unpacking 3887kB of additional disk space will be used.
% sndconfig The Silicon Integrated Systems [SiS]|Sound Controller is not currently supported.
debfoster sndconfig-
Newsgroups: gmane.linux.debian.user Date: Mon, 12 Jul 2004 10:36:53 +0200 (CEST)
just to document how I disabled IPv6:
changing /etc/modutils/aliases or /etc/modules.conf did NOT work (found in Google)
adding "alias net-pf-10" to a fresh /etc/modprobe.conf (didn't exist on my system) DID work
I tried to deconfigure the IPv6 addresses at runtime and remove the ipv6 module, but I failed (device or resource busy)… which was quite annoying because I had to reboot…
Alex List
Newsgroups: gmane.linux.debian.user Date: Mon, 7 Feb 2005 02:37:27 -0800
|> I use the gnome interface, I haven't find a program to configure the |> sound card ?? like soundcardconfig in knoppix or sndconfig in RH, is |> there something like this for sarge?
alsaconf should do this (it's in the alsa-utils package, I think). It detects the soundcard, loads the appropriate module, re-writes /etc/modprobe.d/sound so that the needed module is loaded at boot time, and then sets levels on the card,
Jim McCloskey
I recommend using ALSA, especially if you have a 2.6.x kernel, but if you prefer to use the OSS sb driver, I think sndconfig is still part of Woody, so it ought to be available from any Debian mirror. Use the package search utility on the Debian site.
You'll probably still have problems if the system tries to load both OSS and ALSA modules. You'll need to disable one or the other. Good luck!
Peter J Ross
To: <debian-user@lists.debian.org> Subject: Re: how to configure a sound card Date: Tue, 2 Oct 2001 08:26:41 -0400
> I installed Debian/GNU Linux 2.2 (potato) on my PC > and I have no idea on how to get my sound card > working. I tried the commands: > sndconfig > soundconfig > but I had an error message.
The package that contains 'sndconfig' isn't normally installed with Debian. It is available though and worked perfectly for me. Do an 'apt-get install sndconfig' and try it again.
Hall Stevenson
rmmod i810_audio ac97_codec soundcore modprobe i810_audio play /export/home/tong/myDocs/media/sounds/camera.wav
modconf
add: ac97_codec i810_audio
rmmod isa-pnp
!! |
% modprobe i810_audio
% lsmod Module Size Used by Not tainted i810_audio 21340 0 ac97_codec 11412 0 [i810_audio] soundcore 3268 2 [i810_audio] sis900 10668 1
Like many of my colleagues, I'm making the switch to Debian and finding I have to unlearn a few habits. I love the package management, and I'm learning that less is more: start with the very minimum and then add stuff as I need it. It's certainly true that, when you configure the system directly, rather than trusting a tool to do it, you learn a whole lot more about how it all works.
Setting up a soundcard is a good example. I've always wondered what it is that RedHat's sndconfig really does. Now I think I know. Of course, I also learned a bit about how Debian organizes and manages configuration files.
It's difficult to get straightforward, simple, and up-to-date guidance on how to configure a sound card in Debian; indeed the most likely sources, the Sound HOWTO and the files in /usr/src/linux/Documentation/sound, seem to give conflicting messages.
This document captures what I've learned, with some great help from my colleagues in several LUGS on both coasts of the US. Although it's necessarily oriented around my particular card, I've tried to describe the underlying principles that apply generally, in hopes of helping others (and myself when I need to configure a different card!)
Platform Debian 2.2r2 (Potato) from the 3-CD set, default stable archive, on Intel architecture (AMD Athlon 650)
Sound Card Soundblaster AWE64 ISA PNP. The machine dual boots an inferior (though sound-supporting ;-) operating system, from which I can determine the parameters: io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330
In general, GNU/Linux supports sound by loading kernel modules. You need to:
Identify the sound card or chipset, accurately.
Set up the card's hardware parameters.
Determine which modules the card needs.
Determine what options, if any, these modules require and what values to use.
Ensure the kernel supports the needed modules.
Set up the loading of the sound modules, either manually, or automatically at boot.
Determine exactly what sound card you have, or what chipset it uses. Note that most "Soundblaster compatibles" aren't. Sources of information:
Look at the actual card and note the identifiers on chips and labels on the circuit board
See if your BIOS reports anything when you boot
If you've run the card under another OS, see what it reports
Look in the docs under /usr/src/linux/Documentation/sound/, especially the READMEs and introductions
If your card, like mine, is an ISA Plug-n-Play model, you need to set up the PNP configuration before the system can even detect it. I understand you can set any parameters the card will allow but, in multi-boot situations, it's a bad idea to set different parameters for the different operating systems.
Configure PNP by tailoring /etc/isapnp.conf as described in various docs under /usr/src/linux/Documentation/sound/, in my case the AWE32 document:
If necessary, install isapnptools.
Create the /etc/isapnp.conf file, if there isn't already one: pnpdump > /etc/isapnp.conf
Edit /etc/isapnp.conf, uncommenting the lines that agree with your configuration and adding lines as necessary (for the AWE23/64, Plug-n-Play detects only one I/O port, but the wavetable needs three). Don't forget to uncomment (ACT Y)! I offer my /etc/isapnp.conf as an example.
Activate the new PNP configuration: isapnp /etc/isapnp.conf No errors should be reported. If you correctly installed isapnptools, then isapnp will run every boot time.
Armed with a clear idea of what soundcard/chipset you have, study the docs under /usr/src/linux/Documentation/sound/, including the introduction, the READMEs, and anything that seems remotely related to your card. Some things aren't obvious, for example, it seems most sound cards need the opl3 module. Most modules require options (not an oxymoron! the option is which value to set, not whether to set one). The docs should supply the correct names and, in many cases, the values.
For my Soundblaster AWE64 card, I need:
Module Options sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330 awe_wave (none) opl3 io=0x388
loaded in that order.
If you're using an out-of-the-box kernel, it almost certainly has support already compiled in for all likely modules, including sound, so you don't need to do any further configuration. On the other hand, if you're building a new kernel, you'll need to include support for the sound modules.
/usr/src/linux/Documentation/sound/README.OSS will tell you everything you need to know.
The quick-and-dirty way is to load the modules directly, using modprobe, for example:
modprobe sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330 modprobe awe_wave modprobe opl3 io=0x388
The cleaner way is to use the modules.conf arrangement (actually several configuration files that get automatically integrated into /etc/modules.conf):
Add a line for each sound module to /etc/modules (note that the lines for other modules may already be there), for example: sb awe_wave opl3
For each module that requires options, make a file of that name under /etc/modutils with a line for the options, for example:
/etc/modutils/sb: options sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330 /etc/modutils/opl3: options opl3 io=0x388
Install this data in the master /etc/modules.conf file: update-modules This will ensure that the sound modules are properly loaded at every boot.
An easy way to accomplish all this is to use the modconf program, which is the same tool that runs during the installation. For an ISA PNP card, be sure to set up the PNP configuration first.
Verify correct installation: cat /dev/sndstat
Test sound using the sample files sample.au and sample.midi: cat sample.au >/dev/audio Install playmidi using dselect and run; playmidi sample.midi
Last modified Tue, 27 Feb 2001 13:43:01 GMT Ted Ruegsegger
documented on: 2004.07.08
Newsgroups: gmane.linux.debian.user Date: Thu, 8 Jul 2004 22:03:15 +0200
> I've been experimenting with kcron, and setting up couple of personal > cron jobs, but I can't seem to find where kcron saves this info to. > > can anyone point me in the correct direction?
Hm try crontab -l, if that lists your jobs they are in /var/spool/cron/crontabs/username
Sven Hoexter