Installing Slackware 9.1 on a Toshiba Portégé R100

Andrea Rossato <arossato AT istitutocolli DOT org>

Update:

2004/03/10 - Intel released a GPLed native driver for Intel PRO/Wireless 2100 (some functions not yet available).

Update:

2004/01/09 - Wireless Lan working! See the Wireless section. Linux-2.6.1 and cpu-freq.


Table of Contents
1. Introduction
2. Disclaimer and Feedback
3. Prerequisites
3.1. Boot server
3.1.1. TFTPD
3.1.2. PXELinux
3.1.3. DHCPD
3.2. Bootstrap
4. Installation
5. Configuration
5.1. Which kernel?
5.2. Xfree86
5.3. Sound
5.4. Modem
5.5. ACPI, APM and CPU frequency
5.5.1. Linux-2.4.x
5.5.2. Linux-2.6.x
5.6. USB and PCMCIA
5.7. Wireless LAN
5.7.1. Intel Native Linux Driver
5.7.2. Ndiswrapper
6. Revision History

1. Introduction

Every Slackware user knows how easy the installation of this distribution of the GNU/Linux operating system is. However, if you do not have a floppy disk or a cdrom to boot from, the process can become quite troublesome. I did not have a floppy and it is not possible to boot from my USB cdrom. That means that the only way to have GNU/Linux requires booting from the network with an initrd image that will support an NFS installation. Moreover, our laptop comes with a bolted proprietary operating system pre-installed: you paid a licence for it and probably you want to keep it in a small piece of your hard disk. That requires resizing the large partition it's running on. You could do that with a proprietary tool, but if you do not want to waste your money and think that freedom is better than slavery, you also need an image with the free tool that is required for this operation. Slackware initrd does not have this support built in. So you need a modified image.

To summarize: you need a DHCP server that will let you boot from the network (your Toshiba supports PXE and that saves a lot of trouble); you need and initrd image with network support and ntfsresize, and an NFS server where the Slackware installation packages can be accessed.

A great help to carry out the task of having Linux running on my Portégé came from reading Sam Freed's installation guide for Debian and Piete Brooks' guide for Red Hat. Read them carefully, since I will not cover every aspect already discussed by them.

You already noticed that I'm not a native English speaker: sorry for what that implies. I hope this note will help you, and I also hope I'll be able to make myself as clear as I possibly can.


2. Disclaimer and Feedback

I do not give any warranty or other assurance as to quality or functionality of the information herein provided. You are on your own, or, as Sam puts it, «Anything you do is your own responsibility, if anything breaks, whether you followed my advice or not, you get to keep both halves.»

I'd like to have your feedback, either of a success or a failure. Please feel free to contact me:

arossato AT istitutocolli DOT org.


3. Prerequisites

Since I did not have a floppy or a cdrom to boot from I had to set up a boot server.


3.1. Boot server

In order to boot from the network you need to set up a boot server. That requires a Trivial File Transfer Protocol and a DHCP server from which you will download a bootable image.

I suppose you are running a Slackware box that will be your TFTP and DHCP server. That server will recognise your Toshiba from the mac address of its network card and will provide the bootable image. That image will be downloaded at boot time.

In order to set up a server you need to run a TFTP daemon and a DHCP daemon.


3.1.1. TFTPD

In order to have the TFTPD up and running just issue this command:

/usr/sbin/in.tftpd -l -v -s /var/tftpboot
    

/var/tftpboot is the root directory where to store the bootable image.


3.1.2. PXELinux

The Pre-Boot Execution Environment (PXE) is the way to make a network interface card a boot device. The NIC will contact a DHCP server. The server will provide, through a TFTP, a bootable image.

“PXELINUX is a SYSLINUX derivative, for booting Linux off a network server, using a network ROM conforming to the Intel PXE (Pre-Execution Environment) specification.” (See PXELinux)

At boot time the NIC will requests an ip address and the address of a TFTP server where to get a kernel and the image. The image will be loaded into memory according to a configuration file stored in a pxelinux.cfg directory. Since it is not among the goal of this article to explain how PXE works, nor how to configure a Boot server, you can read more about all that here.

I already prepared everything you need to setup your boot server: a PEXLinux configuration, an initrd image with network support and a ntfsresize binary. You can get it here.

To install it, save it in /var/tftpboot (or wherever you decided to put you tftpd root directory) and:

tar xvfz pxelinux.tar.gz
    

A directory pxelinux will be created. Inside you'll find

initrd.pr100
bzImage
pxelinux.0
pxelinux.cfg/default
    

This is all you need to boot you laptop from the network.


3.1.3. DHCPD

Now it's time to configure your DHCP server for responding to the request of your toshiba. The DHCP server will respond according to the mac address of the NIC making the request.

That's my /etc/dhcpd.conf:

