From owner-freebsd-stable@freebsd.org Mon Feb 13 19:00:48 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B025FCDD627 for ; Mon, 13 Feb 2017 19:00:48 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86B73CBC for ; Mon, 13 Feb 2017 19:00:48 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0096020A1D for ; Mon, 13 Feb 2017 14:00:40 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Mon, 13 Feb 2017 14:00:40 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=zyxst.net; h= content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=qrwtfGahXYYUG/riQcfdaYjaPqY=; b=NQ7G1g fAsBTuPyvd9Bisfgbt9feI+dIF+gD+hCXHcOf/8kEaI2lH5PiDD2w3aY7ZQfF5l1 2VQ/UD8H7pKo5NeRWQ9AvL8T2HalWqamsr6y4i3jwbSoDj+otPklZXy9XXahsGY9 GfYStZuqjR40Pi6Q7b3LYeYpDEVlEYO9feikE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=qrwtfGahXYYUG/ riQcfdaYjaPqY=; b=jnX5OtpCbKKy8nYDw5HquhmJWK8Ae5iweE1HCtvmoX2YjJ RocavDtoPUoVy8Oi5EZdNrwHzSXEhrzszo6KGdTed5gi4zz+7lZp+8a3Yuel6R70 yT0C/4iTV3dBvawFgN+GZ3ErOAYz4h/H+yNL4terZjEfTZDEyOq/qCOEJ5aFo= X-ME-Sender: X-Sasl-enc: jyfzlIIXfYrQrChgAksAhLf2vC82pHcEJO3UgwpvNRUC 1487012440 Received: from pumpkin.growveg.org (pumpkin.growveg.org [82.70.91.101]) by mail.messagingengine.com (Postfix) with ESMTPA id 892A57E2E5 for ; Mon, 13 Feb 2017 14:00:40 -0500 (EST) To: freebsd-stable@freebsd.org From: tech-lists Subject: how can I make freebsd wait for usb to become active? Or delay mountroot? Message-ID: <4d398907-f6ed-e212-824e-f6f8e5aa6b88@zyxst.net> Date: Mon, 13 Feb 2017 19:00:39 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2017 19:00:48 -0000 Hello stable@, system: 11-stable r313553 In the kernel there is an option for scsi delay. Is there also one for usb? Perhaps not in the kernel but elsewhere. I can't find it. The problem is seen especially where the bootable device is usb. The boot process starts and dumps me at mountroot where I wait for a short time until the usb stick is properly detected (bright white writing at the console). The usb stick is plugged into a usb3 port. For example: [snip] usbus0: 5.0Gbps Super Speed USB v3.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 480Mbps High Speed USB v2.0 usbus3: 12Mbps Full Speed USB v1.0 ugen0.1: <0x1022 XHCI root HUB> at usbus0 uhub0: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 ugen2.1: at usbus2 uhub2: on usbus2 ugen3.1: at usbus3 uhub3: on usbus3 usbus4: 480Mbps High Speed USB v2.0 ugen4.1: at usbus4 uhub4: on usbus4 acpi_tz0: _CRT value is absurd, ignored (255.1C) ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: ACS-2 ATA SATA 3.x device cd0 at ahcich1 bus 0 scbus1 target 0 lun 0 cd0: Removable CD-ROM SCSI device cd0: Serial Number 1415TP277450E0H6H cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes) cd0: Attempt to query device size failed: NOT READY, Medium not present - tray open ada0: Serial Number JA1006103G0ALV ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 953869MB (1953525168 512 byte sectors) SMP: AP CPU #3 Launched! SMP: AP CPU #1 Launched! SMP: AP CPU #2 Launched! Timecounter "TSC" frequency 1597045198 Hz quality 1000 Trying to mount root from ufs:/dev/da0p2 [rw]... uhub3: 5 ports with 5 removable, self powered uhub1: 5 ports with 5 removable, self powered uhub0: 4 ports with 4 removable, self powered Root mount waiting for: usbus4 usbus2 usbus0 ugen0.2: at usbus0 umass0 on uhub0 umass0: on usbus0 umass0: SCSI over Bulk-Only; quirks = 0x8100 umass0:3:0: Attached to scbus3 uhub2: 5 ports with 5 removable, self powered uhub4: 5 ports with 5 removable, self powered ugen0.3: at usbus0 ukbd0 on uhub0 ukbd0: on usbus0 kbd2 at ukbd0 Root mount waiting for: usbus4 ugen4.2: at usbus4 mountroot: waiting for device /dev/da0p2... Mounting from ufs:/dev/da0p2 failed with error 19. Loader variables: vfs.root.mountfrom=ufs:/dev/da0p2 vfs.root.mountfrom.options=rw Manual root filesystem specification: : [options] Mount using filesystem and with the specified (optional) option list. eg. ufs:/dev/da0s1a zfs:tank cd9660:/dev/cd0 ro (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) ? List valid disk boot devices . Yield 1 second (for background tasks) Abort manual input mountroot> Trying to mount root from ufs:/dev/da0p2 []... mountroot: waiting for device /dev/da0p2... Mounting from ufs:/dev/da0p2 failed with error 19. mountroot> [snip] Then this happens: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (probe0:umass-sim0:0:0:0): Retrying command da0 at umass-sim0 bus 0 scbus3 target 0 lun 0 da0: < USB DISK 3.0 PMAP> Removable Direct Access SPC-4 SCSI device da0: Serial Number 070B4722335D3288 da0: 400.000MB/s transfers da0: 30176MB (61800448 512 byte sectors) da0: quirks=0x3 so now at the mountroot prompt I enter ufs:/dev/da0p2 (which is a value that mountroot already had) and carry on booting: mountroot> Trying to mount root from ufs:/dev/da0p2 []... re0: link state changed to DOWN re0: link state changed to UP ums0 on uhub0 ums0: on usbus0 ums0: 16 buttons and [XYZT] coordinates ID=2 uhid0 on uhub0 uhid0: on usbus0 [...] The same sort of thing happens on an 11-stable r313043 desktop, only this time I'm not booting from usb. The system comes up, I get a login prompt, then five or ten seconds later usb wakes up having detected the usb3 external HD. How can I fix this? thanks, -- J.