"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
Starshine Technical Services, http://www.starshine.org/


(?) Persistent Boot Sector

From Hummingbird Designs on Thu, 24 Dec 1998

(?) Hi,

I installed Linux on my PC at work and had everything working with System commander, I have to use NT for some apps we use at work.

anyway, I was trying to get the nic card working so I tried using the setup tool to install the kernel from the Cdrom that is used to install linux off a network. Now everytime I turn on the machine it gives me the screen as if I had installed a bootdsk like when you first install Linux. I have done EVERYTHING I know of to get that out of there . . .I used a zerofill utility that goes over each and every sector of every track and fills it with 0's including the MBR. and that damn message still comes up everytime I boot. . . I was thinking of removing my Hard drive and seeing if it flashed my BIOS or something cause according to Quantum9its a quantum drive) their utility is almost like a low level format.

(!) "the setup tool..." (what setup tool?) "the screen as if I had installed a bootdsk[sic]" (what screen?) "EVERYTHING" (what is "everything?"). "zerofill utility" (what utility?) "that damn message" (what damn message?).
You do seem to be a bit sketchy on the specifics so I'll have to guess.
You had (some distribution of) Linux installed on your system in a dual boot configuration with NT. You were using System Commander as your primary boot manager. Presumably you installed LILO (the Linux loader) into the "logical boot record" (the "superblock") of one of your Linux filesystems (presumably the root fs). While trying to configure or troubleshoot some problem with a network card (NIC) you used some sort of "setup" utility which somehow configured your system to bypass System Commander's boot record (presumably by overwriting it with a copy of LILO). You've tried some ways to restore your System Commander installation, and/or to build a new MBR, and those have been unsuccessful.
O.K. Given that guess work I have a hypothesis. You may have run something like 'FDISK /MBR' from your NT boot disk. This may have enabled the active partition in your MBR. The DOS MBR code would load the logical boot record of the active partition. If your Linux partition (with its copy of LILO in the superblock" ) just happened to be the active partition at the time --- you might see that copy of LILO (one of two that had been installed on your disk, one on the MBR and the other in the LBR/superblock) as the first screen on boot up.
(I'm not sure this scenario accounts for all of your symptoms since this is all based on guesswork).
I have no idea what your "zero fill" utility is doing --- but it almost certainly is not zero'ing out track zero of your hard drive (including the MBR). That would render the system unbootable and would destroy the primary copy of your partition table (the last 50 bytes or so of the MBR). The Linux/Unix command to do this is very simple:
dd if=/dev/zero of=/dev/hda bs=512 count=63
... where /dev/hda is the first IDE drive, 512 is the bytes per sector and count is the number of sectors in a typical track. DON'T DO THIS! (If you insist on doing this, first double check which device you want to use, the first IDE is /dev/hda and the first SCSI is /dev/sda, then check the number of sectors per track --- which should be listed in your CMOS setup for an IDE drive and would be listed in your vendor documentation and possibly by your SCSI adapter diagnostics firmware).
You could save a copy of your MBR and partition table using dd with a command like:
dd if=/dev/hda bs=512 count=1 of=/root/mbr.bin
... which you can use in scripts to compare and replace your MBR in future mishaps.
It's possible that System Commander's boot loader is still in the MBR --- but that it's been configured to skip it's opening menu/selection prompting and boot directly off of your Linux partition.
Of course it's also possible that Linux as completely taken over your system; that's it's run amok and overwritten every partition and drive on the system. In my experience that would only happen if you (or someone) told it do do this. I've never seen Linux touch any part of a hard drive unless it was "told" to do so. (Unlike MS-DOS, OS/2, and Windows which periodically trash the MBR when they hang --- apparently scribbling register or random memory contents over track zero, sector zero when those zero's just happen to be in the the register during the dying spasms of those systems).
There is virtually no chance that Linux touched your flash BIOS --- so this is not a bug in your firmware. I'd say that this "zerofill" utility is highly suspect. Obviously Linux users just use the 'dd' command for this sort of thing.
As for how to fix you problem. You could try re-installing System Commander. I've never used it --- but it seems that it can find most types of partitions during installation --- so it should be able to find your NT and Linux filesystems and install a new copy of it's boot loader code to start either of these systems. I've never used System Commander --- but it is commercial software --- so it SHOULD come with some technical support. Perhaps they can walk you through the re-installation.
Keep in mind that LILO can still be installed on your MBR, your superblock, or both, so it might still show up after you have System Commander or NT's boot manager installed. It should then only come up after you've selected an option from your primary boot loader. This can be a bit confusing --- so you can reconfigure lilo to bypass any prompts or delays when you're calling it in this fashion.
Keep in mind that you can also find, download, and install LOADLIN.EXE into a DOS directory somewhere on your system. You can use that instead of LILO (it's a DOS program that loads linux kernels). I've heard a rumor that there is an NT native console application (an NT .EXE that you'd run under a CMD.EXE shell) to load Linux. I've never seen it.
If you end up having to re-install Linux and NT (probably unnecessary --- but it might be the easiest way) you can configure Linux to boot from floppy and never touch the boot records on your hard disk. It's also possible to configure Linux to use some other hard disk on your system --- and not have it touch your primary drive at all.
Read through back issues of this column and go through the various multi-boot HOWTO's and mini-HOWTO's at the LDP site (http://metalab.unc.edu/LDP) and it's mirrors. There are many options.

(?) C's from home and a nic card I know to install linux over the network and see if that gets rif of it.

(!) I don't get this at all. How would you expect installing Linux (over a network or otherwise) to get rid of a Linux boot loader.

(?) any help would be appreciated
Brian Korsund


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 36 January 1999


[ Answer Guy Index ] a b c 1 2 3 4 5 6 7 9 10 11 12
15 16 18 19 20 21 22 23 24 25 26 27 28
29 31 32 33 34 35 36 37 38 39 40 41 42 44
45 46 47 48 49 50 51 52 53 54 55 56 57 60 61 62 63 64 65 66
67 69 72 76 77 78 79 80 81 82 84 85 86 87 91 94 95 96 97 98


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]