Bug 23108

Summary: Boot defaults to wd(4) devices rather than ad(4)
Product: Base System Reporter: cjclark <cjclark>
Component: i386Assignee: Crist J. Clark <cjc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-STABLE   
Hardware: Any   
OS: Any   

Description cjclark 2000-11-26 10:20:01 UTC
	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.

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.
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.
Comment 1 matt 2001-04-05 10:07:54 UTC
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
Comment 2 Crist J. Clark freebsd_committer freebsd_triage 2001-07-22 06:49:07 UTC
State Changed
From-To: open->closed

This is no longer an issue with the current boot process when fstab(5) 
is missing in STABLE or CURRENT. 


Comment 3 Crist J. Clark freebsd_committer freebsd_triage 2001-07-22 06:49:07 UTC
Responsible Changed
From-To: freebsd-bugs->cjc

Cleaning up my own old PRs