This web page may contain mathematics; it was generated from a TEX source file using the translator TTH. Translation is not perfect, and may even produce garbage if you are browsing on an X Window platform (e.g. Solaris, Linux). A fix for this problem is here.
Due to font typesetting problems with mathematical symbols, printing this web page is NOT recommended. Where possible a PostScript and/or PDF file is available for hardcopy download.
One thing though: xdvi is not on the Mandrake distro, so you have to get it yourself. I used the tetex-xdvi-0.9-17 ``rpm'' which, I think, came off the LXF (www.linuxformat.co.uk) May 2000 cover disk (Definite Linux 7.0). It works fine.
I decided I needed a laptop and, at £ 800, this one is a pretty good bargain. Its basic spec' is: 20Gb HDD, 256MB Ram and a 1GHz Celeron. It also came with Windows XP ("X"treme "P"rice?) which I won't use much, but at least it's modern. My biggest worry was "will it run linux?", and here I have to thank all those who put entries on the linux on latops site: www.cs.utexas.edu/users/kharker/linux-laptop. Always check this site if you are going to buy a laptop for linux-unless you are really sure of the right product. For example, the entries for earlier Advents warned me that I would have problems with X (the dreaded SiS 630 chipset), but they looked like they were sorted so I bought it anyway.
Since the purchase I have had the need to look at many, many, web sites dedicated to the ``Advent'', and one person referred to them as ``shitboxes'' - due to the difficulties in getting Linux up and running. That's a little harsh I think. The two main problems that I have encountered (X and the Fn key) seem also to be relevant to IBMs and Sonys. Anyway, you should know that not everyone likes this machine as much as I do.
Anyway, things are not as bad as they seem, and here the staff on the end of the Advent national rate helpline helped. It was a simple solution but, at least for me, far from obvious. The machine comes with no documentation on how the recovery disk works but a few hints from a person whose name I didn't write down were enough to get it sorted out. (By the way, the 75p per minute helpline was pretty hopeless: I assumed that for the extra money I'd be getting more expertise. Silly me... .)
So, what you do is this. Take a deep breath because you are about to wipe out that factory set XP installation with the recovery CD. Are you sure you want to do this? OK. Boot from Disc 1 of the recovery pair. Once the program gets going hit CNTRL-C and type Y to ``terminate the batch job''. You should have a standard DOS prompt and you have to find the drive corresponding to the CDROM (or DVD) drive. Try either cd D: or cd E:, typing DIR each time. You are looking for a listing of the files on the recovery disc. These should be recover.exe and something else, which I can't quite rememeber, but which ends in the .GHO suffix. The first of these is the recovery program and the second is the ghost image. Once you have found them type ``recover'', hit return, and an interactive version of the recovery program starts up. First thing is to choose to recover disk -> from image from the flyout menu and then proceed very slowly until you come to a table showing how big the disk and original image size is. The important bit is around half way along: there is a box showing what size disk to recover to. Navigate to it with the TAB key and wipe out what is there. Now choose the size you want your windows partition to be and type it in. I chose 5000, for 5GB, which it adjusted to 5004 for me. Now let the program do its stuff-and be ready when it asks for disk 2.
When recovery is complete (10-15 minutes) you'll get asked to ``Continue'' or, as the default, ``Reset Computer''. Don't choose the last one-it just locks the machine. Instead TAB to ``Continue'' and then choose ``Quit'' from the menu that appears.
That's it! you now have Windows XP on a 5GB partition, and can use the rest for Linux. So, how to do that? Read on.
Boot from the disk and choose ``workstation'' type of installation in ``expert'' mode. When you get to the bit about partitioning the drive select ``wizard'' and take the ``use free space'' option. This means that your freshly resized 5GB Windows XP partition will be left alone. When it comes to package selection I removed the check from the ``individual package selection'' option and elected to install everything. With everything else I just said OK to the defaults it gave me except that I didn't install lilo but instead created a boot disk. (If you install lilo at this point then you'll not automatically get an XP option at boot time. See below for more on this.)
Now, eventually you'll get to the monitor configuration screen. I tried many things here but continually got a ``invalid depth'' error (or something similar). The worst thing is that the installer appears to be in an infinite loop. I just got out by typing CNTRL-ALT-BACKSPACE to destroy the screen (although I did take the time to create the ``replication'' floppy that it offered to make for me, even though I have no idea what it is for, and have never had occasion to use it). Now insert the boot floppy and reboot, but stay alert.
As soon as you get the lilo prompt hit a key to stop the countdown. Now, at the prompt type:
linux apm=off vga=791The first parameter turns off the automatic power management and the second solves the SiS630 Chipset problem! Beware of Mandrake's web site though. Somewhere there it says type vga=761, but this is an invalid mode.
Now, log in as root and start Xconfigurator. I got the preselected ``Generic'' monitor. Clicking ``No'' results in the machine hanging. Anyway, I selected:
Generic: High Frequency SVGA, 1024X768 16bpp at 70Hz.However, when I clicked ``Yes'' the machine seemed to hang. After a short wile I collapsed the display with CNTRL-ALT-BACKSPACE and then rebooted (with the floppy). Don't forget the apm and vga parameters at the lilo prompt though. When you get to the text login prompt just sit tight and wait. A graphical login appears and you get straight into KDE.
So, now you have an X-enabled linux installation, how can you get rid of that boot floppy?
To get a lilo boot option for XP you need an ``other'' stanza. I used,
other=/dev/hda1 table=/dev/hda label=XPand for this much gratitude to the authors of the excellent Running Linux, . Now you run lilo with
If copying files, checking permissions and running lilo makes you nervous then I believe the following also works.
Reboot with the LXF Mandrake CD and request an ``upgrade''. Don't mess with anything but do elect to install lilo. You'll now get a default /etc/lilo.conf but you'll still have to edit it and run lilo again.
For reference, here is how my /etc/lilo.conf turned out:
boot=/dev/hda map=/boot/map install=/boot/boot.b vga=normal default=linux keytable=/boot/uk.klt lba32 prompt timeout=30 message=/boot/message menu-scheme=wb:bw:wb:bw image=/boot/vmlinuz label=linux root=/dev/hda5 read-only vga=791 append=" apm=off" other=/dev/hda1 table=/dev/hda label=XP image=/boot/vmlinuz label=failsafe (passed to lilo) root=/dev/hda5 append=" apm=off failsafe" read-only vga=791 other=/dev/fd0 label=floppy unsafeYou should note that the simple solution where apm=off appears in each of the linux stanzas doesn't work. Also, you should note that vga=791 isn't in the floppy stanza-that doesn't work either. So, and this is important, if you boot from floppy then hang around to type linux vga=791. Otherwise you'll get screen panic and, possibly, a broken machine.
WARNING: don't try SuSE LiveEval on a machine with Linux partitions and/or XP (i.e. NTFS). I am not sure which causes the trouble but IT WILL **** YOU UP! Whatever I did (e.g. ``vga=ask'' or ``vga=791'' at the boot screen) I got screen panic-bad enough to scare me. I think, but don't know for sure, that SuSE either can't see the NTFS partition or can see it but prefers the Linux partition. Whatever: it can't manage.
mount -t ntfs /dev/hda1 /mnt/disk
insmod parport (may not be needed if a printer is plugged in at boot time) insmod imm mount -t vfat /dev/sda4 /mnt/disk
mkfs -t ext2 /dev/sda4 240000With an appropriate entry in /etc/fstab you can then mount the zip drive and make an update to a directory backup, preserving file attributes, with the following sequence
mount /dev/disk cd /dev/disk rm lost+found chmod a+rwx . cd dir cp -vpru . /mnt/disk umount /mnt/diskBe a little careful when copying back to dir. You don't want stuff like .., nor stuff like .mailbox, or .netscape, or anything else that might be used differently.
To copy back do:
cd cp -vpru /mnt/disk/* . (filter out unwanted files manually)Be careful though-this doesn't copy the .* files! If you issue the command again but using /mnt/disk/.* then you'll get .. ! (You don't want that.)
o | lprI also changed the line
O 0pt,0ptto read
O 0pt,1.75cmbut this is not essential. On the other hand, changing it to
O 3mm,5mmgets close to pdflatex settings.
To start with get a fresh DOS disk ready (for a boot disk) and then fire up with the installation DVD. At the boot screen give the option vga=791 apm=off to linux and then hit return. You'll get a load of boot text and then sometime during it saying ßearching for a braille display" the screen will go blank for around a minute. It's no problem, after this YaST2 starts up and the installation begins. First you'll have to set the language and time zone and next come the disk partitions...
You can accept the default here or do your own thing. I did the latter and requested the partition table:
Win XP /dev/hda1 NTFS 4.9GB ( 0, 637) /boot /dev/hda5 ext2 23.5MB ( 638, 640) swap /dev/hda6 1.0GB ( 641, 771) / /dev/hda7 ReiserFS 9.0GB ( 772, 1946) /home /dev/hda8 ReiserFS 3.7GB ( 1947, 2431)
Note that: the disk spans (0,2431); the XP partition should remain untouched; and, all the linux partitions are in a single extended partition. I used ext2 for /boot because the lilo manual page alerted me to a potential bug involving mixing lilo and Reiser FS. (In fact, the installation appears to be using Resiser FS v3.6.25 which, with the version of lilo, would suggest that the bug has been fixed in SuSE 7.3. Anyway, what's done is done.)
Next I selected to install all packages: this takes about 2 hours (and 2 minutes!) and went like a dream. Now comes a problem.
After package installation I should have got the option to configure the monitor, but instead the machine went dead. Luckily, I had a boot floppy (and you should make one too) and so switched off and used it (and ejected the DVD). After booting, YaST2 resumes right where it left off-great!-and then hung again.... I don't think it's that serious: boot again but this time pass apm=off to the kernel. This works fine and you can now configure the monitor. I think the problem arose due to the power saving kicking in, and there is no way (that I could find) to wake the machine up. On reflection it would probably have been better to start the whole install process with vga=791 apm=off, and that's what I suggest you do. (apm doesn't work well under linux anyway-as far as I can see.)
For the monitor I chose LCD and
1024x768@70Hz (horiz: 31 - 65 kHz; vert: 58 - 78 Hz)(3D acceleration is switched off by SuSE). After configuring the sound card (a breeze) I finished the installation and rebooted from the floppy.
The modem isn't recognised and so it's a little difficult to register at support.suse.de/en/register as it asks (that's why we kept XP...) but otherwise you are now up and running.
To get rid of need for the boot disk log in as root and in
Control Centre : YaSt2 modules : System : bootloader configuration Control Centre : YaSt2 modules : System : configure boot modeinstall LILO in the MBR (I also took the time to create the ``other'' stanza to boot XP). This didn't work like the dream I wanted it to be and I wound up editing /etc/lilo.conf by hand and running lilo (as explained earlier for Mandrake). My (final) /etc/lilo.conf file is given a little later.
Last big thing: as root run SaX2 in order to get the three-button mouse emulation working.
That's it! You now have SuSE 7.3 up and running, albeit not perfectly. The next section details some of the problems that remain.
For the record, after the installation I ended up with the following partition table (issue the fdisk command as root):
linux:~ # fdisk -l /dev/hda Disk /dev/hda: 255 heads, 63 sectors, 2432 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 510 4096543+ 7 HPFS/NTFS /dev/hda2 511 2432 15438465 f Win95 Ext'd (LBA) /dev/hda5 642 772 1052226 82 Linux swap /dev/hda6 773 1947 9438156 83 Linux /dev/hda7 1948 2432 3895731 83 Linux /dev/hda8 511 513 24066 83 Linux /dev/hda9 514 641 1028128+ b Win95 FAT32 Partition table entries are not in disk order
The first of these is my priority, and I have made a little progress. First, Mandrake did accept the dual display toggle (Fn-F4), and so I knew there was a solution. I didn't know what it was, but it was worth a look.
I noticed that the SuSE installer passed enableapic to the kernel through an ``append'' in /etc/lilo.conf, and Mandrake hadn't done this. So I did a search on www.google.com to see what this parameter does. Now, I am not sure that I have this right, but it seems that apic messes around at a low level with the BIOS calls. And, it seems, the Fn key sequences are processed by the BIOS....
Next, I went back to google and searched for ``Fn key'', and ended up reading a lot of documents. I didn't find anything definitive, but the general sense was that turning apic off can solve problems.
So, I passed disableapic to the kernel instead and things started to work a lot better-but not perfectly.
First, under KDE the volume controls (Fn-F5 and Fn-F6) work and so does the dual-display (Fn-F4). However, the speakers emit, sprodically, an unsettling high-pitched ``squeaking'' sound. It doesn't sound like any of the KDE sounds in /opt/KDE2/share/sounds and I am not at all comfortable with it. This doesn't seem to happen with Gnome.
UPDATE: there is more to this. Similar sounds are also emitted when apm is enabled at boot (i.e. enableapic is retained).
I also experimented with apm, but cannot get it to work properly. My /etc/lilo.conf is included below. You can see how many boot stanzas I have: each one has a different combination of apic on/off and apm on/off (Note: this is /etc/lilo.conf after the re-install mentioned above in connection with Partition Magic).
boot = /dev/hda vga = 791 read-only menu-scheme = Wg:kw:Wg:Wg lba32 prompt timeout = 100 message = /boot/message image = /boot/vmlinuz label = linux root = /dev/hda6 initrd = /boot/initrd append = "enableapic vga=791 apm=off " vga = 791 image = /boot/vmlinuz label = linux-apm root = /dev/hda6 initrd = /boot/initrd append = "enableapic vga=791 " vga = 791 image = /boot/vmlinuz label = linux-apm-crt root = /dev/hda6 initrd = /boot/initrd append = "disableapic vga=791 " vga = 791 image = /boot/vmlinuz label = linux-crt root = /dev/hda6 initrd = /boot/initrd append = "disableapic vga=791 apm=off " vga = 791 other = /dev/hda1 table = /dev/hda label = XP image = /boot/vmlinuz.suse label = failsafe root = /dev/hda6 initrd = /boot/initrd.suse append = "disableapic ide=nodma vga=791 apm=off" optional image = /boot/memtest.bin label = memtest86Notice that ``vga=...'' appears many times. These are as a result of trial and error and I recommend that you don't assume that any are redundant unless you have thoroughly tested. Why? Well, the only stanza in the above that seems robust is the one labelled ``linux''. For the others the screen sometimes goes into a panic, and sometimes doesn't: it seems random. Also, it can happen a while after you have booted, and even when you have started work. So, if you want to use the other stanzas then never go more that an arm's length from the screen, and never take your eye off it! (At least until some significant time has passed.)1
I have no idea how to fix the occasional machine freeze after exiting KDE. Maybe change the display manager, kdm, to gdm or xdm?
I am going to persevere with this and will update this document when I have some more answers. In the meantime, if anyone reading this can help please email me at email@example.com.
Thanks, and Good Luck!
In the BIOS, change the shared memory to 32MB (it was 8MB for me). Now login and run SaX2 (using detected settings). In the ``Graphics Device Setup'' window select ``properties'' under the ``Expert'' tab and set memory to 32M (it was set at ``auto'' for me). Test the configuration, exit and reboot.
If you'd rather not do this then you'll pleased to hear that it made no perceptible difference! KDE is, I think, a little hungry. Windowmaker runs much faster-but you don't get all the frills!
Next, still as root, cd to /var/lib/texmf/db/ and observe that there is an ls-R database file. This needs to be updated: just issue the command mktexlsr and everything is installed and ready for use.
Just one annoyance: my slides are shifted to left a little too far. To fix this just run dvips with a shift, such as:
dvips -O0cm,-1cm prosper-tour.dviExperiment to get the right value.
get fundus from CTAN and callig15.mf and calligra.mf as root: in /usr/share/texmf/fonts/source mkdir calligra (drwxr_xr_x) put callig15.mf and calligra.mf here ("a+r") then run "mf" with \mode=ljfour; input callig15.mf to get callig15.log, callig15.600gf and callig15.tfm delete the first and mkdir /usr/share/texmf/fonts/tfm/calligra and put callig15.tfm in here (a+r) In /usr/share/texmf/tex/latex/misc mkdir calligra (go-x), and put in calligra.dtx and calligra.ins (a+r) run "latex calligra.ins" run "latex calligra.dtx" remove the .aux and .log files then run mktexlsr Do this for calligra la - need fonts outline - need fonts pvscript - need fonts startrek - need fonts suetterl - need fonts twcal - need fonts va - need fonts Also, get calrsfs from CTAN and tar xvzf it. Follow the read me: put calrsfs into /usr/share/texmf/tex/latex/misc and run mktexlsr
<Eterm-0.9> # Written by Simon Shaw, 5 April 2002, and fashioned from: # /usr/X11R6/share/Eterm/themes/auto/theme.cfg begin main begin imageclasses begin image type background state normal mode trans allow image trans viewport auto border 0 0 0 0 end image end imageclasses begin toggles borderless true end toggles end main
According to the laptop manual, ``suspend'' switches off only a few devices and is not particularly energy conserving unless it is enabled as ``save to disk''. This facility is, apparently, not supported by the linux kernel.
On the other hand, man apmd and man apm give the following:
However, after installation, I was left with the following state of affairs:
cd /usr/bin ; chown root apm ; chmod +s apmNow any user can invoke apm. (Be sure that you want this.)
To try and fix these I spent a lot of time trawling through the manual pages and SuSE docs... and got nowhere. It turns out that it's not linux's fault at all-it's the BIOS! It had ``suspend'' disabled.
To fix this reboot and enter the BIOS. Select ``Power Management Setup'' from the main menu and then:
Save and quit, boot linux again and Hey Presto! Both of apm -S and apm -s work, as do Fn-F1, closing the lid, and tapping the power switch!
However, it doesn't give the possibility of never needing to turn the laptop off (see the SuSE 7.3 Reference Manual, page 192). As an experiment, with KDE, konqueror, a terminal and a text editor running-but no ``jobs'', Fn-F1 uses about 20% of the battery power in about an hour. It makes no difference whether the hard disk spindown (in the BIOS) is set to ``1 minute'' or (the default) ``disable''. Also, the fan stays on throughout. Also, the same behaviour is evident with apm -s and apm -S and, it seems, the machine treats ``suspend'' and ``standby'' in exactly the same way.
As an aside, if the laptop keeps going into standby when you are trying to use it (a common problem), Fn-F1 seems to cure it...
1 It seems that this is not a problem after all-it seems to have fixed itself!