Serving Two Masters
In spite of all the Linux zealots who infect the comp.os.linux.advocacy Usenet newsgroup with cries for the total elimination of MS-Windows—and usually Microsoft, as well—there are many people who want to be able to switch between Linux and Windows 95. Many users who were using LILO to choose easily between Windows 3.x and Linux installed Windows 95, and then found that Linux would no longer boot. Some who use LOADLIN also found that they were in trouble.
Windows 95 follows a “world domination” strategy when it is installed; it overwrites the master boot record on the hard drive with one which, by default, only boots Windows. The master boot record is essentially a very small program that is loaded from a fixed place on the hard drive as the first step of loading an operating system from the hard drive. The boot record installed by old versions of MS-DOS and by Windows 95 is very limited: it is only capable of allowing the boot process to proceed to the single partition which is marked as the “active” partition.
In contrast, the LILO loader that comes with Linux installs a boot record which allows you to choose to continue booting from any partition quite easily. In fact, LILO even allows you to boot from partitions on the second drive, something that the DOS master boot record cannot do. LILO's boot record is capable of booting Windows 95.
Notice that I didn't call LILO's boot record a “master” boot record. That's because while it can be installed as the master boot record, it doesn't have to be. On each partition on your hard drive, there is another boot record. When the DOS master boot record boots from the active partition, it does so by loading the boot record on the active partition. LILO's boot record can be installed either as the master boot records on the hard drive or as the boot record for your Linux partition.
In order to use LILO, therefore, you need to either install LILO's boot loader as the master boot loader, or install it as the boot loader on your Linux partition and make your Linux partition active. The advantage to installing it as the boot loader on your Linux partition and making your Linux partition active is that the next time you install Windows, all you will have to do to use LILO to choose your operating system is use the DOS fdisk program to make your Linux partition active.
Recovery recipe: Use an emergency boot floppy or boot from your installation boot/root floppy or floppy set. Get a shell prompt, probably either by choosing it from a menu or by pressing Alt-F2 (see the documentation for your Linux distribution if you don't know how to get a shell prompt). Then execute the following commands:
mkdir /mnt mount -t ext2 /dev/rootdevice /mnt /mnt/sbin/lilo -r /mnt umount /mnt
This assumes that /mnt does not exist; if it already exists, you don't need to create it. rootdevice is the name of the device that holds your root filesystem, such as hda2 (second partition of your first IDE hard drive) or sda1 (first partition of your first SCSI hard drive). If you don't remember which it is, you may have to use the fdisk program, which should be included with both installation programs and emergency boot disks, to find it. The -r /mnt part means to pretend that /mnt is your root directory. If your distribution didn't put lilo into the /sbin directory, you may have to look for it.
At this point, you should be able to reboot with the same options that you had before installing Windows 95.
Alternative recovery recipe: Again, boot from your emergency boot floppy or installation boot floppy, but add the command-line argument root=/dev/hda2 or root=/dev/sda1 or whatever partition is your root partition. This should eventually look as if you just booted off the hard drive normally. Now, simply log in as root and run the lilo command. You should now have the same booting options you had before you installed Windows 95.
Recipe to avoid future disaster with LILO: In your /etc/lilo.conf file, change boot=/dev/hda or boot=/dev/sda to point to the primary partition which holds your boot images. This is important on large hard drives; you may have partitions which use disk space that is not part of the first gigabyte on the disk, and that, as you probably know, is inaccessible to the BIOS which starts the bootstrap process. With your boot=/dev/hda3 or boot=/dev/sda4 statement in place in /etc/lilo.conf, run the lilo command. This will install the LILO boot sector on the partition named in the boot= statement.
Now, use the fdisk program to make the Linux partition on which you just installed the boot sector the active partition. You can do this either with the Linux fdisk program or with the DOS fdisk program.
Now, the next time you have to re-install Windows 95 because your .INI files are hopelessly messed up, or Windows 95 refuses to run for no reason, you will be able to boot Linux just by running the DOS/Windows fdisk program and making the Linux partition the active partition. Reboot, and LILO will be working again.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- Paranoid Penguin - Building a Secure Squid Web Proxy, Part IV
- SUSE LLC's SUSE Manager
- Google's SwiftShader Released
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- SuperTuxKart 0.9.2 Released
- Parsing an RSS News Feed with a Bash Script
- Rogue Wave Software's Zend Server
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide