© LinuxCertified, Inc.
So, we were asked to create a dual-boot installation on one of our LC2000 series Linux laptops (LC2420) with Red Hat 9 and Lindows 4.0. One of the customers wanted to have both distributions available. Since we build dual-boot systems (with Windows and Red Hat) on a daily basis, we expected this to be a straightforward process. It turned out to be anything but....
After spending hours making it work, and finding postings through Google on struggles of other folks trying to make a dual-boot system with Lindows, I decided to put together these notes. Please note that I am not a Lindows expert. But I have worked on other more "normal" distributions for years. So, if you find some easier ways of making things work than what I describe below with Lindows, please send notes and I will gladly add to this article.
I started by trying to install Lindows first. While installing a Linux/Windows dual-boot system, I typically install Windows first, because the Linux installer (e.g. the Red Hat installer) typically recognizes another OS on the disk, and builds a correct boot loader configuration file (e.g. grub.conf).
Well, this turned out to be a nonstarter. Lindows installer would not let me re-partition the disk! Since this was a brand new disk with no previous partitions, the only choice was to use the whole disk for Lindows! This seems even worse than Windows XP install, which at least allows for installing on only part of the disk. Since I did not want to use another tool to shrink the size of the partition after installing the OS, I aborted this install.
I decided to use the Red Hat 9 installer to partition the disk. I went ahead and created the usual partitions for Red Hat and created a big partition (about half the disk) for the Lindows install. Note that Lindows installer will not give you the option of creating a partition on an empty disk. So, if you created partitions for your first OS, and left rest of the disk blank, you cannot get Lindows to create a partition and install on rest of the disk. So, you need to create the partition before installing Lindows. Note down your partitioning scheme, including partition numbers and what goes where; this will be very useful as you will find out later. I aborted the Red Hat install once the partitions were created. In essence, during this first step Red Hat installer was used just as a partitioning tool, instead of a paid-for tool like PartitionMagic.
Next step was to restart the Lindows installation. I picked the "Advanced Install" method, and installed Lindows on the partition I created specifically for this OS. Install was fast and completed in about 5-10 minutes. Pretty much no other options were given during the install.
System booted up fine with Lindows. Although, Lindows boot up sequence is completely hidden behind a splash screen, so it is hard to see useful messages during boot up time. Of course dmesg is available, once the system is booted up, but I like to see any errors or warnings, while system is coming up. More on this later.
I installed Red Hat next, using the partitions I had already created using the previous (aborted) install. At the boot loader screen, I added the Lindows entry by hand, and pointed it to the partition containing Lindows. While Red Hat installer can detect a previously installed Windows OS, it cannot detect a partition with another Linux distro installed. So, this label was not automatically provided on the boot options screen.
Red Hat installed fine. System rebooted and came up with the GRUB screen, with options to boot up to Red Hat or Lindows.
System booted up fine with Red Hat. But when I tried to boot up Lindows, the kernel was not found. So, I went back to Red Hat, and edited grub.conf file to correct the entry for Lindows. This is how my final grub.conf looked like:
default=0 time-out=10 splashimage=(hd0,0)/grub/splash.xpm.gz title Red Hat Linux (2.4.20-6) root (hd0,0) kernel /vmlinuz-2.4.20-6 ro root=LABEL=/ hdc=ide-scsi initrd /initrd-2.4.20-6.img title Lindows root (hd0,1) kernel /boot/vmlinuz-2.4.20 ro root=/dev/hda2 acpi=off hdc=ide-scsi initrd /boot/initrd-2.4.20.gz
Well, everything was going fine, except when I rebooted the system it came back up with the Lindows splash screen, instead of the GRUB screen! And of course, there was no option to boot up to Red Hat anymore.
So, while Lindows was booting up, it changed the boot loader configuration without asking! Later I found out that the system has a program called "fooze", which automatically changes lilo.conf and runs the lilo program. Apparently this program is descendent from Corel Linux.
Supposedly this fooze program, does not update the lilo.conf file, if it has been edited by hand. There was no way to be 100% sure, as I could not run "man fooze" or "info man". Lindows did not install either "man" or "info" !!!! (You can install man pages by going through the "Click-N-Run Warehouse".) So, just to be safe, I got rid of the execute permission on the fooze binary:
lc2420:~# chmod -x /sbin/fooze(Note that this also gets rid of any advantage of first installing Lindows and then installing Red Hat. I could have just gone through with the Red Hat install during the first step when I used Red Hat installer to just partition the disk.)
So next step was to add the entry for Red Hat in the lilo.conf file. Lindows had automatically mounted my Red Hat partitions under generic mount points (/disks/hda1 etc.). So, I created the lilo entries based on this location of the Linux kernel and initrd files for Red Hat. Note that you cannot use the paths as they appear while system is booted up with Red Hat (e.g. /boot/vmlinuz-2.4.20-6.img etc.), because lilo program errors out if it cannot find the files. So, my lilo.conf looks like:
#lilo.conf on the Lindows partition boot=/dev/hda install=/boot/cboot.b message = /boot/splash.lilo map=/boot/map prompt fix-table lba32 delay=70 time-out=70 image=/disks/hda1/vmlinuz-2.4.20-6 label="Red Hat Linux" root=/dev/hda6 initrd=/disks/hda1/initrd-2.4.20-6.img append="hdc=ide-scsi " image=/vmlinuz label=L<>| vga=0xf04 root=/dev/hda2 initrd=/boot/initrd-2.4.20.gz append="acpi=off " image=/vmlinuz label="Diagnostics" vga=normal append="single acpi=off " root=/dev/hda2 initrd=/boot/initrd-2.4.20.gz
After running "lilo" and verifying that it recognized and added the Red Hat Linux image to the boot loader, I rebooted the system.
Now the Lindows splash screen gave the option of booting up to Red Hat, and both distro's booted up fine.
But I wanted to use GRUB as my boot loader. I also did not like the fact that Lindows hides everything behind a progress screen (ALA Windows) during boot up. So I booted up to Red Hat and ran grub-install:
# grub-install /dev/hda
Now, I was able to use GRUB to boot up to either Red Hat or Linux.
Lindows boot up gave out some errors related to splashFX. This is probably because my grub.conf entry did not setup vga properly for Lindows to be able to cover the screen with the "progress window" during boot up.
Since I did not want this progress window anyway, I removed the (links to the) scripts which create this window while booting Lindows:
# cd /etc/rcS.d/ # rm S01dosplashFX*
I also edited the following two files:
(The first one prints one "l" on the progress bar, the second prints two, i.e. "ll".)
I essentially commented out the only executable line in each of these files. Lindows boot up scripts use these two scripts to pass the progress to the boot up progress screen. Alternative would be to go to the /etc/rcS.d directory and remove all links ending in _splash_dot or _splash_dot2 (e.g. S40networking_splash_dot). But then it will be harder to get back to the original Lindows style boot up, in case you (or your client) wants that to happen.
Above changes got rid of the error messages related to splashFX during Lindows boot up. There were still errors about file system types of the Red Hat partitions. While these were ext3 partitions, Lindows was trying to mount them as ext2 filesystems. BTW, Lindows uses reiserfs as the filesystem for the partition it installs on. (In general Lindows seems to generate lot more errors than usual during boot up time. This is probably because the installer does not ask any questions from the user, and the boot up sequence simply tries lot of different options to get the system up and running. Of course, on a typical Lindows install these errors are hidden behing the initial splash screen, only showing a progress bar.)
Mounting the Lindows partition on Red Hat side was easy. I just created a /mnt/lindows directory, and added a suitable entry in /etc/fstab file from Red Hat side. Here is my file (Change according to your partitioning scheme) :
# /etc/fstab from the Red Hat portion of the system LABEL=/ / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 LABEL=/home /home ext3 defaults 1 2 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/hda5 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0 /dev/hda2 /mnt/lindows reiserfs defaults 1 2
Mounting Red Hat partitions correctly on Lindows side was a bit more tricky. Lindows uses a file harddrive.inf in order to auto-generate /etc/fstab file (Although this behavior seems to change, after making "fooze" program a non-executable. My guess is that fooze program reads the /etc/harddrive.inf file to create the /etc/fstab file. Please send me an email if you can confirm this or provide another explanation).
So, I modified my /etc/harddrive.inf file and changed the entries for my Red Hat partitions to show ext3 instead of ext2 file system type. You may also want to change the mount points e.g. from more generic /disks/hda1 to /disks/redhat_boot etc. After rebooting I got a new /etc/fstab file (note that I had done this step before making fooze non-executable. So if you already did that step, you may need to change this /etc/fstab file by hand):
# /etc/fstab file from Lindows portion of the system /dev/hda2 / reiserfs rw 0 0 /boot/linux-swap.swp none swap sw 0 0 /dev/hda5 none swap SW 0 0 proc /proc proc defaults 0 0 none /proc/bus/usb usbdevfs defaults 0 0 /dev/fd0 /mnt/floppy1 auto showexec=no,rw,user,noauto 0 0 /dev/cdrom /mnt/cdrom iso9660 noauto,ro,user,exec,unhide 0 0 /dev/cdroms/cdrom0 /mnt/cdrom1 iso9660 noauto,ro,user,exec,unhide 0 0 /dev/hda1 /disks/redhat_boot ext3 rw 0 0 /dev/hda3 /disks/redhat_home ext3 rw 0 0 /dev/hda6 /disks/redhat ext3 rw 0 0 /dev/fd0 /mnt/floppy1 auto showexec=no,sync,rw,user,noauto 0 0 /dev/cdroms/cdrom0 /mnt/cdrom1 iso9660 noauto,ro,user,exec,unhide 0 0
Notes : If you do decide to change the name of the mount points, remember to change the Red Hat entry in the lilo.conf file on your Lindows side, to point to correct location. While you will hopefully always be under the control of GRUB, it will be safe to maintain a correct lilo.conf file on the Lindows partition, just in case some future administrative action somehow triggers the lilo program. BTW, both Red Hat and Lindows share the same swap partition /dev/hda5 on this laptop. The swap partition was created by the Red Hat installer.
Finally I had a working LC2420 Linux laptop running both Red Hat 9 and Lindows 4.0!! Haven't heard any complaints from the customer yet ;-)
This was my first experience with Lindows. Reading some online documentation, it appears that Lindows would recognize a prior installation of Windows and install with correct boot loader entries, to allow booting up Lindows or Windows. It is somewhat ironical, that it can't do the same with a prior installation of Linux.
By eliminating the myriad of options available on a typical Linux distribution, Lindows has certainly made things easier from end-user perspective. It does recognize most hardware during installation. It would have been great if Lindows had also addressed the needs of users who have prior Linux experience, and see the various options in Linux as one of its core strengths. Hopefully a future version will do so.
Please provide any feedback, corrections etc on above article to firstname.lastname@example.org