ddns-update-style            none;
default-lease-time           21600; 
max-lease-time               21600;
option option-128 code 128 = string; 
option option-129 code 129 = text;
subnet 10.0.1.0 netmask 255.255.255.0 {
option subnet-mask           255.255.255.0; 
option broadcast-address     10.0.1.255; 
option routers               10.0.1.1; 
option domain-name-servers   10.0.1.1; 
option domain-name           "nowhere.net"; 
use-host-decl-names      on;     
option log-servers       10.0.1.1;
next-server 10.0.1.1;
host toshiba {                         
hardware ethernet 00:08:0D:F7:02:67; # change with you mac address                   
filename "/pxelinux/pxelinux.0";
fixed-address 10.0.1.5;
                }              
}
    

Change the ip addresses according to you network configuration: in the above example 10.0.1.0/24 is the network attached to my boot server network interface card.

Be sure to put the correct mac address of you laptop's NIC, otherwise the dhcp server will not recognize your toshiba. In order to discover it I'm afraid you shall boot the proprietary OS that comes preinstalled in the laptop. Check the network properties to find it out.


3.2. Bootstrap

That's very easy: when you laptop boots, just press n. Otherwise you can enter the bios setup and select the appropriate boot sequence: chose to boot from network first.


4. Installation

If everything was properly set up, you should see the image downloaded from the server and the usual Linux boot sequence.

You'll be prompted with the usual Slackware fake login. Enter as root (or just press enter).

Now it's time to setup the network. If you are using my initrd, just type:

# network
  

Your NIC will be promptly recognized and the right kernel module (eeepro100) loaded.

If you need to resize the ntfs partition, ntsfresize is provided with the image. Be careful to read and follow the instruction you can find here. I did resize my ntfs partition without any problem.

Continue with the disk partitioning and then type:

# setup
  

The familiar Slackware setup environment will appear. Continue as usual.

Since I suppose you do not have a cdrom to install Slack from, choose a source for an NFS installation.

I downloaded all the needed packages on my boot server (my desltop computer) and put all in /tmp/slack. On the server I edited /etc/exports to add:

/tmp/slack 10.0.1.5(rw)
  

Change the ip address with the address given to you laptop. Then, on the server, run:

/etc/rc.d/rc.nfsd start
  

5. Configuration

I suppose you know what are the devices that come with your toshiba. Otherwise check Sam Freed's installation guide for Debian and Piete Brooks' guide for Red Hat to find out.

I take for granted that you read their guides, so I will not give you much details on the configuration, except when I took another approach.


5.1. Which kernel?

Sam Freed's writes: «Forget anything beyond 2.4 for now.» I do not know when now is (8th December 2003, I believe). This is not my experience, though. I've been running 2.6.0-test11 for two weeks without any crash or data loss. I'm now running 2.6.0.

