Hints and Tips
This is where I put short write-ups of anything that took me a while to figure out, or that is particularly cunning or tricky to do. This is in the hope that other people won't have to waste time covering the same ground.
I'd be interested to know if you found anything from here helpful. If you did, let me know.
Sun Feb 5 23:23:53 2006 - More Ubtuntu/Optiplex Trickiness
It turns out that, after using the procedure described earlier to get Ubuntu Linux installed on the Dell Optiplex GX620 with its problematic SATA hard drive, things are still not entirely perfect. The CDROM drive is accessible, but stalls after reading a few megabytes of data, in the same way that it did when trying to install Ubtuntu directly from CD. I was able to make it work in harmony with the hard disk (DMA even seems to be enabled for both the hard and CD drives, and DVD burning works fine) by copying a kernel configuration from a SuSE 9.3 machine and building a custom kernel. I'm not going to post the entire config file here, but if you email me I can probably send it to you.
I also needed to tweak some settings in linux/include/linux/libata.h:
#define ATA_ENABLE_ATAPI
#undef ATA_ENABLE_PATA
#undef ATAPI_ENABLE_DMADIR
Overall, this seems to very similar to other various tweaks to make this system work, but I've tried all the other "HOWTOs" I could find without success. I'm not entirely sure why I was able to make it work with the SuSE config and not otherwise - maybe I missed something.
Sat Dec 10 14:58:13 2005 - Installing Ubuntu Linux 5.10 ("Breezy Badger") on a Dell Optiplex GX620
The Ubuntu installer CD has problems seeing both the SATA hard disk and the CD drive on the Dell Optiplex GX620. This makes it difficult to install Ubuntu:
<link>
With the BIOS configured in "Normal mode" for SATA, the installer gets as far as loading packages from the CD, when it suddenly stops being able to talk to the CD drive correctly, halting the installation. With the BIOS configured for "Combination mode", i.e. allowing both SATA and PATA access to the drives, the installation gets as far as partitioning - when the partitioning tool can't see the hard disk.
SUSE Linux 9.2 using a network install will work correctly (with the SATA drives in Normal mode) - I used an NFS installation from my University's mirror of SUSE - I don't know if a pure CD install would work, but I suspect it might...
However, I wanted to use a Debian derivative and GNOME, so really wanted Ubuntu on my machine. I was able to do this by "cross-installing" Ubuntu: installing and booting into SUSE, and running the Ubuntu installer manually to install Ubuntu into a different partition (having made two suitable partitions during the SUSE install).
The procedure is detailed in section C3 of the Ubuntu installation manual (like <link> - this file is also on the installation CD). The only problem I encountered was that certain device nodes weren't automatically created in /dev - I had to run "/dev/MAKEDEV pts" to fix things, then the rest of the installation went smoothly.
I reconfigured SUSE's copy of Grub (the bootloader) to allow Ubuntu to be booted, booted into Ubuntu, and then reinstalled Grub using Ubuntu, before reformatting the orignal SUSE partition to become Ubuntu's /home.
Mon Jun 7 00:34:47 2004 - Getting online with a Sony Clie
Instructions here: <link>
The only adjustment to make is to use /dev/ttyUSB0 in the pppd command rather than ttyUSB1.
Then you need to set up some kind of NAT or IP forwarding. I used a script along the lines of this:
iptables -F
echo 1 > /proc/sys/net/ipv4/tcp_syncookies
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A INPUT -p all -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -P FORWARD DROP
iptables -A FORWARD -i eth0 -o ppp0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i ppp0 -o eth0 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A INPUT -p all -j LOG --log-level 7
iptables -P INPUT DROP
- where "ppp0" was the computer-Clie interface and "eth0" the computer-Internet interface.
Mon Jun 7 00:29:39 2004 - Getting a Sony Clie PEG-TJ25 to sync with (Debian) Linux
By Googling you'll find explanations of the basic kernel configuration required. For example:
<link>
Follow those until you can get as far as "...not claimed by any active driver" messages in your system log.
In kernels earlier than (I think) about 2.4.22, such as the 2.4.18 version I use, you need to make a small tweak to the file "drivers/usb/serial/visor.h" in the kernel source. Change this:
#define SONY_CLIE_4_0_ID 0x0066
to this:
#define SONY_CLIE_4_0_ID 0x0169
That'll have the same effect as passing vendor and product IDs to the "visor" kernel module when loading it (assuming you have it compiled as a module). You can't use vendor and product ID parameters to the "visor" module in this early a kernel.
You need a recent version of pilot-link to talk to the Clie, from <link> . Earlier versions of pilot-link and (it appears) other syncing programs won't talk to Palm OS 5.
Create /dev/pilot as a symlink to /dev/ttyUSB0, and use that device for syncing.
Thu Apr 8 19:36:44 2004 - Making figures appear where they're told...
Another LaTeX one here. To stop figures from being placed in the "best" place and instead have them appear exactly where you tell them to in the text, do this:
In the preamble:
\usepackage{float}
\restylefloat{figure}
Then start your figures with:
\begin{figure}[H]
Wed Mar 10 14:41:33 2004 - Figure numbering weirdness in LaTeX
The \label command for a \figure needs to immediately follow the \caption for the \figure, otherwise the figure reference number will be wrong when you use \ref to reference it.
Wed Mar 3 15:08:21 2004 - Bibliography list order in LaTeX
Do this to get your citations listed in the bibliography in the same order that they are referenced in the text:
\bibliographystyle{unsrt}
Fri Jan 16 20:28:09 2004 - "Degrees" symbol in LaTeX
Do this:
\usepackage{textcomp}
.
.
.
\textdegree\space
Sun Jan 11 00:51:18 2004 - Old ACPI Patches
Old versions of the Linux ACPI kernel patches are here:
<link>
These are useful if, for example, you want to compile a kernel with (relatively) up-to-date ACPI support using the Debian Woody kernel sources - which include patches for security problems but only run up to 2.4.18.
Tue Jan 6 19:49:16 2004 - Linux Kernel 2.4.x security patch URLs
Here are URLs for patches for the three recent Linux kernel root vulnerabilities:
<link>
<link>
<link>
Note that there's other vulnerabilities around besides these. These are just the three recent big ones.
Mon Jan 5 22:10:31 2004 - Bitmap graphics with LaTeX
All the methods that I have tried of converting a DVI file to a PDF or PS file will mangle any bitmap graphics (JPEG, PNG files etc) that you included in the document. The picture, converted to EPS so that LaTeX could read it, looks fine in the DVI file (viewed with, eg, XDVI) but becomes blurry when the DVI is converted to PS or PDF.
To fix this, use PDFLaTex to create the PDF file directly. You can then include the image in JPEG, PNG or PDF format. If you also need a DVI file, you can create that separately using LaTeX. If you refer to the image without its extension (.jpg, .png, .eps etc) and include a copy of the image in, say, both EPS and JPEG format side-by-side, then both LaTeX and PDFLaTex will find the copy of the image that they can work on.
PDFLaTeX can handle JPEG, PNG and PDF format images.
LaTeX can only handle PS or EPS format images.
© 2002-2006 Thomas White - Please see the legal notice - Last updated 18/09/06 20:04 - Contact the author
