From nobody@FreeBSD.org  Fri Jun 21 14:37:06 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 1ECAADDD
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Jun 2013 14:37:06 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	by mx1.freebsd.org (Postfix) with ESMTP id EB8921293
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Jun 2013 14:37:05 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r5LEb5ii043510
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Jun 2013 14:37:05 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r5LEb4Uo043458;
	Fri, 21 Jun 2013 14:37:04 GMT
	(envelope-from nobody)
Message-Id: <201306211437.r5LEb4Uo043458@oldred.freebsd.org>
Date: Fri, 21 Jun 2013 14:37:04 GMT
From: Hugo Silva <hugo@barafranca.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: mountroot fails with error=19 under Xen on 9-STABLE 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         179814
>Category:       kern
>Synopsis:       [xen] mountroot fails with error=19 under Xen on 9-STABLE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-xen
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 21 14:40:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Fri Aug 09 01:40:29 UTC 2013
>Originator:     Hugo Silva
>Release:        9.1-STABLE
>Organization:
>Environment:
>Description:
Somewhere between r250634 and now there appears to have been a change that prevents a HVM+PV domU from mounting root:

xn0: <Virtual Network Interface> at device/vif/0 on xenbusb_front0
xn0: Ethernet address: 00:16:3e:b4:bf:05
xenbusb_back0: <Xen Backend Devices> on xenstore0
xctrl0: <Xen Control Device> on xenstore0
xbd0: 32768MB <Virtual Block Device> at device/vbd/768 on xenbusb_front0
xbd0: attaching as ada0
xbd1: 2048MB <Virtual Block Device> at device/vbd/832 on xenbusb_front0
xbd1: attaching as ada1
xbd2: 49152MB <Virtual Block Device> at device/vbd/5632 on xenbusb_front0
xbd2: attaching as ada2
xn0: backend features:
SMP: AP CPU #1 Launched!
Trying to mount root from ufs:/dev/ad0p2 [rw,noatime]...
mountroot: waiting for device /dev/ad0p2 ...
Mounting from ufs:/dev/ad0p2 failed with error 19.

Loader variables:
  vfs.root.mountfrom=ufs:/dev/ad0p2
  vfs.root.mountfrom.options=rw,noatime

Manual root filesystem specification:
  <fstype>:<device> [options]
      Mount <device> using filesystem <fstype>
      and with the specified (optional) option list.

    eg. ufs:/dev/da0s1a
        zfs:tank
        cd9660:/dev/acd0 ro
          (which is equivalent to: mount -t cd9660 -o ro /dev/acd0 /)

  ?               List valid disk boot devices
  .               Yield 1 second (for background tasks)
  <empty line>    Abort manual input

mountroot>


I ran into this issue when updating the kernel+userland to mitigate against the new mmap exploit.

Reverting to the old (r250634) kernel makes the problem go away.

I tried to compile XENHVM instead of my custom HVMPV kernel just to rule out some custom option being the culprit, however unlikely in this scenario. The same thing happened (mountroot prompt)


Somehow, this seems to be a xen specific problem, as a physical server was also updated to the same revision that caused the mountroot problem on the virtual machine, and it booted without problems.


For the time being we're running with a patched r250634 kernel.
>How-To-Repeat:
Update your HVM+PV VM to today's -STABLE and reboot.
>Fix:


>Release-Note:
>Audit-Trail:

From: Adam McDougall <mcdouga9@egr.msu.edu>
To: bug-followup@FreeBSD.org, hugo@barafranca.com
Cc: "Justin T. Gibbs" <gibbs@FreeBSD.org>
Subject: Re: kern/179814: mountroot fails with error=19 under Xen on 9-STABLE
Date: Fri, 21 Jun 2013 11:13:17 -0400

 The cause is r251973 which MFC'ed r251175:
 
   svn rev 251175 Author:gibbs Date:2013-05-31T04:43:19.944993Z
   ==============
   Apply the ad* => ada* IDE device name transition to the Xen block
   front driver.
 
   Submitted by:	Bei Guan <gbtju85@gmail.com>
   Reviewed by:	gibbs
   MFC after:	1 week
 
 
 To prevent people running into the same issue as you, I think the kernel
 needs to make compat /dev/ad* device entries so it does not trip people
 up like this.  In the meantime you can update your fstab before
 rebooting to use /dev/ada*, which ideally people should do anyway.  This
 is probably deserving an entry in UPDATING too, either way.
 I've been meaning to bring this up but I've been busy.  My systems use
 ZFS which won't care, but the change as-is will probably affect my
 installation procedures.

From: =?KOI8-R?B?4czFy9PBzsTSIOLSz9fJy8/X?= <alexander@brovikov.ru>
To: bug-followup@FreeBSD.org, hugo@barafranca.com
Cc:  
Subject: Re: kern/179814: mountroot fails with error=19 under Xen on 9-STABLE
Date: Mon, 22 Jul 2013 12:54:22 +0600

 --047d7b6da8c27bb1b504e214258b
 Content-Type: text/plain; charset=ISO-8859-1
 
 use label
 
 --047d7b6da8c27bb1b504e214258b--
Responsible-Changed-From-To: freebsd-bugs->freebsd-xen 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Aug 9 01:40:09 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=179814 
>Unformatted:
