From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from <gentoo-user+bounces-77265-garchives=archives.gentoo.org@lists.gentoo.org>) id 1JcPRy-00022S-3N for garchives@archives.gentoo.org; Thu, 20 Mar 2008 18:25:14 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F22F4E0CC6; Thu, 20 Mar 2008 18:25:12 +0000 (UTC) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.171]) by pigeon.gentoo.org (Postfix) with ESMTP id BD0C2E0CC6 for <gentoo-user@lists.gentoo.org>; Thu, 20 Mar 2008 18:25:12 +0000 (UTC) Received: by wf-out-1314.google.com with SMTP id 27so1064451wfd.10 for <gentoo-user@lists.gentoo.org>; Thu, 20 Mar 2008 11:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=2bVQ0qDGSvKeux6mEVk077d35QrGMIGVlB8YIUQX+EE=; b=QFNfsZc84Vlqfv7IC08ypDWHuYmGGg6Zhte43N/M+9SwtvOOaR2QivE2MY/LpxAwr1fDdXBSb/evKEubIvIAy/V/QZz1hxJcf7+TwlgYozp1SXQR/Yytvkch0tU8JU3BjmMhYAv44T3CZVAy6CQUNho1rBRkcPkz+o9Az9lUYaw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=U5ybIUbgUXi36XMa+ypBPJ7aLfg5kwqXxmzWattcdNRaWh0En565g0kSnQD2VfT/jjvWL9g2jjqf6hyMsgZ3oXHENPDLXXPoxoIRonw7+3w03do1bm3XYAcKfFtbJmKA8t1bY+U2+dkoCCx7JoIcspyrDFlr3eIuFRhABfT/vZQ= Received: by 10.142.141.21 with SMTP id o21mr1618728wfd.56.1206037511396; Thu, 20 Mar 2008 11:25:11 -0700 (PDT) Received: by 10.143.39.7 with HTTP; Thu, 20 Mar 2008 11:25:11 -0700 (PDT) Message-ID: <4ef07b8c0803201125u1bc3d60ai703c2f10d31511da@mail.gmail.com> Date: Thu, 20 Mar 2008 13:25:11 -0500 From: "Dan Cowsill" <danthehat@gmail.com> To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] [SOLVED] External hard disk doesn't mount on boot In-Reply-To: <4ef07b8c0803201113y2fb5e168p5ba0d483af6c2e50@mail.gmail.com> Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4ef07b8c0803200722o2bea74c5wa253efaf78e2d708@mail.gmail.com> <200803201801.25992.alan.mckinnon@gmail.com> <4ef07b8c0803201022o7b824251p7826f22497ab1a54@mail.gmail.com> <4ef07b8c0803201113y2fb5e168p5ba0d483af6c2e50@mail.gmail.com> X-Archives-Salt: 37af8d1f-131c-48cd-9e39-3286c074b719 X-Archives-Hash: 190f5a0b0ec7407ed882266ba9526b41 On Thu, Mar 20, 2008 at 1:13 PM, Dan Cowsill <danthehat@gmail.com> wrote: > > On Thu, Mar 20, 2008 at 12:22 PM, Dan Cowsill <danthehat@gmail.com> wrote: > > On Thu, Mar 20, 2008 at 11:01 AM, Alan McKinnon <alan.mckinnon@gmail.com> wrote: > > > > > > > > > > On Thursday 20 March 2008, Dan Cowsill wrote: > > > > Right, so I have an external USB hard drive always hooked up to my > > > > machine. I've a listing in /etc/fstab to mount it at boot. > > > > Unfortunately, the drive does not boot because localmount can't find > > > > /dev/sda1. Now, after the boot process I can find /dev/sda1 and > > > > mount the drive just fine, leading me to believe that localmount > > > > tries to mount the drive without populating /dev with USB devices. > > > > > > > > How could I resolve this? > > > > > > The canonical way is of course to use udev to run a mount script as soon > > > as the usb drive's device is created. This is hard and requires much > > > googling. > > > > > > The hackish, kludgy, totally not recommended method that always works is > > > to put a call to 'mount -a' in /etc/local.d/local.start > > > > > > :-) > > > > > > > > > -- > > > Alan McKinnon > > > alan dot mckinnon at gmail dot com > > > > > > -- > > > gentoo-user@lists.gentoo.org mailing list > > > > > > > > Okay, so I wrote a new rule into rules.d that goes like this: > > KERNEL=="sda", RUN+="/bin/mount -t ntfs-3g /dev/sda1 /home/dcowsill/usb" > > Now, this works (sort of). If I were to run udevstart, udev would > happily execute mount on the usb drive and all would be well. If the > system is restarted or the device is plugged in, no joy. > > So why is this only executing when I use udevstart? > > > > -- > Dan Cowsill > http://www.danthehat.net > Yeh, I wasn't being specific enough with my rule. This rule (revised) works perfectly: KERNEL=="sda1", RUN+="/bin/mount -t ntfs-3g /dev/sda1 /home/dcowsill/usb" Thanks Alan, for putting me on the right track. Also, much appreciation goes to Greg Kroah-Hartman, who wrote udevtest! Cheers -- Dan Cowsill http://www.danthehat.net -- gentoo-user@lists.gentoo.org mailing list