Compiling a kernel for your laptop.

If you've done a base install from the Redhat installation manager you probably have a larger kernel than you'd like. You may have also missed installing the PCMCIA server (I did anyway.) You'll have to do some modifications, especially if you want to see all of your hardware on the laptop. The base install is basically assuming you have a desktop PC. Your kernel will work fine, but if you want to optimize it then you should probably compile your own kernel.

First, make sure pcmcia services were installed. Run the command:

/etc/rc.d/init.d/pcmcia start

If nothing happened then you'll have to install pcmcia services. That means you need to download the pcmcia RPM (Redhat Package Manager package), or install it from CD or hard drive. If you don't have PCMCIA then you can't download. You'll have to get access to a physical medium, like disk or CD. Mount your cdrom drive by adding it to the file system table, creating a mount point and mounting. Linux thinks your CDROM is a hard drive, and will detect it as /dev/hdc.


# ls /mnt/cdrom 
see if the mount point exists.
If it's not there make it:
# mkdir /mnt/cdrom
# vi /etc/fstab
add an entry like so:
/dev/hdc	/mnt/cdrom	iso9660	defaults	1 2
Next, try to mount it.
# mount /dev/hdc
If your CDROM starts spinning then hooray.

Or, mount your Windows partition.
If you installed from the Win98 partition, all of your RPMs are sitting there waiting for you. This also solves your floppy problem. As far as I know the floppy drive is invisible to Linux. You can however boot into Windows, copy floppy contents to the windows directory, boot in linux, mount the windows dir, and access the files. To do that you'll need to mount the windows partition. This is similar to the cdrom proceedure:


# mkdir /mnt/win
# vi /etc/fstab
Make an entry in the fstab file:
/dev/hda1	/mnt/win	vfat	defaults	1 2
# mount /dev/hda1
# cd /mnt/win

Now you have free reign over your windows files, as well as access to the full Redhat install you placed on the Windows partition. That means you have access to all of the RPM's, so you can install the PCMCIA services you might be missing. I have not tried mounting a fat32 directory but I'm fairly sure it's possible. You'll have to make sure the filesystem type is compiled into your kernel, or was installed as a module.


# cd /mnt/cdrom
or your windows dir...
# cd /mnt/win
find your RPMS directory
# cd RedHat/RPMS
Install your package.
# rpm -ivh kernel-pcmcia-cs-*
Now you have PCMCIA services.
Try to find your devices.
# /etc/rc.d/init.d/pcmcia start
Listen for the happy beep sounds. If you have unhappy beep sounds, you have some work to do. Possibly you don't have drivers for your specific device(s). Try some of the sites I link to on the first page.

My config file
Here is a copy of my config file. I recommend you make your own. This one is very trimmed down, but if you want to use it as a start, then copy it to /usr/src/linux and name it ".config". Next, run make menuconfig, xconfig, or simply edit the file by hand to set the options you want. This config will work pretty well if your setup is like mine. What I'm using is as follows:

Libretto 100ct, 32mb RAM
Redhat 6.0
3com 3c589d PCMCIA NIC.
Megahertz xj1560 56k PCMCIA modem
Addonics Pocket CD98, PCMCIA external CDROM.

For your config file, turn on SCSI if you have a PCMCIA SCSI card. Turn on Networking if you have a NIC or modem. This is all basically the same as if you had a desktop PC running. Here are some of the highlights from the .config file.


APM stuff - You want this.

CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
CONFIG_APM_DO_ENABLE=y
CONFIG_APM_CPU_IDLE=y
CONFIG_APM_DISPLAY_BLANK=y
CONFIG_APM_POWER_OFF=y
# CONFIG_APM_IGNORE_MULTIPLE_SUSPEND is not set
# CONFIG_APM_IGNORE_SUSPEND_BOUNCE is not set
CONFIG_APM_RTC_IS_GMT=y
# CONFIG_APM_ALLOW_INTS is not set

Processor
Set it as a plain Pentium.


CONFIG_M586TSC=y

Mouse
Don't worry about your mouse, install it as a PS/2 mouse and it'll work just fine. This kind of surprised me since the Libretto uses that funky touchstone thing.

File systems.
If you want to mount your MSDOS directory then be sure to add MSDOS and FAT16 (vfat) to your system. Also be sure to add iso9660, and joliet if you want to mount Windows-based CDROM's.


#
# Filesystems
#
CONFIG_QUOTA=y
CONFIG_AUTOFS_FS=m
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=m
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
# CONFIG_MINIX_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
# CONFIG_QNX4FS_FS is not set
CONFIG_ROMFS_FS=m
CONFIG_EXT2_FS=y
CONFIG_SYSV_FS=m
CONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set

Sound
Install as a soundblaster compatable. It seems to be happy with this.

Compile & install your kernel
First go to /boot and copy vmlinuz to vmlinuz.backup, just in case. Go back to /usr/src/linux, and do the usual complile process.


# make dep; make modules; make modules_install
wait for a while while it works...
# make bzImage
# make install
Make your new initrd.
# mkinitrd /boot/initrd-X.img X
"X" here = your kernel version
# vi /etc/lilo.conf
Make sure it's pointing to the right initrd & kernel.
Make a backup boot entry for your /boot/vmlinuz.backup kernel,
name it something else, such as linux2.
Run Lilo:
# lilo
Reboot with your new kernel
# init 6

For good instructions, be sure to get a copy of Linux Unleashed, any O'Reilly book on Linux, and last but not least the kernel howto file before you attempt any of this.

Next page...
Running X11

Previous page
Back to Tech
Back to Home.