Hempel Design Group / Home / linux /
Linux on the Panasonic CF-35

Contents

Introduction

This page contains information helpful in configuring a Linux/Win98SE dual-boot system on the Panasonic CF-35 laptop computer. Please note that the procedure involves swapping the floppy drive and the CD-ROM, rebooting the computer many times, and some familiarity with disk partitions. The Pansonic CF-35 is a very capable laptop, but it has a restriction of using either the CD-ROM or the floppy diskette - you can't use both at the same time without a special adapter cable. This can make installing Linux challenging to say the least.

If you only want to use the Panasonic CF-35 for Linux, follow the same procedure and leave out the Windows partition. It might be a good idea to have a minimal Windows installation for legacy files....

If you have anything to add to this page, or would like to tell me about your success, just send me an e-mail

It is crucial that you back up any files that you can't afford to lose from your laptop. I really shouldn't have to say this - but who hasn't lost a file and then sworn to do regular backups? So, consider yourselves warned. I prefer to do clean installs, which means that the entire contents of the hard drive are lost in the process. If you are unsure of the implications of this, stop right now!

The procedure also involves running some of the utilities found on the Panasonic 1st Aid diskette manually. Normally, they run automatically from a batch file, but we're going to be setting up the hibernation partition ourselves. The hibernation capability is one of the most useful features of the CF-35. Besides the excellent battery life you get from the laptop in the first place, you can save a snapshot of the current state of your session and restore it the next time your laptop wakes up.

Please read this entire document before you start the installation process. Then read it again. Then read the Installation Guides for Win98SE and Caldera OpenLinux eDesktop 2.4. If you have doubts or questions, ask someone that you trust to give you a well thought out answer. You should be familiar with basic DOS commands like fdisk and be able to set up your laptop BIOS to boot from the CD-ROM.

I spent the better part of a week getting this to work properly, between trying different distributions and verifying the instructions in this note. I didn't really need to get Linux onto the laptop, but I figured it would be a good way to test my Tcl scripts in both environments.

Before You Start

The CF-35 went through a number of processor and hard-disk options before it was discontinued. Mine is the CF-35????CAM model, with a Pentium 266MMX, 32Mb of RAM, and a 3 Gb hard-drive. I've upgraded the RAM to 96Mb and still get decent battery life of around 4 hours.

The Panasonic website has a complete list of the updates you need. Make sure you get the latest BIOS and drivers for your particular model of CF35! The items I used for my installation include:

35m2bl12.exe
This self-extracting archive updates the BIOS of your CF-35 to the latest level. Be sure you get the BIOS that is right for the model of your laptop.

CF35_MK3_1st_Aid.exe
This self-extracting archive fills a diskette with utilities required to get the CF-35 hard disk to the factory-fresh state. Don't extract it just yet, though.

Windows 98 Second Edition
You only need this if you want to install Windows on the laptop. For some, this is like a choice between political parties. For me it means I can get my work done.

Caldera OpenLinux eDesktop 2.4
You can use any Linux distribution that works, but I've found that until recently, many had issues with booting from the CD or with the NFS installation. I decided to give Linux another try with Caldera OpenLinux eDesktop 2.4 and it works great. The manual is decent enough too. I also tried Mandrake 7.1 but the kernel crapped out installing the PCMCIA module, and I just don't have enough time in the day to fiddle with a flaky distribution.

MRBOOT30 - A DOS fdisk Substitute
This program is not strictly necessary, until you want to use DOS fdisk to get rid of an extended partition with Linux drives on it - it won't let you do it. MRBOOT30 can do all of the partition management for you, but it's a bit more complicated to use.

The next thing to do is make a bootable diskette. If you already have a computer running Windows9x you can open a DOS window and type "format a: /s/v" to format a diskette and copy the operating system over to it. Then run CF35_MK3_1st_Aid.exe and extract the files on top of the bootable diskette.

Now you're ready to start the actual procedure, so grab a warm or cold beverage of your choice, some snack food, and settle down for a few hours of everybody's favorite pastime - installing operating systems.

Setting up the Hard Disk

The Panasonic 1st Aid diskette is used to get your system back on its feet to a clean, known state. Unfortunately, it does some nasty things behind your back and makes bad assumptions about the state of the hard disk before it goes to work. Specifically, it assumes that there is only one partition on the disk before it starts. This may not be true if you've got an old installation of Linux that you want to upgrade, or if you've made more partitions on your drive.

The first step is to get yourself a clean hard disk. Because Windows is a bit aggressive in its use of the Master Boot Record on your hard drive, you should normally install it first. Unfortunately, the PartitionMagic software only gives you limited choices for the partition sizes. We'll install Linux first, since you'll probably end up reinstalling Windows before you upgrade Linux again...

Also, the DOS fdisk program makes some assumptions about the contents of the boot sector partitions that is incompatible with Linux fdisk. It all boils down to making the installation as painless as possible, so we're going to do this in the right order. Trust me, after spending almost a week doing this, I've installed Windows and Linux about 8 times before getting it right. I'm surprised I haven't chucked all my computers out in the trash.

  1. Put the floppy drive in the drive bay, put your bootable 1st Aid diskette in the drive, and fire up your laptop.
  2. Press F1 after the power-on self-checks to enter the setup menu for the laptop BIOS.
  3. Choose LoadDefaultSettings(PnP) to get your laptop to a known state. This is important because ending up with a good installation depends on everyone starting from the same point.
  4. Choose SupervisorSetup/BootUpDrive and set it to CDD->FDD->HDD. Then ESC to the previous menu.
  5. Choose ExitSetup and then Yes, Save and Exit the Setup Utility and let the laptop reboot.

No two users are alike in their needs, so the partition selections I have made here reflect the fact that I'll be using Linux primarily to test TclTk scripts. This means that a minimum installation including X is all I really need. I don't need a development system for recompiling the kernel, or StarOffice to edit documents. I figure that a 16 Mb boot, a 64 Mb swap, and a 320 Mb root partition will do just fine. They will each live in an Extended partition on the hard drive that is about 384 Mb.

Generally, you can't pick exactly how much disk space you'll get, because the partitions boundaries are on whole cylinder numbers, but I'm allocating about 400 Mb for Linux, and leaving the rest for Windows. Your needs may differ from mine, but I'll just step through my procedure here. I'm not going to spell out each key press, just the actions.

  1. Choose Boot instead of the Restore Restore HDD to factory default options. When the boot process is complete, you will be in A:\WINDOWS\COMMAND
  2. Run fdisk, enable large disk support, and delete all of the partitions on the drive. If you have extended partitions from a previous install of Linux, you may need MRBOOT30 to get rid of them all. Then create a Primary DOS partition and allocate all of the available space and make it active. This is the default operation of fdisk. Reboot the computer after you exit fdisk
  3. Once again, choose Boot instead of the Restore Restore HDD to factory default options. When the boot process is complete, you will be in A:\WINDOWS\COMMAND

At this point, we have a clean hard disk with one Primary DOS partition and the laptop is in a known default state.

Adding the Hibernation Partition

After close examination of the files on the 1st Aid diskette, I concluded that three programs do the bulk of the automatic work for us. Unfortunately, the procedure set out by Panasonic is for restoring Windows 95, which is not what we want to do. By using the strings utility in the MKS Toolkit, I have been able to extract command-line options or execs within the programs and figured out what they actually do.

REST.EXE

This is the main program that controls the other two. I know this because of the following strings were extracted from the executable:

FDISK < A:\MKD\YY
CD MKD
EDPART /m110,102
COPYUTIL /UUUTIL.BIN
COPYUTIL /FLAG1:0=0000

The FDISK command just enables FAT32 support, and then creates a primary DOS partition of the maximum available size and makes it active. If there is more than one partition already on the drive, it will use the maximum size of the first partition, which is not what we want.

The EDPART command makes the special hibernation partition and writes out a new partition table.

Finally, the COPYUTIL writes out the special file that saves and restores the contents of RAM to the special partition. It can also be used to look at BIOS flags for setting up USB support, but we'll look at that later.

So it's clear that this program controls the entire process, but can we learn anything about the others?

EDPART.EXE

