Debian Multiboot Installation
In this month's column we will walk through the steps of installing Debian Potato in a multiboot configuration with Windows 98/NT/2K. Our machine will serve as the desktop system of a software developer (me) making the transition from supporting only the creation of Windows programs to supporting Linux. Before we're done we will discover that several things in the documentation can be misleading, and it's not advisable to follow blindly the Debian instructions or Linux HOWTO documents that you find on the Web.
Our machine, primarily used as a Windows software-development system, is an Abit BH6 motherboard Intel Celeron 300MHz PC with 128MB RAM, Yamaha CDRW, SoundBlaster Live!, Haupaugge WinTV, Hercules Terminator 2x/i 8MB and two 20GB drives. That may not seem like a very fancy machine, but it meets our needs. Our philosophy is to avoid getting too far ahead of the curve with development machines. We want to develop software on systems not too unlike those our users have. This helps avoid unpleasant surprises such as inadvertently creating software that won't run properly on anything but the newest and most powerful PCs.
To avoid risk to the data on our existing drive, and also because we're out of space, we have just installed a new 20GB Maxtor DiamondMax Plus EIDE Ultra ADA/66 drive. A 7,200RPM drive, the Maxtor is faster than our old 5,400RPM 20GB drive. That speed is needed for doing work with video that tends to get I/O bound. It's amazing how cheap big fast drives have become ($130 US). To install the drive we had to drop the power supply and pull the AGP card to get into the bay. The drive came with a Caldera DR-DOS boot floppy containing documents, partition software and drive image copy software, but we didn't use any of that. We swapped the ribbon cable from our existing drive (temporarily disabling it) to our new drive, booted to BIOS, did auto-detect of the drive, took the default LBA setting and away we went. For all intents and purposes, we are doing our install to a bare system. Our old drive is deliberately off-line as a safety precaution.
Let's start, strangely enough, with installing Windows. Versions of that OS aren't particularly friendly to any other operating systems already residing on a PC. We can avoid some hassle by installing Windows first, then Linux afterward. Windows 98SE sells for about $195 US and Win2K for about $265 US. Since we build our PCs from parts, we don't get Windows included with our PCs.
Windows 98 has three major versions: original, Second Edition and Millennium Edition. We prefer SE or ME because support for multiheaded monitors and other nifty device features was added. We install Win98SE by booting from the CD (twice), choose non-large disk support (FAT16), create a 2GB partition, provide int 3 and 0x300 parameters for our non-PNP ISA network card and enter our behind-the-firewall IP of 192.168.1.2 with netmask 255.255.255.0. We use the same login name and password for Win98SE and Win2K (not administrator) because that means less hassle when opening network Windows drives on a LAN.
Our network gateway is WinGate running on a WinNT box on our LAN at 192.168.1.1. This seems totally backward perhaps, because Linux is recognized as a better firewall than WinNT, but that's our setup since we are starting from a Windows-only shop. This turns the notion inside-out that Linux must be the server and Windows the desktop, a misplaced idea that may hold typical Windows users back from trying Linux on the desktop.
We boot Win98SE successfully from the hard drive and connect across our LAN to our treasure trove of downloaded Win98 drivers. Having a second PC available while building a PC can speed up the process considerably. One of the first things to do is install the correct video driver so that we can get out of 640x480 VGA mode. Here we encountered our first trouble. Win98SE has a redesigned video subsystem that chokes on the Win98 driver for our Hercules Terminator 2x/i video card. The screen goes blank. We need to boot in safe mode (plain VGA), a task made more challenging because the magic keystroke to boot safe mode in Win98SE is Ctrl and not F8 as it was in Win98. We couldn't figure this out at first. Windows doesn't display what keystrokes are available at boot up. Cutting the power forces a safe mode boot. We install an alternate driver from WinDrivers.com. The rest of the Win98 install goes without incident.
We installed Windows 98 first because it is the least tolerant of other operating systems. It has a proclivity to overwrite the MBR (Master Boot Record). Next we install Windows 2000 Professional. The pro edition is the desktop version, the replacement for Windows NT Workstation. There is no amateur version; the other flavor is Server. We boot Win2K from CD and create a 2GB partition in NTFS. The Win2K install goes flawlessly. We can now boot Win98SE or Win2K using the Windows boot loader c:/ntldr. We are careful to create emergency disks for both Win98SE and Win2K. Fortunately, we won't need them.
We created our Win98SE partition as FAT16 because Linux and MS-DOS can read/write FAT16. There isn't any benefit to FAT32 unless the drive partition is larger than 2GB (if you at some time use Win98 fdisk, refuse large disk access). We want to use NTFS with Win2K for many reasons, but mainly because it avoids the time-consuming Windows scandisk process if we have a crash. A hard reboot on NTFS is no fuss normally. We prefer to put an OS on its own 2GB partition because we have found that increases reliability under Windows. Now, let's install Debian Linux.
According to Debian founder Ian Murdock, the most unique aspect of Debian development as compared to other Linux distributions is the fact that it has been and continues to be developed openly by a group of volunteers, and that it is open to other volunteers who wish to join the effort. Debian is not developed by one individual or a small, closed group. Instead, it follows in the tradition of the Linux kernel; it is developed by those who use it, and this makes for a higher quality, more dynamic and truly modular system [see LJ November 1999, “Overview of the Debian GNU/Linux System”].
The Debian web site (http://www.debian.org/) points out that Debian GNU/Linux provides more than 3,950 packages of precompiled software bundled for easy installation. It should be noted that Debian is widely recognized as the most pure distribution in the free software and open-source philosophy. Free software advocates will enjoy reading the Debian “social contract” at http://www.debian.org/social_contract/. With Debian there is no company in the sense that there is for Red Hat. That's not to say you can't get commercial support from a company like LinuxCare if you want it. But, it is as a community of mutual support that Debian especially appeals to Linux experts and programmers, and the community support available on the Debian Users' list is awesome. We found that we typically receive the correct answer to a question there within ten minutes. And, the tone of the group is a joy. If you ask how to do X, you get how to do X, not that you should do Y, or a question asking why you want to do X—simple, to the point.
Debian releases have names. The current release 2.2 is called Potato, and the next release will be Woody. Initially we tried to download Potato by FTP from a mirror site but found the instructions too confusing and the download too time consuming (on 200KBs cable-modem). Many vendors offer Debian on CD, and some offerings have more CDs than others. We got the full six-CD set from Linux System Labs (http://www.lsl.com/) for $9. This was unbelievably cheap compared to what Windows costs. When ordering you can also “buy” a $5 contribution to the Debian organization if you like.
Installing Debian your first time is, to put it bluntly, sys admin hell. The documentation tends to steer you away from what a mere mortal needs to create a successful install. A forest of good advice, bad advice, conflicting opinion and outdated instructions—the documentation doesn't need to be that hard. And in hindsight, maybe it isn't that hard. It's just very confusing for first-timers. Back when I taught computer science at the Naval Postgraduate School in Monterey I was exposed to a term I hadn't heard before (or since). Naval aviator students would ask for a gouge. That is a document that accurately gives all the important information but only the relevant information. Gouges are intended for capable newbies and not written with painful detail. Debian could really use some gouges. We'll guide you around the confusion here.
Our first Debian problem: the LSL Potato CD won't boot. For whatever reason it doesn't seem to have been made as a bootable CD. We try to start it from Windows using E:/install/boot.bat, but the documentation points out that the command only works in MS-DOS mode, not the emulated DOS box console. In Win98SE, we pick “Restart in MS-DOS mode” from the shutdown menu. That boots us into true MS-DOS just fine, but do we have the necessary real mode DOS drivers to be able to read a CD? No, of course not! Time to stop and rethink.
The on-line “Debian GNU/Linux: Guide to Installation and Usage” document explains how to create boot floppies. The instructions are wrong because the file names and CD layout have changed for Potato, but the basic theory is correct. We ignore numerous warnings we find on the Web that boot floppies are evil. We have no trouble.
Here's how to boot Potato from two floppies when you can't access the CD from DOS:
In Win98SE copy the Debian CD directory of E:/install to C: on your hard drive.
Restart in MS-DOS mode. The next step, making floppies, won't work at the Windows DOS console.
At a real DOS prompt execute C:/install/rawrite2.exe. (If you didn't follow our advice to make the partition FAT16 instead of FAT32 you are hosed.) Enter rescue.bin and a: at the prompts.
Repeat with root.bin and a:.
Boot using the created rescue diskette, and voilà, you have a minimal Linux running that can see the CD.
Partitioning your hard drive can be scary. There's something about the danger of irrevocably losing all your data. The Debian installer will put you into Linux cfdisk which works very nicely but is intimidating at first. Standard warning: to avoid problems only partition using software intended for the OS you are partitioning for.
Something to keep in mind with partitioning is that there is only room for four entries in a drive's partition table. Primary or extended partitions use one entry. However, logical partitions within a single extended partition don't count. Win98SE is a primary partition. WinNT or Win2K are created by default as logical partitions. With any OS that will let you, and for all data partitions, use logical partitions to avoid running out of partition table entries. If you do run out you can't partition whatever space is left on the disk. Linux needs two partitions: a boot and a swap partition. We decided to make both Linux partitions together a total of 2GB, subtracting 250MB for swap. We should have put Linux on a logical partition, but not knowing any better we made it a primary partition. This needlessly wasted a slot in the partition table.
The Linux LILO boot loader is another program that strikes fear into new users. Despite the reputation, its installation was easy. We are glad we didn't follow the widespread advice of making Windows ntldr our primary boot loader (as suggested in linuxdoc.org “Win95 + WinNT + Linux Multiboot Using LILO Mini-HOWTO”). Having LILO boot everything is more elegant and was less trouble to install, too. When prompted, install LILO in the MBR (the default). This will temporarily disable Windows booting. The next step is to regain access to ntldr from LILO.
You touch up /etc/lilo.conf to point to Windows as an “other” boot OS using the syntax as documented for multiboot into DOS. By the way, if you don't already know how to operate a Unix text editor such as vi you will definitely learn. Don't forget to touch up /boot/bootmess.txt and run /sbin/lilo to take all your changes. Reboot and LILO puts us into ntldr (when asked) where we see the usual Windows OS boot selector screen. Win98SE boots now. We have jumpered our old drive as slave device, connected it to the same ribbon cable as our new drive, then booted and auto-detected the drives in BIOS. Because we have a second ntldr on /hdb we do some extra magic using the little known map directive in lilo.conf to enable swapping boot drives. Now we can boot Linux, our new copy of Win98SE and our old copies of Win98 and WinNT:
other=/dev/hda1 label=Win2k alias=2 table=/dev/hda other=/dev/hdb1 label=WinNT alias=4 table=/dev/hdb map-drive=0x80 to = 0x81 map-drive=0x81 to = 0x80
Win98SE boots fine, but we get an “ntoskernel missing” error trying to boot Win2K. The answer is to bump up the Windows partition number in c:/boot.ini. When a primary partition is installed later (as we did needlessly with Linux) it can bump up the logical partition numbers. Just add one to the partition number. Logical partitions must be contiguous to be in the same extended partition:
multi(0)disk(0)rdisk(0)partition(3)\WINNT="Microsoft Windows 2000 Professional" /fastdetectWe set the Linux network interface settings:
# /etc/network/interfaces -- configuration file for ifup(8), # ifdown(8) iface lo inet loopback iface eth0 inet static address 192.168.1.2 netmask 255.255.255.0 gateway 192.168.1.1We point to our firewall DNS in /etc/resolv.conf:
nameserver 192.168.1. search 192.168.1.1To recap, the sequence we followed was to install all Windows operating systems first, then Linux. Heady with success, we can now boot Linux, Win2K, Win98SE, WinNT or Win98 using LILO! Next month we will configure XFree86 so we can start X Window System and then patch kernel 2.2.17 to install Video4Linux. That will give us television video on our Linux screen.
- Free Today: September Issue of Linux Journal (Retail value: $5.99)
- The Tiny Internet Project, Part I
- Bitcoin on Amazon! Sort of...
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Android Browser Security--What You Haven't Been Told
- Returning Values from Bash Functions
- Nativ Disc
- Epiq Solutions' Sidekiq M.2
- Securing the Programmer
Pick up any e-commerce web or mobile app today, and you’ll be holding a mashup of interconnected applications and services from a variety of different providers. For instance, when you connect to Amazon’s e-commerce app, cookies, tags and pixels that are monitored by solutions like Exact Target, BazaarVoice, Bing, Shopzilla, Liveramp and Google Tag Manager track every action you take. You’re presented with special offers and coupons based on your viewing and buying patterns. If you find something you want for your birthday, a third party manages your wish list, which you can share through multiple social- media outlets or email to a friend. When you select something to buy, you find yourself presented with similar items as kind suggestions. And when you finally check out, you’re offered the ability to pay with promo codes, gifts cards, PayPal or a variety of credit cards.Get the Guide