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-77266-garchives=archives.gentoo.org@lists.gentoo.org>) id 1JcPUV-000267-Cf for garchives@archives.gentoo.org; Thu, 20 Mar 2008 18:27:51 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 30AFEE0D16; Thu, 20 Mar 2008 18:27:50 +0000 (UTC) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by pigeon.gentoo.org (Postfix) with ESMTP id 70B49E0D16 for <gentoo-user@lists.gentoo.org>; Thu, 20 Mar 2008 18:27:49 +0000 (UTC) Received: by ug-out-1314.google.com with SMTP id j3so1489073ugf.49 for <gentoo-user@lists.gentoo.org>; Thu, 20 Mar 2008 11:27:48 -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=NK5M49kPVFpG8E3RSILo5omIBFO7QFr8iB8WVRKdmV4=; b=g/mr/1OJq3SdrMkIYBKJyWVhYDq9Oi3GEUXiy+R4CIo3O/H/SYJx71RdBSeW+80xZfgT48jCAQkUS25yp+20TYfReciuXwFtJIvW9yNBjggkEVZ/7TaTXA0CzIS3VS66skYEib+4z8LiPnlxOoLQZTA23tcVigSg/msQDVsWH1E= 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=B+nD/AaSXlXewuDJQslugDNjyZeYBX+uozekh6wdf9wO1sxdYQHH2w4rmBT7GqzUidifky6cb4AqP1dXrY7DxuWq3lR3YxkzgWncKiJ9ogzErBmwXfi2zMBBbzksGYbO/rXkoXeznLJIHSB3QrMZw2BKsjEeofSHt1hLuqNZ2IM= Received: by 10.142.163.14 with SMTP id l14mr1618590wfe.110.1206037667524; Thu, 20 Mar 2008 11:27:47 -0700 (PDT) Received: by 10.143.39.7 with HTTP; Thu, 20 Mar 2008 11:27:47 -0700 (PDT) Message-ID: <4ef07b8c0803201127k14ad6a1cv53d3801565cdc320@mail.gmail.com> Date: Thu, 20 Mar 2008 13:27:47 -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: <5bdc1c8b0803201122j534ab16eva99298cc0afa05d4@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> <5bdc1c8b0803201122j534ab16eva99298cc0afa05d4@mail.gmail.com> X-Archives-Salt: c0c64345-dda5-4ef9-bcbd-1e48560da746 X-Archives-Hash: c6dbcccbc9ef578f2a1df57ddf7d45fb On Thu, Mar 20, 2008 at 1:22 PM, Mark Knecht <markknecht@gmail.com> wrote: > > On Thu, Mar 20, 2008 at 11:13 AM, 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? > > > Good work Dan. I'll save this thread for future reference. > > As someone who has used lots of external drives in the past you might > want to do your mount by label or some sort of drive specific UUID and > not by /dev/sda1. What can happen over time is that you'll add a > second drive and because USB or 1394 often do device discovery order > by which drive spins up first two identical drives will come up in > random orders which switches your mounting around strangely. > > I've had good luck just mounting by label without using udev but I've > wanted to figure this out. You've given me a nice start. thanks. > > Cheers, > Mark > -- > > > gentoo-user@lists.gentoo.org mailing list > > Yeh, I only opted for matching the kernel name of the device because the headless server I'm working on very likely will never encounter a new USB device. But the rule would be more robust. Glad I could help. Cheers -- Dan Cowsill http://www.danthehat.net -- gentoo-user@lists.gentoo.org mailing list