Sunday, November 29, 2009

Fedora 12 & Maple 13

Maple worked out of the box with Fedora 10. With Fedora 12 you will get some security warings.

To get Maple working execute the script on a terminal:

MAPLE=/opt/maple13
export MAPLE
chcon -t execmem_exec_t $MAPLE/bin.IBM_INTEL_LINUX/mserver
find "$MAPLE" -name "*.so" -print0 | xargs -0 chcon -t textrel_shlib_t

I havn't tested all, but my stuff works.

Sunday, August 2, 2009

Use your mobile phone via bluetooth as modem

All commands should be run as root.

First pair your phone.
There are many HOWTOS or just look at the source at the bottom.
At this step you should get the bluetooth address for your phone, if not use

$ hcitool scan


Another way is to put the pin code into file pincodes in the directory /var/lib/bluetooth/<address of your bt adapter>
The first entry of a line is the address of your bluetooth device, the second the pin code, eg:
00:1E:3B:10:7A:88 1234


Bind the phone.
First you need to find out which channel the DUN (Dial Up Networking) uses. Usually it's channel 1. But ...

$ sdptool search dun

or to get all services ...

$ sdptool browse [bluetooth address]



Add the following to /etc/bluetooth/rfcomm.conf
rfcomm0 {
# Automatically bind the device at startup
bind yes;

# Bluetooth address of the device
device 00:1E:3B:10:7A:88;

# RFCOMM channel for the connection
channel 1;

# Description of the connection
comment "Mobile Modem";
}


Replace the bluetooth ID after device with the mobile phone's bluetooth ID and check if the channel is the right one.
If bind is set to yes, the mobile phone is bind when rfcomm starts. Of course, if there is another rfcomm0 section, use rfcomm1 and so on ...

Bind the phone (if bind is set to yes and the bluetooth service is active, the command will be run at startup)
$ rfcomm bind rfcomm0

You can check it with
$ rfcomm

Output is something like
rfcomm0: 00:1E:3B:10:7A:88 channel 1 clean


Set up a modem connection

Now your are ready to start an internet connection via /dev/rfcomm0
The connection settings you should get from your mobile service.

Usually you need an init string something like
at+cgdcont=1,"IP","internet"


Most mobile services accept for the username and password dummy values.


http://linux.frankenberger.at/Huawei_E220_Daten.html is a good place to look for connection settings.


Ref

I tried it with a Nokia 2630 and worked great.

Good source with details HOWTO : http://davesource.com/Solutions/20070520.T-Mobile-Nokia-E65-Ubuntu-Linux.html

Sunday, May 17, 2009

Protect your data

As external hard drives get more popular, data security should get more attention.

Here is a simple How To for creating an encrypt hard drive.

First at all, you need an empty partition. For our example I will call it /dev/sda5.

Run cryptsetup to create the partition. It will ask you for the password. Be sure no data is on the partition !!

cryptsetup -c twofish-cbc-essiv:sha256 -s 256 luksFormat /dev/sda5

Well, -c choose the cipher, -s set key size (128 as default is not enough).



Now we have an encrypt partition, but without any filesystem. To create a filesystem, open the partition with

cryptsetup luksOpen /dev/sda5 encrypthd

The last parameter sets the mapping name, e.g. /dev/mapper/encrypthd



Create the filesystem with

mkfs.ext3 /dev/mapper/encrypthd



Now mount it and your done !

To close an encrypt partition, unmount it and call

cryptsetup luksClose encrypthd





To mount it at startup, edit or create the file /etc/crypttab (only root should be able to read/write)

Syntax for crypttab: target source key options

So, for our example add the line:

encrypthd /dev/sda5 none

If key file is none: it will ask you for the password at startup.



And add the line to fstab:

/dev/mapper/encrypthd /encrypthd ext3 defaults 1 2





If you are really paranoid, you also have to encrypt your swap. On an unclear system shutdown (blackout, ...) the password for the encrypt partition can be still on the swap partition.


Gentoo has a good documentation (cipher, more details, ...):

http://de.gentoo-wiki.com/wiki/DM-Crypt
http://en.gentoo-wiki.com/wiki/DM-Crypt (a little be outdated)


Saturday, April 11, 2009

Some Kernel Parameters

A long list can be found at: http://www.mjmwired.net/kernel/Documentation/kernel-parameters.txt


forcefsck to check the filesystem or run (link)
touch /forcefsck
reboot


single (single mode) or n where n is the runlevel to enter

ro mount root file system read only on boot, so fsck can do its job.

Probelms with Fedora 10 on a Gericom Blockbuster 2

A Gericom ??? You ask me, if I'm sick ?
Well, someone bought it and just for standing around it's too bad.

I installed Fedora 10 on an external hard drive and with my PC and another notebook (it's a maxdata) it works without any problems. Well, how to boot Fedora change from PC to PC. Some can read the MBR on the external hard drive and load GRUB, other need GRUB on the internal hard drive to boot from the external drive.

Back to Gericom:
The BIOS have an option to boot from removable devices, but when I plug in my 1TB external drive, the BIOS hangs up. With smaller USB drives it works. BIOS update doesn't help.

So I searched for a boot manager, which is able to boot from usb. I found PLoP Boot Manager at http://www.plop.at/en/bootmanager.html, which does the job.

The next problem:
Booting Fedora worked, X started, but suddenly no keyboard or mouse worked anymore. But the system was running. I know that because when I pressed the power off button, the shutdown dialog appeared. What the hell is going on ?

The make a long story short: After some tests, I figured out that the service irqbalance was the trouble maker. When the service is disabled, the system runs.

Start up with runlevel 2 (here is irqbalance disabled), run chkconfig --levels 345 irqbalance off to disable the service at the runlevels 3, 4 and 5.

Monday, April 6, 2009

Disable the f*cking PIN code

I just installed Fedora 10 and wo. Everything worked at startup: X.org, sound, network. I didn't have to configure something.

Then I plugged in my Huawei E220 UMTS moden and opened the NetworkManager to enter my username and password.

I tried to connect. NetworkManager asked me for the PIN code. I entered the right one and clicked OK. Nothing happend except the logging in the syslog "Searching for network ...". After some minutes the NetworkManager give up.

Rebooted, enter PIN code in the config dialog. Same problem. Rebooted, maybe currently no network, so I tried it with Ubuntu, no problems.

Why does the thing not work with Fedora ? With Ubuntu there is no problem.

After some time I disabled the PIN code and it worked.

NetworkManager is also unable to handle a SIM card with a PIN code correctly.

My tip: Disabling the f*cking PIN code helps to aviod some troubles ...