2010-02-18

Windows 7 not seeing SATA drives

I was trying to install Windows 7 on a system, and it wouldn't see the SATA drive. All evidence pointed to the drivers being correct and not needed; but the drive wouldn't appear.

Finally I determined that because the drive had a dynamic disk on it, Windows 7 setup wouldn't even acknowledge that it existed. I booted Ubuntu and wiped the partition table, and then it worked fine.

2010-02-09

Bringing a recalcitrant SiS ethernet adapter up

I have a SiS900 Ethernet controller that I could assign IP and IPv6 addresses to, but I couldn't bring it up. mii-tool reported that the link was negotiated, and it had worked before my recent kernel compile.

I tried everything I could think of, and recompiled the kernel over and over again. Finally I realized that the other thing I'd changed was turning off SMP support - I turned it back on, and it worked! I think that the card was in INT 19 or something, and I needed SMP support to reach those higher interrupts, even though I had a single core CPU.

Fixing max open files (1024) is smaller than max sockets (4096) errors

If you are running BIND, you may be seeing errors like this in your logs each time you reload or restart named:

Feb  9 22:22:17 mail named[19053]: max open files (1024) is smaller than max sockets (4096)

This is caused by the default number of files that a process can run being set very low, to 1024. By default, in include/linux/fs.h:

#define INR_OPEN 1024           /* Initial setting for nfile rlimits */

You could edit that line and recompile your kernel, but that would involve doing that every time a new kernel was released. An easier option is to edit /etc/security/limits.conf, and add the line:

named        soft    nofile        4096

This sets the default limit for the named user to 4096. Then, edit your named.conf and add

files 4096;

in the options section. Note that you're have to stop and start the named daemon, and not simply run rndc reload, because it needs to actually exit for the changes to take effect. Now the warning will be gone!

2010-02-08

Unicode entry in Ubuntu

To enter Unicode characters in Ubuntu, simply hold down CTRL+SHIFT+U which will create an underlined u: u Then type the hex code for the character you want (with no 0x or anything like that), followed by enter.

∎ (That's 220E, the "QED" character).

2010-02-05

Suppressing key change warnings at the end of a line

Lilypond by default prints key cancellation and then prints the new key signature, even when at the end of a line. No doubt these are helpful to musicians or something, but they look horrible, and can get out of control. It turns out it's relatively complicated to get rid of the cancellation and the new one without removing the normal signature from the following line. However, the following code does what is necessary:


\relative c' {
    \key ces \major
    ges'1 ges1 \bar "|." | \break
    \once \override Score.BreakAlignment #'break-align-orders =
        #(make-vector 3 '(instrument-name
                          left-edge
                          ambitus
                          span-bar
                          breathing-sign
                          clef
                          key-signature
                          time-signature
                          staff-bar
                          custos
                          span-bar))
    \bar "||:"
    \set Staff.printKeyCancellation = ##f
    \set Staff.explicitKeySignatureVisibility = #begin-of-line-visible
    \override Staff.KeySignature #'break-visibility = #begin-of-line-visible
    \key ais \minor
    gis1 eis1 | \break
    gis1 eis1 \bar ":|" |
}