The purpose of this program is to create a special hidden partition that will be large enough to hold the contents of the laptop's RAM during hibernation. Here are the command line options:

USAGE:EDPART [/Mxx,yy] or [/R(file)] or [/r(file)]

/M xx=Size of the special partition (MB)
yy=Size of the data save area for Hibernation
/R :Copy the special partition to the file.
/r :Copy the partition table to the file.
/V :Show Version Number of EDPART.EXE.

COPYUTIL.EXE

The purpose of this program is to put a the program that saves and restores RAM on the HDD as well as querying and modifying BIOS flags. Here is the usage:

USAGE:COPYUTIL [/UU(FileName)] or [/FLAGx:y] or [/FLAGx:y=z]

/UU Load UTIL.BIN and write to HDD
/FLAGx:y x=1 or 2,y=OFFSET / Show current value.
/FLAGx:y=z z=data / Set specified data.

The engineer in me hates to waste any space on a hard drive. Having a 3.1 Gb drive is a luxury compared to what was available 10 years ago, but it's not very big by today's standards. The EDPART program should make a partition large enough to hold all of your available RAM. I tried to make it allocate less than the ammount of RAM that I had installed, and it was smart enough to gave me an error.

Figure out how much RAM you have, or are likely to get, and then do the following steps to get the hibernation partition enabled:

  1. Type CD MKD to get to the directory where the programs we'll need live.
  2. Assuming your RAM size is XX Mb, type EDPART /mXX,XX. I have verified that this works just fine with 96 Mb of RAM.
  3. Type COPYUTIL /UUUTIL.BIN which puts the special code for the hibernation function on the hidden partition.
  4. Type COPYUTIL /FLAG1:0=0000 which enables the hibernation function. Reboot the computer using CTRL-ALT-DEL.
  5. Once again, choose Boot instead of the Restore Restore HDD to factory default options. When the boot process is complete, you will be in A:\WINDOWS\COMMAND
  6. Slide the power switch and hold it until you hear a beep, then let go. The laptop should display a progress bar indicating that it is saving the contents of the RAM to disk. Wait for the laptop to complete the hibernation process.

Now we have a clean hard drive with a hibernation partition, and the hibernation function is enabled.

Resizing the Windows Partition and Adding the Extended Partition

Now we're going to resize the Primary partition we're going to use for Windows, and then add an Extended partition we'll use for Linux. As mentioned before, I'm allocating 400 Mb for the extended partition. If you have any questions about partitions, the Caldera OpenLinux eDesktop 2.4 manual has a section on manual partitioning which will help answer them.

  1. Reboot the laptop, and choose Boot instead of the Restore Restore HDD to factory default options. When the boot process is complete, you will be in A:\WINDOWS\COMMAND
  2. Run fdisk, enable large disk support, and delete the Primary DOS partition.
  3. Create a new Primary partition, and make it 2586 Mb. Remember to make the partition active!
  4. Create a new Extended DOS partition and give it the rest of the available space.
  5. Exit fdisk, reboot the laptop, and choose Boot instead of the Restore Restore HDD to factory default options. When the boot process is complete, you will be in A:\WINDOWS\COMMAND
  6. Now run format c: /s to get a basic system loaded onto the hard drive that will be recognized by the Linux install process.
  7. Reboot the computer with the floppy disk removed to make sure that the DOS partition is, in fact, bootable.

Now we have a laptop with a Primary bootable DOS partition, an Extended partition for Linux, and a hibernation partition. At this point, we could either install Windows or Linux - but we'll do the Linux install first.

Installing Caldera OpenLinux eDesktop 2.4

Installing Caldera OpenLinux eDesktop 2.4 is pretty much a no-brainer - but don't be tempted to use the default graphical installation. It hangs the CF-35. After checking the Caldera knowledge base, it seems that there may be a conflict with the IR port. We coul;d disable the IR port, but that might cause other problems and not fix the real one. The text based install works - use it.

At this point, I should mention that of all the Linux distributions I have played with, Caldera's on-line support seems to be the best. Their Kowledge Base is crammed full of useful procedures, and I have used it more than once in getting me out of a jam here. Learn to use it - it is your friend - even if you're not installing a Caldera distribution.

