Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Feb 1997 13:40:33 +0100 (MET)
From:      Erik Manders <erik@il.ft.hse.nl>
To:        freebsd-questions@freebsd.org
Subject:   Bootblock (mis)behaviour
Message-ID:  <199702101240.NAA26923@charm.il.ft.hse.nl>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702101240.NAA26923>