You are here: sethdepot>DebianLinux (2010-08-06, Main.RoLaUser)

Debian Linux

Debian is free and its developers are cosmopolitans - Linux Magazin

Whenever I manage to get something running, which I struggled long time with (means, it's not yet documented across the internet, or I am to stupid to find it :-) I will share my findings here. Hope it comes to the benefit of somebody. Somewhen

My current setup:

  • Main Work Computer: Debian Lenny Testing
  • Main Computer (Desktop): Debian Squeeze Testing (not in use)
  • Main Laptop: Debian Lenny Testing
  • Acer Aspire One: Debian Lenny Stable

Contents

Disclaimer
The modifications presented here can break your system! Know what you're doing before following my ideas here - and always have a backup at hand!

Fix: Enter passphrase for resume with uswsusp from a USB Keyboard

2010-08-06

When your initramfs policy (/etc/initramfs-tools/conf.d/driver-policy) is set to dep then only the required modules are included in your initramfs. When you now setup encrypted hibernate/resume with uswsusp and want to use an USB Keyboard to enter the passphrase, unfortunately these drivers are not included automatically.
The result: You are prompted for the passphrase on bootup, but cannot enter it with your USB keyboard.

As a workaround I added the following lines into /etc/initramfs-tools/modules

hid
usbhid
usbcore
uhci_hcd
ehci_hcd

(Not sure wether all of these modules are needed, at least it's working this way)

See also Bug Report 512291

Configure: Reinstall Grub after System Recovery on New Hard Drive

2010-07-07

Maybe you know one of the days when everything goes wrong. Like your hard drive dies. Fortunately you will have a complete backup at hand (You will, won't you? Otherwise I recommend you to setup one with rsnapshot).
Recreating the file system on a new hard drive (with the help of a recovery DVD or USB Stick) and copying the files is a piece of cake. Just how to get the Grub bootloader installed again on the system?
For me it was not straight forward, so here are the steps I needed to take. Maybe it goes better with just another snapshot of Debian Testing. Find out by yourself.

Note: After new installation the UUIDs of your partitions are changed. I think you can take care about this during the formatting of the devices. In case you forget this, make sure to adapt the UUIDs in the following files: /etc/fstab , /etc/crypttab , /etc/uswsusp.conf

  1. Debian Installer: Boot into Rescue System, use your previous root partition as root
  2. Don't forget to manually mount your /boot drive in case it's on another partition
  3. grub-install /dev/sda # Use your boot drive of course
  4. In case your don't got your old grub menu back do a manual boot with the following grub commands
    set root=(hd0,1) # Use your /boot file system here
    linux   /vmlinuz root=/dev/sdXY ro single
    initrd /initrd
    boot
  5. After first boot back into your old system, Recover the grub setup via
    mount /boot # in case that's required
    export PATH=$PATH:/usr/sbin
    update-grub

Configure: Japanese-English Keyboard Layout

2009-10-11

Do you know this problem? The US english keyboard layout is perfect for programming and the daily work, but for your daily communication you also need the German special characters - most likely the Umlauts öäüÖÄÜ and ß, and also €, § and °. So a German keyboard layout would be nice - but it will hinder you in your programming and shell operation work. Always switchung layouts is no option, because it will get you confused and hinder you from your work.

For myself I found a suitable solution long time ago: A japanese keyboard has a programmer-friendly layout of all the special characters. And it has enough additional keys to allow putting all the German special characters on it. A simple task for your xmodmap, right? Right ... but for one key: カタカナ_ひらがな ! This key has special use in Japanese, so (out of whatever reason) it will ignore any combination with Shift.

So what can you do? After a long weekend I finally found the solution, which I will give you here.

  1. Define a new symbol table
    • Put the following file into the directory /usr/share/X11/xkb/symbols : jp_de
      With this, the special meaning of the カタカナ_ひらがな key is gone
  2. Use the layout in your xorg config by putting/changing this in the file /etc/X11/xorg.conf
    Option          "XkbLayout"     "jp_de"
  3. Last thing to do, is to setup the special keys with the following modmap by xmodmap Xmodmap_jp_de : jp_de_Xmodmap
    Maybe you need to change the keycode numbers, which you can find with the program xev

Of course it should be possible to get rid of xmodmap at all, and move everything to the symbols file. I just did not managed it so I gave up, because this solution is working perfectly for me. Somebody can give me a hint here? It will be appreciated.

So how's the result looking like? This way: jp_de_keyboard.png



Install: Fonic Surf-Stick GSM Modem

2009-07-01

This Fonic Surf-Stick is a UMTS/GSM Modem with a fairly good flatrate offer. The device itself is an HUAWEI E220 / E270 (according to lspci ) and a HUAWEI E160 (according to usbmon) :-)
So, let's get it running with our Acer Aspire One and Debian, won't we? This tutorial of course will also work for all other Debian Lenny computers with this kind of USB Sticks.

  1. First, let's install the ppp daemon, which does the actual data transmission: aptitude install ppp
    1. Make connections without authentification the default
      • The Fonic provider requires connection without authentification. Normally, the "noauth" option is only allowed for root. But I dislike running programs as root, so I made up a quick-n-dirty workaround
      • ALERT! Attention! When you use ppp for other means in your system, make sure this workaround does not break your other connections!
      • You know a more elegant solution? Please tell me!
      • Change in the file /etc/ppp/options: auth --> noauth
      • Another solution - for the who cares about security? fraction among you - is to simply run umtsmon as root (sudo umtsmon)
    2. Add the users you want to allow initiating a GSM (technically a ppp) connection to the group "dip":
      adduser username dip
  2. Install umtsmon from Sidux
    1. Get archive key package from here (or take any newer one):
      http://debian.tu-bs.de/project/sidux/debian/pool/main/s/sidux-keyring/sidux-archive-keyring_2007.03.08_all.deb
      dpkg -i sidux-archive-keyring_2007.03.08_all.deb
    2. Add to /etc/apt/sources.list
      # umtsmon
      deb http://debian.tu-bs.de/project/sidux/debian/ sid fix.main
    3. Install: aptitude install umtsmon
  3. Setup umtsmon
    1. Create a new profile, let's just call it "Fonic"
    2. Edit, put as APN "pinternet.interkom.de"
    3. Don't check the "noauth" box when you used the previously described modification of the ppp options file
      (Check the box when you're running umtsmon as root)
  4. Get connected by clicking on the "Connect" Icon, and you're in!

As a goodie, with umtsmon you can now send SMS with your computer. That's nice, isn't it?

Another solution is getting Network Manager >= 0.7, but that's another story for a stable Lenny. When you're using testing (called sid) then it should work out of the box. Ah, don't forget to store the PIN in the connection itself, otherwise Network Manger could refuse to connect.


Topic revision: r4 - 2010-08-06 - 01:23:09 - Main.RoLaUser

Other Sites

 

This site is powered by Foswiki © by the contributing authors.
The content of this side is placed - when not noted otherwise - under a creative commons licensed under a Creative Commons license (Deutsch)