I recently got a Dell Latitude L400, with windows 2000 (win2k) preinstalled by dell. My main production machines are all running Linux, so I decided to install Linux on this new machine.
Here's what I got:
There were several issues that made this install different from my previous Linux installation experience, both on desktops and laptops. (I will assume that you are pretty familiar with most of the usual Linux installation procedure - defrag, splitting the partition, installing, installing LILO, etc.)
Anyway, I downloaded GNU parted, and installed it and ran it. Basically it amounted to downloading a bootable image, creating a bootable floppy with it and running parted (the bootable image contains a mini version of Linux). You'll have to look around a bit for the file: run find parted and you can get the path to the command.
GNU parted is able to resize partitions without damaging the data even when they are not defragmented, so I just reduced the win2k partition down to slightly below 1024 cylinders, which left me with about 8GB of win2k partition. The command-line interface was pretty straight-forward, so use the help to figure out how to reduce the partition. It takes some time to complete the resizing process, so be patient, and monitor the harddisk light - do not forcefully terminate the process!
Once the win2k partition was reduced, now I was ready to install Linux.
I found out a page at littlewhitedog, which describes how to make linux and win2k dual bootable. Basically, the page describes how to obtain the linux boot sector and setup C:\BOOT.INI in win2k to allow win2k boot loader to load linux. This is done in three steps:
2.1 Obtaining the linux boot sector
Recall that L400 can only have either the external floppy or the cdrom attached to it. So, basically, you will have to reboot the machine. However, because LILO was not installed on the MBR, you can only get into win2k. To gain access to your freshly installed linux, you'll have to boot with the redhat CD and go into rescue mode. From the boot screen, start up in rescue mode.
This will drop you into a shell. All of your partitions will show up when you do df, and you will see your win2k partition among them if you selected the mount points appropriately during the installation process. I designated /mnt/win2k as the mount point, so I it was already mounted, and I was able to read and write from there.
To obtain the boot sector, you have to use the dd command. Following the instruction from the littlewhitedog page, I was able to save my boot sector on my windows C:\LINUX.BIN. Note: you have to replace the bold part below according to your local setup:
dd if=/dev/hda5 bs=512 count=1 of=/mnt/win2k/linux.binBasically, this command takes the first 512Kbyte block from /dev/hda5 (my linux root where LILO was installed during RedHat installation) and saves it in the file /mnt/win2k/linux.bin.
Once the boot sector was copied to win2k, reboot into win2k.
2.2 Setting up C:\BOOT.INI in win2k
Basically, the instruction at littlewhitedog boils down to
updating the C:\BOOT.INI file to look like below:
However, my win2k install did not have this file to begin with, and
just creating this file did not make any boot option to appear when I rebooted.
I looked around a bit for some more clue, and found out about this program
called bootpart.
The web page explains what bootpart is for:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft windows 2000 professional" /fastdetect
c:\linux.bin="Redhat 7.2"
BootPart is an easy tool for adding one partition in the Windows NT multi boot menu.So, I downloaded the zip archive (bootpa22.zip), unzipped it and ran it. First you have to determine the partition number of your linux root by running:
bootpart <--lists partitions bootpart /? <--shows help
Beware that here the partition numbering starts from 0, instead of 1, so /dev/hda5 will have the partition number 4 under bootpart. The syntax of bootpart is:
So, in my case, with /dev/hda5 as linux root and C:\LINUX.BIN as the boot sector, I executed the following, which resulted in the C:\BOOT.INI file almost idential to the one up there.bootpart partition-number boot-sector-file "name-of-os"
bootpart 4 c:\linux.bin "Redhat Linux 7.2"
Now with this in place, I rebooted, and finally win2k boot loader screen came up, listing win2k and linux. I selected linux from there, and it brought me to the familiar LILO screen. From there, I selected linux, and finally Linux was up and running.
Since I had the option of booting into win2k from LILO, I tried selecting win2k from LILO, but that brought me back to win2k boot loader screen, so that option in LILO seems to be unnecessary.
The rest of the installation and configuration part went painlessly. X11 and sound, apm worked out of the box with a stock Rehat 7.2 install. I haven't tried the suspend-to-disk feature yet. For more information on these stuff, visit Stephen Cornell's L400 page.
.