I found that after upgrading debian to wheezy the df command was showing a long name for the root device instead of the real normal short name like /dev/sda1.
/dev/disk/by-uuid/4661950b-0d92-4a1d-9919-2b71eaa14189
I found this link very helpful in explaining the problem and giving a workaround.
Showing posts with label debian. Show all posts
Showing posts with label debian. Show all posts
Monday, January 20, 2014
Sunday, September 9, 2012
Building a single kernel module on Debian.
I was trying to build snd-seq-oss.ko so I could run the old playmidi that requires OSS /dev/sequencer, but when I did the insmod I got a -1 "Invalid module format" and dmesg showed "snd_seq_oss: no symbol version for module_layout".I found out the problem was that since I am building just the module not the kernel, I need the Module.symvers from the distro's kernel. So the solution in this case was to install linux-headers-2.6.32-5-686 and copy the Module.symvers from there.
There's probably other ways to do it but that is what worked for me. See steps below for future reference.
sudo -i
apt-get install linux-headers-2.6.32-5-686 linux-source-2.6.32
cd /usr/src
tar -jvxf linux-source-2.6.32.tar.bz2
ln -s linux-source-2.6.32 linux
cd linux
cp ../linux-headers-2.6.32-5-686/Module.symvers .
cp /boot/config-2.6.32-5-686 .config
(modify .config as desired)
make oldconfig
make prepare
make modules_prepare
make SUBDIRS=scripts/mod
make SUBDIRS=path/to/module modules
Monday, March 14, 2011
Use right alt as Windows key in Debian Squeeze
My Thinkpad has no Windows key, so I was using a startup file with xmodmap commands to map my right alt to the Windows key (Super_L).
That worked great until I updated Debian to Squeeze. Then it would only work if I ran it manually after Gnome came up. I tried several startup scripts with different names including .gnomerc, but my settings just wouldn't stick.
So I decided it must be getting overridden by a later step, probably a step where it checks gnome-keyboard-properties settings and calls setxkbmap, so that resets anything you tried to do in a start-up script.
There is an option in gnome-keyboard-properties for "Left Alt is swapped with Left Win". That causes it to run setxkbmap -option altwin:swap_lalt_lwin I believe. That would work perfectly for me, except I want to map the right alt, not the left alt.
So finally, here is what I came up with (probably not the right solution, but it works). I edited all the files in /usr/share/X11/xkb/rules/ with swap_lalt_lwin in them and added a similar line/section called swap_ralt_lwin. Similarly I edited /usr/share/X11/xkb/symbols/altwin and added a section at the bottom for swap_ralt_lwin that works similar to the swap_lalt_lwin section.
That worked great until I updated Debian to Squeeze. Then it would only work if I ran it manually after Gnome came up. I tried several startup scripts with different names including .gnomerc, but my settings just wouldn't stick.
So I decided it must be getting overridden by a later step, probably a step where it checks gnome-keyboard-properties settings and calls setxkbmap, so that resets anything you tried to do in a start-up script.
There is an option in gnome-keyboard-properties for "Left Alt is swapped with Left Win". That causes it to run setxkbmap -option altwin:swap_lalt_lwin I believe. That would work perfectly for me, except I want to map the right alt, not the left alt.
So finally, here is what I came up with (probably not the right solution, but it works). I edited all the files in /usr/share/X11/xkb/rules/ with swap_lalt_lwin in them and added a similar line/section called swap_ralt_lwin. Similarly I edited /usr/share/X11/xkb/symbols/altwin and added a section at the bottom for swap_ralt_lwin that works similar to the swap_lalt_lwin section.
Wednesday, February 9, 2011
Debian Lenny to Squeeze on Thinkpad T42
The good:
- Faster bootup.
- Very fast switching between X and a VT.
- Firefox 3.5 is much faster than 3.0.
- Most Thinkpad extra keys now work great out of the box.
- Cool desktop backgrounds.
- X11 looked funny. Turns out no themes were installed. Had to install gnome-themes.
- Got a bunch of warnings from udev on bootup, coming from z60_xserver-xorg-input-wacom.rules, so I purged xserver-xorg-input-wacom.
- The ACPI hotkey events changed names, so some hooks I had set up in /etc/acpi/events stopped working until I updated the names.
- EmulateWheel setting in xorg.conf no longer works. xinput works. I installed gpointing-device-settings, which is a very convenient solution.
- Alt_R keycode is now 108 instead of 113.
- X wouldn't start. Turns out it was because gdm wasn't installed. Why did gdm get removed during upgrade? Maybe it wanted to replace it with gdm3? But it didn't install gdm3.
Sunday, June 6, 2010
Debian Linux 5 (Lenny) on Thinkpad T42
I know it seems backwards, but I recently switched from Ubuntu to Debian on my old reliable Thinkpad T42 laptop. Here are some of the problems I encountered and tweaks I made to get it working nicely.
Back and forward keys, and right alt as windows key:
1. Set up .xinitrc
#!/bin/sh
xmodmap -e "keycode 113 = Super_L" # reassign Alt_R to Super_L
xmodmap -e "remove mod1 = Super_L" # make sure X keeps it out of the mod1 group
xmodmap -e "keycode 234 = XF86Back" # Back button.
xmodmap -e "keycode 233 = XF86Forward" # Forward button.
2. Add command to gnome session to run .xinitrc
Fix the "Access IBM" and "Alt-Space" keys:
1. Add to /etc/rc.local
# Dumb kernel drops the acpi_fakekey.
/usr/bin/setkeycodes e017 148 # (for the Access IBM button)
/usr/bin/setkeycodes 0082 192 # (for the Fn+SPACE combination)
Emulate mouse wheel in X with middle button:
1. Add these three lines to /etc/X11/xorg.conf in the "Configured Mouse"
InputDevice section:
Option "EmulateWheel" "true"
Option "EmulateWheelTimeOut" "200"
Option "EmulateWheelButton" "2"
Note: Lenny uses XServer 1.4.2, which does use HAL, but not as fully as 1.5 or something because I couldn't get it to work with a .fdi file.
Make Fn-F5 toggle just bluetooth, not wireless:
1. Copy bluetooth_toggle.sh to /usr/local/sbin/
2. Change the action line in /etc/acpi/events/ibm-wireless to:
action=/usr/local/sbin/bluetooth_toggle.sh
Make Fn-F7 toggle between LCD,TV,and TV+LCD
1. Copy video.sh to /usr/local/sbin/
- (borrowed heavily from this script.
2. Change the action line in /etc/acpi/events/ibm-videobtn to:
action=/usr/local/sbin/video.sh toggle
3. Enable Fn-F7 by modifying the options line in /etc/modprobe.d/thinkpad_acpi.modprobe to:
options thinkpad_acpi hotkey=enable,0xffffff experimental=1
Back and forward keys, and right alt as windows key:
1. Set up .xinitrc
#!/bin/sh
xmodmap -e "keycode 113 = Super_L" # reassign Alt_R to Super_L
xmodmap -e "remove mod1 = Super_L" # make sure X keeps it out of the mod1 group
xmodmap -e "keycode 234 = XF86Back" # Back button.
xmodmap -e "keycode 233 = XF86Forward" # Forward button.
2. Add command to gnome session to run .xinitrc
Fix the "Access IBM" and "Alt-Space" keys:
1. Add to /etc/rc.local
# Dumb kernel drops the acpi_fakekey.
/usr/bin/setkeycodes e017 148 # (for the Access IBM button)
/usr/bin/setkeycodes 0082 192 # (for the Fn+SPACE combination)
Emulate mouse wheel in X with middle button:
1. Add these three lines to /etc/X11/xorg.conf in the "Configured Mouse"
InputDevice section:
Option "EmulateWheel" "true"
Option "EmulateWheelTimeOut" "200"
Option "EmulateWheelButton" "2"
Note: Lenny uses XServer 1.4.2, which does use HAL, but not as fully as 1.5 or something because I couldn't get it to work with a .fdi file.
Make Fn-F5 toggle just bluetooth, not wireless:
1. Copy bluetooth_toggle.sh to /usr/local/sbin/
2. Change the action line in /etc/acpi/events/ibm-wireless to:
action=/usr/local/sbin/bluetooth_toggle.sh
Make Fn-F7 toggle between LCD,TV,and TV+LCD
1. Copy video.sh to /usr/local/sbin/
- (borrowed heavily from this script.
2. Change the action line in /etc/acpi/events/ibm-videobtn to:
action=/usr/local/sbin/video.sh toggle
3. Enable Fn-F7 by modifying the options line in /etc/modprobe.d/thinkpad_acpi.modprobe to:
options thinkpad_acpi hotkey=enable,0xffffff experimental=1
Subscribe to:
Posts (Atom)
