paul's blog: Explorations in knowledge sharing, culture and human organisations
Linux technical notes
Repairing swap partition for suspend
Original article at Ubuntu Forums
With thanks to 56Phil...
First you need to restore swap:
sudo mkswap /dev/'swap partition'
sudo swapon -va
edit your /etc/fstab file
gksudo gedit /etc/fstab
when you edit your /etc/fstab file make sure that your swap partition has the new UUID.
UUID='your correct swap UUID' none swap sw 0 0
edit your /etc/initramfs-tools/conf.d/resume file
gksudo gedit /etc/initramfs-tools/conf.d/resume
put this line in your /etc/initramfs.d/resume file
Repairing swap partition for suspend
Original article at Ubuntu Forums
With thanks to 56Phil...
First you need to restore swap:
sudo mkswap /dev/'swap partition'
sudo swapon -va
edit your /etc/fstab file
gksudo gedit /etc/fstab
when you edit your /etc/fstab file make sure that your swap partition has the new UUID.
UUID='your correct swap UUID' none swap sw 0 0
edit your /etc/initramfs-tools/conf.d/resume file
gksudo gedit /etc/initramfs-tools/conf.d/resume
put this line in your /etc/initramfs.d/resume file
Simple Export of Moveable Type to Drupal
I have modified a script from here to make a simple export from Moveable Type into Drupal. I had to make some small modifications to get the correct count of entries into one of the tables (_sequences, which holds the maximum id number for other tables of content).
I had 2 weblogs to import, one after the other. Only entries and comments are imported. All I have to do now is sort out the taxonomy, which I wanted to revise anyway.
The bug I found in the import script:
1. sequences table has elements using table prefix (prefix_), not used by the import script.
Suspend to disk or to RAM
Having installed SuSE 9.2 I have been trying out suspend (hibernate). The suspend to disk works fine, although I have to make sure no applications are open (or visible on the desktop) as the password box is obscured behind the application windows!
With suspend to RAM, the machine (an NX9005) goes to sleep, but wakes up with a blank screen (so I have no idea what it is doing).
I have found this comment "I had nothing but trouble with suspend-to-ram until I used some extra parameters in GRUB. With IBM's Thinkpads it's best to use the option "acpi_sleep=s3_bios" upon GRUB's start-up." SuSE Linux Forums -> Hibernate on Linux?
Something to try out.
Wireless card problems
See update below.
So far I have not been able to get my wireless card working.
Others with SuSE 9.1 seem to be having similar problems ( see here . One of the posts on this thread prompted me to try deleting both Wireless card and the Ethernet card in Network Card settings (under Yast). I reinstalled just the Wireless card, set the correct encryption key, and IT WORKED.
I will see if it still works after reinstalling the ethernet card. I wonder if there is some conflict when 2 network devices are installed that makes it impossible for the Wireless card to get an IP address (this was what was constantly reported in /var/log/messages, in addition to only registering 2Mb/s under kwifimanager)
Here is my /etc/sysconfig/network file:
BOOTPROTO='dhcp'
MTU=''
REMOTE_IPADDR=''
STARTMODE='onboot'
UNIQUE='*************'
WIRELESS_AP=''
WIRELESS_BITRATE='auto'
WIRELESS_CHANNEL=''
WIRELESS_ESSID='WLAN'
WIRELESS_KEY='**************'
WIRELESS_MODE='Managed'
WIRELESS_NICK=''
WIRELESS_NWID=''
WIRELESS_POWER='yes'
_nm_name='static-0'
WIRELESS_FREQUENCY=''
Update 30/8/2004
I am now able to get my wireless card to function every time. The solution was to delete all network cards with YasT. I then inserted the wireless card and found that it registered with kwifimanager as functioning at 11Mb/s, although not able to connect to the router. With ifconfig I found that it was functioning as eth1 rather than wlan0. WIth YasT all I did was to add the name of the wireless LAN to the device configuration. The card then was able to connect.
One odd thing is that if the card is installed during power on and boot, it won't work. So I boot up, then push the card into the PCMCIA slot. Not much help if you have an inbuilt card. I have no idea yet what could cause this problem, but it doesn't inconvenience me. Please let me know if you have anything to add to this.
I hope SuSE can nail some of these irritating little problems, as they make it hard for me to persuade colleagues & friends to switch to Linux.
USB problems with SuSE 9.1
Since upgrading to SuSE 9.1 the USB interface has not worked so well.
Automount of USB can be disabled in /etc/sysconfig/hotplug by setting the parameter:
HOTPLUG_USE_SUBFS=no
A
Linuxquestions thread addresses this, and also this SuSE article explains how to revert to conventional mounting rather than using subfs.
The hotplug system is explained in SuSE article .
Kpilot & Tungsten E
USB seems to be a problem - this could be a SuSE 9.1 issue.
I have tried /dev/ttyUSB1 as the device, with 9600 baud and Unicode (UTF8) and it has occassionally worked.
This instruction tries to list databases on the Palm:
pilot-xfer -p /dev/usb/ttyUSB1 -l
Someone else has had problems with kpilot setting ports & ignoring preferences. See here
Have just tried setting device to /dev/pilot where there is a link: pilot -> /dev/ttyUSB1 This works.
Multiple Weblogs and .htaccess
I have one main weblog which is the main page on my site, with other weblogs in subdirectories. I wanted users to be able to access each weblog by requesting only "mydomain.com" or "mydomain.com/OtherWeblog" without the need for direct reference to a specific file.
A problem I had was that the weblog software is not permitted to write into the root directory. This means that a request for "mydomain.com" needs to be redirected to the directory with the main weblog.
I have achieved this with a directive in the .htaccess file. This tells the server to use a different index.html file than the one in the requested directory.
This also means that a request for any other directory will also be redirected to the same file, unless that subdirectory also contains a .htaccess file with the directive "DirectoryIndex /thisDirectory/index.html".
Relevant documentation can be found at apache.org here or here at interland or here at homelinux.com , the latter also has some useful ideas for blocking unwelcome bandwidth consuming bots.
TCP/IP networking with dynamic addresses
I have a Linux network which requires either fixed IP addresses or for one of the PCs to act as a name server. Since I am on a cable connection via a modem with dynamic addressing, neither of these are possible.
IP masquerading enables me to use one PC as a gateway that receives a dynamic address from my cable provider. A second ethernet card has a fixed address on an internal network with a router that allows other PCs with fixed addresses to communicate with each other as well as the internet.
All I had to do was to change a setting in /etc/sysconfig/sysctl
IP_FORWARD="yes"
and adding the following line to /etc/rc.d/rc.local
echo 7 > /proc/sys/net/ipv4/ip-dynaddr
(see SuSE Linux 8.2 Administration Guide, p.445 5th Edition.)
Firewall settings must also be such that a local network is permitted.
Spam Blacklist
Having been bothered by some unsavoury spam attacks on my weblog comments, I have now installed MT-Blacklist .
Following are the instructions I followed:
First, download, unpack the archive and upload to your webserver in ASCII mode. Put the files in the following locations relative to your main Movable Type directory (abbreviated MT_DIR below) where mt.cgi resides.
MT_DIR/mt-blacklist.cgi <--- Should be in the same directory as mt.cgi
MT_DIR/plugins/Blacklist.pl
MT_DIR/extlib/jayallen/Blacklist.pm
MT_DIR/extlib/jayallen/MTBlPing.pm
MT_DIR/extlib/jayallen/MTBlPost.pm
Set the permissions for all files to 755 (-rwxr-xr-x).
go to http://YOURDOMAIN/MT_PATH/mt-blacklist.cgi
-then configuration can be completed.
There is a master blacklist here that can be used to fill your own blacklist.
I have come across here a routine to update this without a cron job.
New spam identities can be shared with the master blacklist. A great way to work together to beat this scourge.
To run MT-blacklist: www.mydomain.com/mt-cgi/mt-blacklist.cgi