You can stick with 2.4.22 that comes with Slack (there's an update to 2.4.23 for security reasons in the patches directory of the stable release). As you know Slackware policy is not to patch the kernel. If you want nice features like software suspend and standby, or the ability to control the CPU frequency (see below), you should give 2.6.0 a try. This is my config


5.2. Xfree86

You should get the latest XFree86 binary and the trident_drv.o drive from here.

Remember that XFree86 must be run suid. As root:

# chmod u+s Xfree86
   

That's my XF86Config.


5.3. Sound

Last Slackware I installed was 8.1. I was surprised by the fact the the sound card was automatically configure by hotplug in Slack 9.1.

This is not the case with Linux 2.6.0. Manual configuration seems to be necessary. I still do not know why. If you do, please let me know.

Anyway, the old way solved the problem:

modprobe snd_intel8x0 
modprobe snd_pcm_oss
   

Alsa works just fine.


5.4. Modem

With Linux 2.4.23 you need slmdm-2.7.10.tar.gz. You also need to edit line 75 of amrmo_init.c and change 0x2486 to 0x24C6. Then continue following the instructions of the README.

With Linux 2.6.0 just grab slmodem-2.9.3.tar.gz, unpack, make and make install.

Then:

modprobe ppp_generic 
modprobe ppp_async 
modprobe ppp_deflate 
modprobe slamr 
slmodemd --country=ITALY /dev/slamr0 & 
   

Change ITALY with your country code. To find out just type:

slmodemd --countrylist
   

5.5. ACPI, APM and CPU frequency

5.5.1. Linux-2.4.x

APM and APCI both work. There are patches to apply for APCI.

If you suspend from a console, on resume the console will be black. Suspending from X works just fine.

Before suspending (and this is required also by Linux-2.6.x) you should umount USB or PCMCIA devices, stop their services and remove related kernel modules. Otherwise you can get nasty surprises on resuming.


5.5.2. Linux-2.6.x

The new kernel provides software suspend and standby.

My swsuspend script:

#!/bin/sh
/usr/local/sbin/wlan_down #my script to get rid of wireless and related modules
rmmod uhci_hcd 
rmmod ohci_hcd 
rmmod ehci_hcd 
rmmod usb_storage 
clock --systohc 
echo 3 > /proc/acpi/sleep
sleep 3 
clock --hctosys 
modprobe usb_storage 
modprobe uhci_hcd 
modprobe ohci_hcd 
modprobe ehci_hcd
/usr/local/sbin/wlan_up #I need wirless support, after all.
    

And this is my standby script:

#!/bin/sh 
/usr/local/sbin/wlan_donw
rmmod uhci_hcd 
rmmod ohci_hcd 
rmmod ehci_hcd 
rmmod usb_storage 
clock --systohc 
echo 4 > /proc/acpi/sleep
sleep 3 
clock --hctosys 
modprobe usb_storage 
modprobe uhci_hcd 
modprobe ohci_hcd 
modprobe ehci_hcd
/usr/local/sbin/wlan_up
    

So far I did not experience and system crash or data loss. Remember that changing the system during suspend or standby mode will result in the system not being able to unsuspend.

The new kernel supports also CPU-FREQ, the ability to change on the fly the CPU frequency. That requires some modules. These are all my ACPI and CPU-FREQ modules.

modprobe p4_clockmod 
modprobe ac 
modprobe toshiba_acpi 
modprobe battery 
modprobe processor 
modprobe button 
modprobe fan 
modprobe thermal 
modprobe cpufreq_performance 
modprobe cpufreq_powersave 
    

The kernel modules centrino-speedstep is actually not working, since Intel(R) Pentium(R) M processor 1000MHz (the model name reported by /proc/cpuinfo) is not properly recognized. BTW p4_clockmod seems to work fine.

To decrease the CPU frequency

cat /proc/sys/cpu/0/speed-min > /proc/sys/cpu/0/speed
    

To restore maximum frequency:

cat /proc/sys/cpu/0/speed-max > /proc/sys/cpu/0/speed
    

Update:

with Linux-2.6.1 Pentium M 1000M is fully supported by centrino-speedstep kernel module. So, instead of

modeprobe p4_clockmod
    

use:

mdoprobe speedstep-centrino
    

The /proc/sys/cpu seems to have disappeared in this kernel. In order to control the cpu frequency you must use the new sysfs. To do this you must add a line like this to /etc/fstab:

sysfs  /sys  sysfs  default  0   0
    

then

mkdir /sys
mount /sys
    

Now you can control cpu frequency through /sys/devices/system/cpu/cpu0/cpufreq/*.

For instance, try:

echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
cat /proc/cpuinfo
    

Read more about cpu-freq in /path/to/linux-2.6.1/Documenetation/cpu-freq/user-guide.txt.


5.6. USB and PCMCIA

USB just works out of the box.

I do not have any PCMCIA device to try. But I trust Piete Brooks' guide for Red Hat: he says that “PCMCIA seems to `just work' using the default yenta_socket.


5.7. Wireless LAN

5.7.1. Intel Native Linux Driver

On March 9th, 2004, Intel released a native Linux driver under the GNU GPL. You can find it here. The driver requires a binary only firmware, released under a proprietary license. It also requires patching the kernel. Works either with 2.6.3 and 2.4.25.

Here you'll find instructions to build it outside the kernel tree (without patching) with linux-2.6.3.

Get the ipw2100-full-0.29.tgz package and the firmware. Follow the README to install the firmware.

Unpack the package somewhere and edit Makefile.26. Change:

obj-$(CONFIG_IPW2100) = ipw2100.o obj-$(CONFIG_IPW2100_AVERATEC_5100P) += av5100.o
    

to

obj-m += ipw2100.o 
obj-m += av5100.o
    

Then link Makefile.26 to Makefile:

ln -s Makefile.26 Makefile
    

Then

make -C /usr/src/linux SUBDIRS=$PWD modules 
    

where /usr/src/linux is the path to the kernel source.

Then:

cp ipw2000.ko /lib/modules/2.6.3/misc/ 
cp av5100.ko /lib/modules/2.6.3/misc/ 
    

Then:

depmod -a 
modprobe ipw2100 
    

With iwconfig and ifconfig you can now configure you network interface.

At the time of this writing the driver has limited functionalities: ad-hoc mode and WEP are not supported. For these reasons I was only able to bring the interface up, but, since I do not have an Access Point, could not actually test it.


5.7.2. Ndiswrapper

Wireless seems to be working with free (as in beer) binary only drivers (for a proprietary operating system) together with a free (as in freedom) driver wrapper.

You need:

1. Ndiswrapper

2. Binary drivers (you can get the ones I tried directly here)

3. Linux Wireless Tools (you can get them here)

Install ndiswrapper and carefully follow the installation procedure (read the INSTALL!)

Install the linux wireless tools.

modprobe ndiswrapper 
loadndisdriver 8086 1043 /path/to/w70n51.sys /path/to/w70n51.inf
iwconfig wlan0 mode ad-hoc essid you_net
    

Now you can configure your wlan0 interface.

Confession time: at first my wireless card seemed not to be receiving packets (though properly sending). I thought there could be something wrong with it. So I fired up for the second time the proprietary operating system my toshiba came with. The card was working perfectly. So I came back to Linux and tried configuring the card again: it worked perfectly. Something strange, right?

Before suspending you should stop the wireless lan and remove the kernel module.


6. Revision History

2004/01/09:

Added the Wireless Lan section; added reference to Linux-2.6.1: updated cpu-freq; minor corrections.

2004/03/10:

Added the Intel Native Linux Driver section.

...

Updated:

$Date: 2004/03/10 19:00 $ $Author: arossato $

Copyright

Copyright (C) 2003-2004 Andrea Rossato - Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.