From owner-freebsd-questions Mon Feb 10 04:47:52 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA00664 for questions-outgoing; Mon, 10 Feb 1997 04:47:52 -0800 (PST) Received: from agora.rdrop.com (root@agora.rdrop.com [199.2.210.241]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id EAA00658 for ; Mon, 10 Feb 1997 04:47:47 -0800 (PST) Received: from charm.il.ft.hse.nl by agora.rdrop.com with smtp (Smail3.1.29.1 #17) id m0vtv96-0008xLC; Mon, 10 Feb 97 04:47 PST Received: (from erik@localhost) by charm.il.ft.hse.nl (8.8.5/8.6.12) id NAA26923 for freebsd-questions@freebsd.org; Mon, 10 Feb 1997 13:40:33 +0100 (MET) From: Erik Manders Message-Id: <199702101240.NAA26923@charm.il.ft.hse.nl> Subject: Bootblock (mis)behaviour To: freebsd-questions@freebsd.org Date: Mon, 10 Feb 1997 13:40:33 +0100 (MET) X-Location: Somewhere in The Netherlands X-Mailer: ELM [version 2.4ME+ PL27 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hello, I recently bought a 3Gb SCSI drive to replace the IDE disks that had been in my machine. After I had disklabeled, installed bootblocks, moved the file systems and installed a new kernel, I removed the IDE and booted the new setup. To my amazement the new kernel continued to want wd0a as its root device, even though `root on sd0' had been in the config file. Things even went so far that even though I typed `sd(0,a)/kernel', the machine said it was booting from `wd(0,a)/kernel'. The kernel was still loaded from the SCSI drive. It later said `changing root device to wd0a'. My DOS stuff (on the same disk) was and is working perfectly. After some hair-pulling, I started looking at the boot block source. I have some theories as to why things are going wrong. It seems to me that the variable `maj' gets zeroed between the assignment `maj = devp-devs' in sys.c:openrd() and the `MAKEBOOTDEV()' macro in boot.c:loadprog(). It's probably before the call to loadprog(), since the printf() at early in loadprog() reports maj=0. Changing the `maj' in the MAKEBOOTDEV() macro to `4' solves the problem. So (probably) would an assignment `maj=4' early in loadprog. It's ugly but it works. Has anyone else here had similar problems? For your information, I'm running -current (CTM-current around 3000, IIRC) on a noname pentium board with an NCR PCI SCSI controller. More detailed information available on request. Erik Manders erik@il.ft.hse.nl -- It is by caffeine alone that I set my mind in motion; it is by the cans of cola that the thoughts acquire speed, hands acquire shaking, the shaking becomes a warning; it is with caffeine alone that I set my mind in motion. --from the movie `Dune', edited