Archive for the 'linux' Category

Torrent exposes driver bug???

Monday, April 23rd, 2007

Weird but true. When I down/up-load some torrents (esp w/ many peers?), my 2.6.17 (FC5) Broadcom tg3 driver goes belly up. Here’s a thread about the problem:

http://www.linuxquestions.org/questions/showthread.php?t=476368

FMI, on FC5 the best place to address this was to add

ethtool -K eth0 tso off

as the penultimate line of /etc/sysconfig/network-scripts/ifup-eth, just before the final “exec” line.

Linux: setting up serial console

Monday, April 2nd, 2007

Cuz I forget:

  1. Download kermit, e.g. sudo yum install ckermit
  2. Produce a .kermrc like so (snipped from man page)
    set modem type none
    set line /dev/ttyS0;
    set carrier-watch off;
    set speed 115200;
    set flow rts/cts;
    set parity none;
    set flow xon/xoff;
    connect;
  3. (Optionally) modify grub.conf like so:
    serial --unit=0 --speed=115200
    terminal --timeout=10 serial console
  4. Add to the appropriate kernel line:
    console=ttyS0,115200

Kubuntu 6.10 Install Log

Monday, November 27th, 2006

sudo apt-get install ntp-simple

add \”capability\” to /etc/modules, nothing worked, I finally went with an hourly cronjob running \”sudo ntpdate pool.ntp.org\” — ugh!
cifs mount\’s of mp3\’s on windows box, but Amarok db is still f-ed up

nvidia install was a nightmare, not even sure what made it half work, worst time I\’ve had installing nvidia drivers ….

java install

firefox was working great for a while and then it stopped; ethereal (now wireshark) revealed a dns lookup problem (nslookup had worked tho) a bit more googling and apparently it’s an ipv6 problem to these silly actiontec dsl routers, easily disabled: so in about:config, I found network.dns.disableIPv6 and set the value to true

FC5 remote X clients

Monday, November 27th, 2006

Sheesh, this was more hell than anticipated. I had to do the following:

  1. “xhost +” — yes this is overly permissive but I’m comfortable inside our building firewall
  2. gdmsetup, Security tab, uncheck “Deny TCP connections to Xserver” which adds “DisallowTCP=false” to the [security] section of /etc/gdm/custom.conf
  3. allow the firewall to pass the x11 ports; I’m not sure what’s recommended for FC5 but I used firestarter: “yum install firestarter”, then under the Policy tab, Inbound section, add a rule for x11. Since firestarter doesn’t come with FC5 by default, what do they want you to use? Direct editing of /etc/sysconfig/iptables?

My friends were “netstat -lt” and of course ethereal. There’s probably (maybe?) a simpler way but these steps all seemed to be necessary ….

FC5 install notes

Wednesday, September 13th, 2006

FC5 on a Dell 3.6Ghz P4 with XP preinstalled:

Ultimate Boot CD — great tool! and Partition Magic handy

used Partition Magic to shrink the XP partition and then created 3 more (boot: ~200 MB, swap ~35 GB, too large this will get reused, root: ~100 GB)

FC5 install: do the media check! aargh it sucks if the dvd craps out part way through

FC5 install: do the custom install initially
this P4 supports x86_64! didn’t realize Intel had snuck that in ahead of the Core line

do not use the pirut package manager (accessed via Add/Remove software); it’s slow and not stable; use cmdline yum or try out yumex (install this by yum install yumex)

plan is to use vmware and point it at the windows partition — this is a major hassle with SATA drives; still haven’t gotten this to work after wasting too much time on it; on hold

install i686 (32-bit) firefox off mozilla.com, instead of the FC5-build x86_64 version; this gets the latest and allows use of, e.g., the 32-bit flash7 from Adobe

kde doesn’t have the nice default or controls as gnome re fonts, so need to go into ControlCenter/Appearances/Fonts and select anti-aliasing and play with which settings look best, I chose SubPixel hinting, Vertical RGB, Hinting Style: Full

confused yum by doing some cmd-line yum and yumex at the same time: “yum clean metadata” is your friend

DNS hell: 1) first one of the work DNS servers was busted and no one had noticed (maybe Windows clients are quicker about falling back to a second DNS server?), 2) some servers you might need to disable IPv6, by adding “alias net-pf-10 off” to /etc/modprobe.conf

FWIW, my vmware networking setup, which I’ve never had a chance to use: 192.168.42.1/255.255.255.0, with the host-only subnet 192.168.43.1/255.255.255.0, something is on port 904 (instead of 902)

yum’ing wine was a little awkward:

1) it didn’t pick up a dependency: be sure to update sane-backend before installing wine

2) the directory /usr/share/wine/ had permissions of 754, so users couldn’t get at its contents (which were all 755); doh!

Linux printk

Tuesday, April 11th, 2006

There are 8 log levels that can be specified in a printk; from include/linux/kernel.h:
#define KERN_EMERG "<0>"
#define KERN_ALERT "<1>"
#define KERN_CRIT "<2>"
#define KERN_ERR "<3>"
#define KERN_WARNING "<4>"
#define KERN_NOTICE "<5>"
#define KERN_INFO "<6>"
#define KERN_DEBUG "<7>"

There are 4 values that define what gets printk’d where. They are also in include/linux/kernel.h:
extern int console_printk[];
#define console_loglevel (console_printk[0])
#define default_message_loglevel (console_printk[1])
#define minimum_console_loglevel (console_printk[2])
#define default_console_loglevel (console_printk[3])

Their meaning:
console_loglevel: if a message logValue < console_loglevel, print it on the console
default_message_loglevel: if a message d/n specify a logValue, use this
minimum_console_loglevel: used with a syslog(6, ...) [disable printk]
default_console_loglevel: used with a syslog(7, ...) [enable printk]

Note that all of this pertains only to the console; klogd will report all messages regardless of the above settings.

They can be read/written through /proc/sys/kernel/printk:

kylo@kylodl01:111032:~> cat /proc/sys/kernel/printk
6 4 1 7

How-to rebuild the linux kernel

Friday, February 3rd, 2006

This is mostly a cheat sheet for my own reference:

make menuconfig /* choose wisely */
make

// from here out, must be root
make modules_install
cp arch/[arch]/boot/bzimage /boot/vmlinuz-[kernelname]
cp System.map /boot/System.map-[kernelname]
mkinitrd /boot/initrd-[kernelname].image [kernelname]

edit grub.conf to point at this new setup