From owner-freebsd-current@FreeBSD.ORG Wed Jun 24 22:18:02 2009 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E35B1065742 for ; Wed, 24 Jun 2009 22:18:02 +0000 (UTC) (envelope-from nakaji@kankyo-u.ac.jp) Received: from www.heimat.gr.jp (unknown [IPv6:2001:3e0:a84::1]) by mx1.freebsd.org (Postfix) with ESMTP id 44C688FC19 for ; Wed, 24 Jun 2009 22:18:02 +0000 (UTC) (envelope-from nakaji@kankyo-u.ac.jp) X-Virus-Scanned: amavisd-new at heimat.gr.jp Received: from ra333.heimat.gr.jp.kankyo-u.ac.jp (ra333.heimat.gr.jp [IPv6:2001:3e0:a84:0:200:4cff:fe17:573c]) by www.heimat.gr.jp (8.14.3/8.14.3) with ESMTP id n5OMHo2G035421 for ; Thu, 25 Jun 2009 07:17:50 +0900 (JST) (envelope-from nakaji@kankyo-u.ac.jp) From: NAKAJI Hiroyuki To: freebsd-current@FreeBSD.ORG Date: Thu, 25 Jun 2009 07:17:50 +0900 Message-ID: <86y6rh1dkh.fsf@ra333.heimat.gr.jp> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.94 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Status: No, score=-6.1 required=13.0 tests=BAYES_00, CONTENT_TYPE_PRESENT,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on www.heimat.gr.jp Cc: Subject: USB HDD is not detected before /etc/rc starts, and fsck fails X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2009 22:18:02 -0000 Hi, Recent CURRENT kernel do not detect USB HDDs before /sbin/init. I noticed this behavior some months ago, by typing "shutdown -r now" on the console. Because of this detection delay, boottime (automatic) fsck always fails. Here is a boot log from a serial console. /boot/kernel/kernel text=0x8d3608 data=0xe12e0+0xaf9f8 syms=[0x4+0x9ba50+0x4+0xd4dde] /boot/kernel/linprocfs.ko text=0x641c data=0x2c0+0x4 syms=[0x4+0xc10+0x4+0xc93] loading required module 'linux' /boot/kernel/linux.ko text=0x222b4 data=0x2d54+0x16c syms=[0x4+0x3d10+0x4+0x3c9f] /boot/kernel/mga.ko text=0x89ac data=0x6fbc syms=[0x4+0xd70+0x4+0xd48] loading required module 'drm' /boot/kernel/drm.ko text=0x110b8 data=0x1124+0xc syms=[0x4+0x1b30+0x4+0x2161] /boot/kernel/atapicam.ko text=0x2cbc data=0x1b4+0x4 syms=[0x4+0x800+0x4+0x89b] - Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2009 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.0-CURRENT #188: Wed Jun 3 12:53:09 JST 2009 root@roddy.4407.kankyo-u.ac.jp:/usr/obj/usr/src/sys/RODDY Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Xeon(TM) CPU 2.40GHz (2392.04-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf25 Stepping = 5 Features=0xbfebfbff Features2=0x4400 real memory = 1073741824 (1024 MB) avail memory = 1032613888 (984 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs FreeBSD/SMP: 2 package(s) x 1 core(s) x 2 HTT threads [snip] uhub0: 2 ports with 2 removable, self powered uhub1: 2 ports with 2 removable, self powered uhub3: 2 ports with 2 removable, self powered GEOM: ad0s1: geometry does not match label (255h,63s != 16h,63s). Root mount waiting for: usbus3 Root mount waiting for: usbus3 uhub2: 6 ports with 6 removable, self powered acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00 Root mount waiting for: usbus3 Trying to mount root from ufs:/dev/ad0s1a (probe0:ata1:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe0:ata1:0:0:0): CAM Status: SCSI Status Error (probe0:ata1:0:0:0): SCSI Status: Check Condition (probe0:ata1:0:0:0): NOT READY asc:3a,1 (probe0:ata1:0:0:0): Medium not present - tray closed (probe0:ata1:0:0:0): Unretryable error cd0 at ata1 bus 0 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: 33.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed Entropy harvesting: interrupts ethernet point_to_pointugen1.2: at usbus1 uhid0: on usbus1 kickstart. /dev/ad0s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad0s1a: clean, 21323 free (1627 frags, 2462 blocks, 1.3% fragmentation) /dev/ad6s1d: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad6s1d: clean, 761004 free (6932 frags, 942Jun 25 15:38:12 init: /bin/sh on /etc/rc terminated abnormally, going to single user mode Enter full pathname of shell or RETURN for /bin/sh: ugen3.2: at usbus3 umass0: on usbus3 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:3:0:-1: Attached to scbus3 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 286188MB (586114703 512 byte sectors: 255H 63S/T 36483C) Of cource, I can run "fsck -p" manually in the single user mode. But it is not useful. # fsck -p /dev/ad0s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad0s1a: clean, 21323 free (1627 frags, 2462 blocks, 1.3% fragmentation) /dev/ad6s1d: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad6s1d: clean, 761004 free (6932 frags, 94259 blocks, 0.7% fragmentation) /dev/ad6s1e: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad6s1e: clean, 253588 free (396 frags, 31649 blocks, 0.2% fragmentation) /dev/ad6s1f: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad6s1f: clean, 62063972 free (340516 frags, 7715432 blocks, 0.5% fragmentation) /dev/ad1s1d: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad1s1d: clean, 38715020 free (397372 frags, 4789706 blocks, 0.4% fragmentation) /dev/da0s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/da0s1a: clean, 15606839 free (178983 frags, 1928482 blocks, 0.1% fragmentation) # Are there any fixes or tips about this, for example o umass/da devices can be detected much earlier, in other words, /sbin/init runs much later o wait options for fsck or fstab for umass/da o etc ? Thanks. -- NAKAJI Hiroyuki