Introduction

This document will describe how to install Mandrake 9.1 on a HP Omnibook XE4500 laptop using an external firewire connected HDD.

Hardware: omnibook xe4500 with Toshiba DVD-ROM, external Western Digital HDD (80Gb).

Note: You can loose data if you rely on this document. You're supposed to backup your HDD's content and know what you are doing. This document is in no way complete or final; it just offers some clues to whomever wants them. You have been warned.

Yet another problem with the omnibook xe4500

When acccessing the Toshiba DVD-ROM without DMA enabled, the laptop will loose connection with the firewire HDD. However, once DMA is enabled on the DVD-ROM, all runs fine.

How to fix the DMA problem in Windows XP.

In Windows XP even when I choose "DMA is prefered" for the secondary IDE channel under My Computer->Device Manager, the system will fall back to "PIO" access). There is a solution but it involves editing registry keys. Use at your own risk!.

Fire up regedit and go to the following key (secondary ide channel):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\0001
Click right on MasterIdDataCheckSum and choose delete.
Reboot the system

This will delete the key and force XP into redecting the device at the next reboot. This did the trick for me with a Toshiba SD-C2502 DVD-ROM.

In RedHat 9, use hdparm to turn on dma access for the DVD-ROM (hdparm -d 1 /dev/hdc).

In Mandrake 9.1 I can't enable DMA access for the cdrom at boot time. Mandrake's default kernel has the cdrom driver compiled as module ide-cd but this module does not accept the usual "dma=1" parameter. (Old version of the module maybe?). Once the system is booted hdparm -d 1 /dev/hdc does enable DMA access

Disk layout

One of the problems in installing an OS on an external HDD is that grub (and most likely lilo too) can't boot a partition that is not accessible through the computer's BIOS.

The omnibook BIOS knows nothing about firewire HDDs so the only solution is to keep the new OS's kernel(and the rest of the files needed to boot the system) on the main HDD and once the kernel is bootstrapped it will be able to load the rest of the OS from the external disk.

I used the following disk layout:

Pre-install

Since I could not copy data from the CDROM without loosing the FW HDD connection under Mandrake, I had to copy the installation media (content of CD1) to the firewire HDD (I used XP to copy the CD content under /mdk/cd1 on a fat32 partition).

Installing Mandrake


Boot with the mandrake cd1 and type "F1" at the first screen.
choose "expert noauto idebus=66"
Say NO when prompted to load external modules
After the language selection screen appears, press Ctrl+Alt+F2 to go in shell mode (I think it's busybox)

# now we unmount the cd disk and trick mandrake by mounting from the external HDD in the same directory

umount /tmp/image
modprobe ohci1394
modprobe sbp2
modprobe sd_mod

# At this step, the system should be able to access your external HDD (check console 4 for kernel messages - it should display a line that lists your external disk's partitions)

umount /tmp/image
mount -r -t vfat /dev/sda2 /tmp/temporary
rm /tmp/image
ln -s /tmp/temporary/mdk/cd1 /tmp/ide-cd
# make sure noone accesses the DVD-ROM
rmmod ide-cd

Now switch back to the console (Ctrl+Alt+F7) and continue the Mandrake install
Remember to tell Mandrake you do not have CD2 and CD3 (when Mandrake tries to access CD2 for read the FW connection will fail and you'll have to start over).
At the boot loader install step you can't tell Mandrake not to install a boot loader (or I couldn't find it). I just let it overwrite my main HDDs boot loader hoping it will boot.
The rest of the install went fine. Although Mandrake did not detect a sound card at install time, once I booted it up it loaded the trident module and all was fine.

Post Install (fixing stuff)

After the Mandrake install finished I was left with a boot loader that did not work. Mandrake would not start because it did not have the correct initrd image (and thus it did not load the sbp2 driver needed to access the FW HDD); RedHat was simply gone.

I manually booted the RedHat 9 os (using the grub command line (for me it is kernel (hd0,5)/boot/vmlinuz-2.4.20-8 )).

Fixing Mandrake's initrd is pretty straight forward:

Mount the FW HDD / and main HDD /boot from RedHat:

umount /tmp/image
mount /dev/sda5 /mnt/mandrake
mount /dev/hda1 /mnt/mandrake/boot
chroot /mnt/mandrake
initrd --with=ieee1394 --with=ohci1394 --with=sbp2 --with=sd_mod /boot/my_initrd.img
[Ctrl+D] #logout from the chroot 

In the grub menu the initrd line for Mandrake is replaced with the new initrd (my_initrd.img). My final /etc/grub.conf looks like this:
default=3
timeout=10
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,5)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/ idebus=66
initrd /boot/initrd-2.4.20-8.img

title Windows XP
root (hd0,1)
makeactive
chainloader +1

title Mandrake 9.1
kernel (hd0,0)/vmlinuz ro root=/dev/sda5 idebus=66 acpi=off
initrd (hd0,0)/my_initrd.img

I then reinstalled grub from RedHat (grub-install /dev/hda)

Booting Mandrake

Mandrake started just fine. The only problem was my wireless ethernet card (Orinoco prism II compatible) was not recognized. In fact, the wireless-tools package was missing altogether so without iwconfig I was not able to test wireless eth.

After defining software sources for CD2 and CD3 I installed wireless-tools and pcmcia-cs and using them I've sort of started my wireless card (sort of meaning I had to tweak the pcmcia startup script a bit - for some strange reason it expects two variables called PCMCIA and PCIC set in the environment). But the wireless card runs fine.

The National Semiconductor network card was detected fine, video and audio work fine.

ACPI can be enabled but nothing useful will be obtained (I have no battery, thermal, lid or processor info). All i get is the software revision of the ACPI chip. The kernel would need a recompile for this to work

The initial install does not enable the DRI driver so glxgears will be painfully slow and hang the system. However, once I've added Load "dri" to /etc/XF86Config-4 I get a resonable framecount (50 fps in a 1024x768 window).