Liuw's Thinkpad

想要赢就先学会输,想要成功就先学会失败

Archive for the ‘debian’ tag

Building modules against installed kernel

without comments

I’ve been reading Linux Device Drivers 3rd for quite a long time, and once built a sacrifice system in VMWare. After I upgraded VMWare, the sacrifice kernel hangs, unable to discover root filesystem. It seems to be a driver issue. No matter how I compile my kernel, it hangs at the same place.

I finally give up, I don’t want to waste my time any more. Maybe I should just dump that 2.6.10 and try new ones. No need to

I have a Debian system working as my development system. I just need to install kernel header to get a module building environment.

# apt-get install linux-headers-`uname -r`

When it’s done, build directory should be found in

# ls -d /lib/modules/`uname -r`/build

Here is a handy Makefile for modules.

obj-m += hello.o

all:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

Written by liuw

July 16th, 2010 at 11:49 pm

Posted in UNIX-like

Tagged with , , , ,

Debian system-wide locale and timezone configuration

without comments

# dpkg-reconfigure locales
# dpkg-reconfigure tzdata

Written by liuw

July 8th, 2010 at 3:36 pm

Posted in UNIX-like

Tagged with , , ,

Fix `apt-get update’ GPG Error

without comments

This is quite common when you add some non-official sources to ‘source.list’.

gpg --keyserver hkp://wwwkeys.eu.pgp.net --no-default-keyring --primary-keyring /etc/apt/trusted.gpg --recv KEYID

Choose key server as you wish. The critical part is that we specify apt’s keyring, rather than creating our own. If we miss those key ring options, gpg(1) will create a folder .gnupg in home directory, which comes out to be our personal settings, not apt(8)’s.

Written by liuw

February 8th, 2010 at 7:37 pm

Posted in UNIX-like

Tagged with , , , ,

Fix `apt-get update' GPG Error

without comments

This is quite common when you add some non-official sources to ‘source.list’.

gpg --keyserver hkp://wwwkeys.eu.pgp.net --no-default-keyring --primary-keyring /etc/apt/trusted.gpg --recv KEYID

Choose key server as you wish. The critical part is that we specify apt’s keyring, rather than creating our own. If we miss those key ring options, gpg(1) will create a folder .gnupg in home directory, which comes out to be our personal settings, not apt(8)’s.

Written by liuw

February 8th, 2010 at 7:37 pm

Posted in UNIX-like

Tagged with , , , ,