We'll be doing the text-based install, and I recommend that you follow all the suggested defaults. We might change a few things after the install, and I'll indicate where my minimal installation differs from the default.

  1. Put your laptop to sleep to change the drives in the bay.
  2. Remove the floppy drive from the bay and insert the CD-ROM drive. Insert any PCMCIA cards you'll need, especially your network card and modem. Currently, Linux does not WinModems, but apparently this will be coming soon. Power up the laptop and it should indicate that it is restoring memory from disk. When it's done, you should be in A:\WINDOWS\COMMAND. Of course, there is no floppy drive present. Open the CD-ROM drive door and insert the OpenLinux eDesktop 2.4 Binaries and Installation CD. Reboot the computer using CTRL-ALT-DEL.
  3. The bootloader should keep itself busy for a minute or so and then a screen giving you a number of install options appears. Choose Non-graphic install mode - the others will hang the CF-35. The installer will busy itself probing the hardware before it decides that it will install from the CD. Finally, the LISA 3.2 menus will appear. When answering the following prompts, be careful not to hold the Enter key down for too long, you will bounce through subsequent menus! Also, note that the button with the white text is the one selected when you hit Enter. It's obvious with three choices, but not so clear when there are only two!
  4. Choose your preferred language.
  5. Choose your preferred keyboard map.
  6. Choose to not use a previously saved configuration - you don't have one!
  7. In the Change LISA Setup menu, choose Use this setup and continue.
  8. LISA will then tell you the hardware it has found. In my case, I'm using an NE2000 compatible network card, so it appears on the list along with the 3.1 Gb hard drive and the CD-ROM. Choose Continue and then Yes when LISA asks you if all the hardware has been recognized.

Now we're into the partitioning for Linux. We've done most of the work already, all we're doing here is defining /boot, root, and swap partitions.

  1. Choose the hard drive you want to repartition - in this case /dev/hda. Choose Yes after reading the warning about messing with partition tables. For the 3.1 Gb drive in my laptop, each cylinder is 4 Mb.
  2. Print your partition table. hda5 is the first logical drive, and it may have bizarre values - so delete it.
  3. Create the /boot primary partition. For my system, the starting cylinder is 658 and the ending cylinder is 661 for 16 Mb. Its type ID is 83 for Linux by default.
  4. Create an extended partition to hold swap and /root partitions.
  5. Create the swap logical partition. For my system, the starting cylinder is 662 and the ending cylinder is 677 for 64 Mb. Chage the type ID to 82 for Linux swap.
  6. Finally, create the root logical partition. For my system, the starting cylinder is 678 and the ending cylinder is 759 for 320 Mb. Its type ID is 83 for Linux by default.
  7. View your changes so far, double check your table, then write it out to the hard drive.
  8. Now LISA is asking you to Configure Swap Space. It's smart enough to pick the partition we've labelled for that purpose, so let it initialize the swap space for us. This can take a few moments.
  9. LISA will then ask you for a root partition. Choose the larger of the Linux native partitions. Let LISA format the partition, but don't bother checking for bad blocks.
  10. LISA now asks for Additional Partitions. We'll want to add the smaller partition as /boot. Again, let LISA format the partition, but don't bother checking for bad blocks.
  11. Finally, we're ready to let LISA install our packages. I've chosen Minimal (Including X) which gets me a minimal install including X -duh!
  12. Just before LISA starts installing everything, it will ask for an X-Server to install. Choose XFree86-SVGA.

Have a few sips of your beverage, clean up the office, or go outside and get some fresh air for between 10 and 30 minutes. After all of the packages are installed, we're ready to configure the rest of the system including X. Take a deep breath, we're almost done!

  1. I have a local network for my computers, but I'm not doing anything here. You can change these defaults later.
  2. When LISA gets to the CMOS Time menu, choose Local Time unless you want really goofy file access time issues. Pick your local timezone too.
  3. Choose PS2 Bus Mouse for the mouse type.
  4. I don't want to set up a printer right now, so I chose None
  5. Set your root password and add any users you need.
  6. This part is tricky, so follow the instructions. LISA will analyse your boot setup, and complain that you have no valid boot setup. We're going to install LILO in the Master Boot Record (MBR) of the hard drive.
  7. In the LILO Boot Manager Installation choose MBR IDE. A subsequent install of Windows 98 will wipe the MBR. Choose the default kernel and add the Win95 partition as a second boot option. Now let LILO install itself on the hard drive.
  8. In the Configure daemon/server autostartmenu, leave all the defaults alone.
  9. In the Choose X11 Server menu, pick SVGA, then let LISA call XF86Setup. The rest of the installation will complete before XF86Setup actually runs.
  10. LISA will ask you to save the configuration to a floppy - but we have the CD installed, so choose No for now.
  11. Allow the system to reboot. My system complained that /root was already mounted and that Lizard might have been aborted. I just kept pressing Enter until the system rebooted and started XF86Setup.
  12. Select a video card, choose NeoMagic from the card list.
  13. Select a monitor, choose Super VGA, 104x768. It works fine with the LCD panel and any external monitor you're likely to encounter.
  14. Select a default color depth and resolutions. I chose 16 bpp and resolutions of 640x480 and 800x600. The KDE virtual desktops let you work in a way that makes more sense than having an ever-expanding desktop. The lower resolution will work with older LCD projectors.
  15. The X Server will try to start - and if you've followed all the instructions, you should be in business. Save the configuration, don't mess with Xvidtune.
  16. Finally, OpenLinux will reboot and set you up with a console.

The Linux install procedure should have put LILO on the master boot record, but the laptop may still not boot. In my case, I was able to boot using my floppy and discovered that there was no partition marked as bootable. The DOS fdisk comes in handy to mark the primary partition active which makes it bootable.

That's all there is to it, you can always get back to Linux if you have the boot floppy. Next, we'll install Windows 98.

Installing Windows 98 Second Edition

Installing Windows 98 Second edition will clobber your MBR. That means all the work we went to to install Linux will be overwritten. Don't worry, the next section shows how to boot using the Installation CD to get your system back on its feet.

I won't go through all the steps involved in getting Windows 98 Second Edition installed on your laptop. If you turn the laptop off it will save everything to disk first. My laptop wouldn't boot from the Windows 98 Second Edition CD, so here's what I did to get around it...

  1. Boot the laptop from your bootable 1st Aid diskette. We need to copy some files from the floppy to the hard disk to make the CD-ROM usable. Follow the next steps exactly.
  2. Type cd a:\
  3. Type mkdir c:\dos
  4. Type xcopy windows\command c:\dos
  5. Type copy up\windows\command\atapicd.sys c:\dos
  6. Type echo device=c:\dos\atapicd.sys /d:mscd000 > c:\config.sys
  7. Type echo c:\dos\mscdex.exe /d:mscd000 > c:\autoexec.bat
  8. Power the laptop down, remove the CD-ROM and insert the floppy drive in the bay.
  9. Power the laptop back up, reboot, and at the graphical boot prompt, boot into DOS.
  10. The CD-ROM should be recognized and usable now. You may proceed with a normal Windows installation.

Booting From the Binaries CD

In an emergency, you can boot your Linux partitions from the GRUB loader on the Binaries CD. Here's how...

  1. Boot the laptop with your Binaries CD in the drive. Follow the next steps exactly.
  2. When the graphical boot screen comes up, type e followed by c to get a GRUB command line.
  3. Type find /vmlinuz and GRUB will take a few moments to search your system for the boot image. Note the location that starts with (hd0,x). If you followed all the previous instructions, the boot image partition will be on (hd0,4) and the /root partition will be on hda7.
  4. Type kernel (hd0,4)/vmlinuz root=/dev/hda7 and hit Enter
  5. Type boot and hit Enter. The kernel will boot so you can log in and run LILO again to get bat the MBR.

Conclusion

This was really an exercise in perseverance. I had a working Linux distribution about 4 out of the 8 attempts, but I was always looking for ways to simplify the process. If you have any further suggestions, or would like to let me know if this note has helped, send me an e-mail.


©2000 Ralph Hempel For more information contact rhempel@bmts.com Modified at 10/3/00; 12:42:56 AM