From cjc@149.211.6.64.reflexcom.com  Sun Nov 26 02:13:53 2000
Return-Path: <cjc@149.211.6.64.reflexcom.com>
Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82])
	by hub.freebsd.org (Postfix) with ESMTP id E089237B4CF
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 26 Nov 2000 02:13:52 -0800 (PST)
Received: from 149.211.6.64.reflexcom.com ([64.6.211.149]) by mailhost01.reflexnet.net  with Microsoft SMTPSVC(5.5.1877.197.19);
	 Sun, 26 Nov 2000 02:12:18 -0800
Received: (from cjc@localhost)
	by 149.211.6.64.reflexcom.com (8.11.0/8.11.0) id eAQADlR98780;
	Sun, 26 Nov 2000 02:13:47 -0800 (PST)
	(envelope-from cjc)
Message-Id: <200011261013.eAQADlR98780@149.211.6.64.reflexcom.com>
Date: Sun, 26 Nov 2000 02:13:47 -0800 (PST)
From: cjclark@reflexnet.net
Sender: cjc@149.211.6.64.reflexcom.com
Reply-To: cjclark@alum.mit.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: Boot defaults to wd(4) devices rather than ad(4)
X-Send-Pr-Version: 3.2

>Number:         23108
>Category:       i386
>Synopsis:       Boot defaults to wd(4) devices rather than ad(4)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    cjc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 26 02:20:01 PST 2000
>Closed-Date:    Sat Jul 21 22:49:07 PDT 2001
>Last-Modified:  Sat Jul 21 22:50:52 PDT 2001
>Originator:     Crist J. Clark
>Release:        FreeBSD 4.1-STABLE i386
>Organization:
>Environment:

	FreeBSD 4.x on i386 booting from IDE HDD without an fstab(5)
file.

>Description:

	When booting without an fstab(5) file, by default, the
kernel will try to mount the root device from a wd(4) device. However,
since the wd(4) have been depricated for ad(4), it should try to boot
from an ad(4) device.

>How-To-Repeat:

	Without any special settings in the /boot/loader.conf or other
customizations,

  # mv /etc/fstab /etc/fstab.hold
  # reboot
  .
  .
  .

  (After we go through the boot messages...)

  atapci0: <Generic PCI ATA controller> port 0xfe00-0xfe0f irq 14 at device 8.0 on pci0
  ...
  ad0: 775MB <IBM-DSOA-20810> [1575/16/63] at ata0-master WDMA2
  Mounting root from ufs:wd0s1a

Now, I fall into single-user where I repair the fstab and continue the
boot. When up in multi-user,

  # mount
  /dev/wd0s1a on / (ufs, local, soft-updates)
  /dev/ad0s1e on /usr (ufs, local, soft-updates)
  procfs on /proc (procfs, local)

The wd0 is still there.

When booted with the fstab,

  /dev/ad0s1a on / (ufs, local, soft-updates)

It appears as intended.

>Fix:

	I had a look in the boot code and found where the mount
information is printed from, /usr/src/sys/kern/vfs_conf.c, but trying
to track down where all that information comes from... That BIOS stuff
is not pretty.

>Release-Note:
>Audit-Trail:

From: "Matthew Emmerton" <matt@gsicomp.on.ca>
To: <freebsd-gnats-submit@FreeBSD.org>, <cjclark@alum.mit.edu>
Cc:  
Subject: Re: i386/23108: Boot defaults to wd(4) devices rather than ad(4)
Date: Thu, 5 Apr 2001 05:07:54 -0400

 This is related to a bunch of i386 legacy code which "assumed" that a system
 without /etc/fstab would boot from a da/wd/fd device.  [ See setroot() in
 sys/i386/i386/autoconf.c, in particular, comments around line 250. ]
 
 The legacy code was yanked from sys/i386/i386/autoconf.c in rev 1.151, and
 hasn't been MFC'd yet.
 
 --
 Matt Emmerton
 
State-Changed-From-To: open->closed 
State-Changed-By: cjc 
State-Changed-When: Sat Jul 21 22:49:07 PDT 2001 
State-Changed-Why:  
This is no longer an issue with the current boot process when fstab(5) 
is missing in STABLE or CURRENT. 


Responsible-Changed-From-To: freebsd-bugs->cjc 
Responsible-Changed-By: cjc 
Responsible-Changed-When: Sat Jul 21 22:49:07 PDT 2001 
Responsible-Changed-Why:  
Cleaning up my own old PRs 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23108 
>Unformatted:
